Fontchange in table titles?

Hi, I have changed body.font.family and the title.font.family and added in Front of the fonts, oxygen offers, Alegreya. This font is installed on the computer. The strange thing happening is that in table titles the first word of the title is now not in Alegreya, maybe in Times Roman although in cannot see anything in parameters where the table.title is mentioned so that the first word is going into some other font. I asked Thomas Schaitle already, but he has no idea what is going on. Have you any idea what is going on? When necessary I can provide the source code and the customizations. <sect2 xml:id="lycanidaeBilder" xreflabel="Bilder von Feuerfaltern und Bläulingen"> <title>Feuerfalter- und Bläulingsbilder</title> <table frame="none" tocentry="1"> <title>Bläulinge, Zipfel- und Feuerfalter</title> <tgro Regards and greetings from the Black Forest Bernhard -- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

Hi Bernhard, To help sort this out, create a copy of your transformation scenario but turn off the FO processor (uncheck the Perform FO Processing box) and save the fo file (in the Output tab, change Save as to ${cfn}.fo). Then examine the fo file in Oxygen at that point to see what the fo markup is. That will provide clues. Is your FO processor FOP? Bob Stayton Sagehill Enterprises bobs@sagehill.net On 11/4/2018 10:50 AM, Bernhard Kleine wrote:
Hi,
I have changed body.font.family and the title.font.family and added in Front of the fonts, oxygen offers, Alegreya. This font is installed on the computer.
The strange thing happening is that in table titles the first word of the title is now not in Alegreya, maybe in Times Roman although in cannot see anything in parameters where the table.title is mentioned so that the first word is going into some other font. I asked Thomas Schaitle already, but he has no idea what is going on. Have you any idea what is going on? When necessary I can provide the source code and the customizations.
<sect2 xml:id="lycanidaeBilder" xreflabel="Bilder von Feuerfaltern und Bläulingen"> <title>Feuerfalter- und Bläulingsbilder</title> <table frame="none" tocentry="1"> <title>Bläulinge, Zipfel- und Feuerfalter</title> <tgro
Regards and greetings from the Black Forest
Bernhard
-- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com,www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hi Bob, the fo-file is included. It is another table but the first to show the error. I cannot see why the font change takes place. The offendint "Tabelle Bläuling noch nicht fotografiert" is around line number 700.
<fo:block xmlns:rx="http://www.renderx.com/XSL/Extensions" space-before.minimum="0.5em" space-before.optimum="1em" space-before.maximum="2em" space-after.minimum="0.5em" space-after.optimum="1em" space-after.maximum="2em" keep-together.within-column="auto" id="d0e101"> <fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em" font-weight="bold" font-size="13.2pt" hyphenate="false" space-after.minimum="0.4em" space-after.optimum="0.6em" space-after.maximum="0.8em" keep-with-next.within-column="always"> Tabelle Bläuling noch nicht fotografiert. </fo:block> <fo:table border-before-width.conditionality="retain" border-collapse="collapse" border-start-style="none" border-end-style="none" border-top-style="none" border-bottom-style="none" table-layout="fixed" width="100%"> <fo:table-column column-number="1" column-width="130pt"/> <fo:table-column column-number="2" column-width="167pt"/> <fo:table-column column-number="3" column-width="93pt"/> <fo:table-column column-number="4" column-width="66.6pt"/> <fo:table-header start-indent="0pt" end-indent="0pt"> I am using FOP.
kind regards Bernhard Am 04.11.2018 um 20:28 schrieb Bob Stayton:
Hi Bernhard,
To help sort this out, create a copy of your transformation scenario but turn off the FO processor (uncheck the Perform FO Processing box) and save the fo file (in the Output tab, change Save as to ${cfn}.fo). Then examine the fo file in Oxygen at that point to see what the fo markup is. That will provide clues.
Is your FO processor FOP?
Bob Stayton Sagehill Enterprises bobs@sagehill.net On 11/4/2018 10:50 AM, Bernhard Kleine wrote:
Hi,
I have changed body.font.family and the title.font.family and added in Front of the fonts, oxygen offers, Alegreya. This font is installed on the computer.
The strange thing happening is that in table titles the first word of the title is now not in Alegreya, maybe in Times Roman although in cannot see anything in parameters where the table.title is mentioned so that the first word is going into some other font. I asked Thomas Schaitle already, but he has no idea what is going on. Have you any idea what is going on? When necessary I can provide the source code and the customizations.
<sect2 xml:id="lycanidaeBilder" xreflabel="Bilder von Feuerfaltern und Bläulingen"> <title>Feuerfalter- und Bläulingsbilder</title> <table frame="none" tocentry="1"> <title>Bläulinge, Zipfel- und Feuerfalter</title> <tgro
Regards and greetings from the Black Forest
Bernhard
-- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
-- spitzhalde9 D-79853 lenzkirch bernhard.kleine@gmx.net www.b-kleine.com, www.urseetal.net - thunderbird mit enigmail GPG schlüssel: D5257409 fingerprint: 08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09

I hope I am not abusing this list in asking occasionally for advice on the best way to hack something in xslt. Today's problem is to output only the first x sentences (string terminated by a full stop) of a paragraph such that the total number of words (space delimited strings) is less than some limit (call it $maxWords) Since the sentences are of variable length, obviously I don't know what x is. Here's where I got to so far: <xsl:template match="t:p"> <xsl:variable name="pString"> <xsl:value-of select="."/> </xsl:variable> <xsl:for-each select="tokenize($pString, '\.\s')"> <xsl:variable name="seq"> <xsl:value-of select="string(position())"/> </xsl:variable> <xsl:variable name="wordsSoFar"> <xsl:value-of select="string-length(translate(normalize-space (preceding-sibling::text()), ' ', '')) + 1"/> </xsl:variable> <xsl:if test="$wordsSoFar < $maxWords"> <s n="{$seq}"> <xsl:value-of select="."/> </s> <xsl:if> </xsl:for-each> </xsl:template> But this is not valid because preceding-sibling:: wants a node() not a string (even though "text()" *is* a node imho). Am I going about this entirely the wrong way?

Hi Lou, Would it make sense to use xsl:for-each-group to group the sentences into <s> units to make this easier? Then I'd probably recursively call a template or function passing the current collection of <s> units as a variable item* value, testing if its tokenised number is above or below $maxWords. Not got time to write that out as a solution atm, and I'm sure it can be done without the recursivity as well, but that is the approach that would have occurred to me at least. -James On Mon, 5 Nov 2018 at 12:03, Lou Burnard <lou.burnard@retired.ox.ac.uk> wrote:
I hope I am not abusing this list in asking occasionally for advice on the best way to hack something in xslt.
Today's problem is to output only the first x sentences (string terminated by a full stop) of a paragraph such that the total number of words (space delimited strings) is less than some limit (call it $maxWords) Since the sentences are of variable length, obviously I don't know what x is.
Here's where I got to so far:
<xsl:template match="t:p"> <xsl:variable name="pString"> <xsl:value-of select="."/> </xsl:variable> <xsl:for-each select="tokenize($pString, '\.\s')"> <xsl:variable name="seq"> <xsl:value-of select="string(position())"/> </xsl:variable> <xsl:variable name="wordsSoFar"> <xsl:value-of select="string-length(translate(normalize-space (preceding-sibling::text()), ' ', '')) + 1"/> </xsl:variable> <xsl:if test="$wordsSoFar < $maxWords">
<s n="{$seq}"> <xsl:value-of select="."/> </s>
<xsl:if>
</xsl:for-each> </xsl:template>
But this is not valid because preceding-sibling:: wants a node() not a string (even though "text()" *is* a node imho).
Am I going about this entirely the wrong way?
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Thanks for v the quick reply james but doesnt your approach imply that the tokenisation into sentences has already been done? Im trying t o avoid a two pass solution as I expect to be doing this hundreds of times reluctantly using Outlook for Android<https://aka.ms/ghei36> ________________________________ From: James Cummings <james@blushingbunny.net> Sent: Monday, November 5, 2018 1:10:02 PM To: Lou Burnard Cc: oxygen-user@oxygenxml.com Subject: Re: [oXygen-user] an xslt challenge Hi Lou, Would it make sense to use xsl:for-each-group to group the sentences into <s> units to make this easier? Then I'd probably recursively call a template or function passing the current collection of <s> units as a variable item* value, testing if its tokenised number is above or below $maxWords. Not got time to write that out as a solution atm, and I'm sure it can be done without the recursivity as well, but that is the approach that would have occurred to me at least. -James On Mon, 5 Nov 2018 at 12:03, Lou Burnard <lou.burnard@retired.ox.ac.uk<mailto:lou.burnard@retired.ox.ac.uk>> wrote: I hope I am not abusing this list in asking occasionally for advice on the best way to hack something in xslt. Today's problem is to output only the first x sentences (string terminated by a full stop) of a paragraph such that the total number of words (space delimited strings) is less than some limit (call it $maxWords) Since the sentences are of variable length, obviously I don't know what x is. Here's where I got to so far: <xsl:template match="t:p"> <xsl:variable name="pString"> <xsl:value-of select="."/> </xsl:variable> <xsl:for-each select="tokenize($pString, '\.\s')"> <xsl:variable name="seq"> <xsl:value-of select="string(position())"/> </xsl:variable> <xsl:variable name="wordsSoFar"> <xsl:value-of select="string-length(translate(normalize-space (preceding-sibling::text()), ' ', '')) + 1"/> </xsl:variable> <xsl:if test="$wordsSoFar < $maxWords"> <s n="{$seq}"> <xsl:value-of select="."/> </s> <xsl:if> </xsl:for-each> </xsl:template> But this is not valid because preceding-sibling:: wants a node() not a string (even though "text()" *is* a node imho). Am I going about this entirely the wrong way? _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com<mailto:oXygen-user@oxygenxml.com> https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Hi Lou, Yes, it does suggest for each paragraph you'd be tokenising (or grouping) into sentences, which might have a slight efficiency hit (but I doubt that much), but would make the choosing the number of sentences to be under $maxWords easier. I was assuming that you wanted the output to have the sentences marked as <s>, my mistake. -James On Mon, 5 Nov 2018 at 12:31, Lou Burnard <lou.burnard@retired.ox.ac.uk> wrote:
Thanks for v the quick reply james but doesnt your approach imply that the tokenisation into sentences has already been done? Im trying t o avoid a two pass solution as I expect to be doing this hundreds of times
reluctantly using Outlook for Android <https://aka.ms/ghei36>
------------------------------ *From:* James Cummings <james@blushingbunny.net> *Sent:* Monday, November 5, 2018 1:10:02 PM *To:* Lou Burnard *Cc:* oxygen-user@oxygenxml.com *Subject:* Re: [oXygen-user] an xslt challenge
Hi Lou,
Would it make sense to use xsl:for-each-group to group the sentences into <s> units to make this easier? Then I'd probably recursively call a template or function passing the current collection of <s> units as a variable item* value, testing if its tokenised number is above or below $maxWords.
Not got time to write that out as a solution atm, and I'm sure it can be done without the recursivity as well, but that is the approach that would have occurred to me at least.
-James
On Mon, 5 Nov 2018 at 12:03, Lou Burnard <lou.burnard@retired.ox.ac.uk> wrote:
I hope I am not abusing this list in asking occasionally for advice on the best way to hack something in xslt.
Today's problem is to output only the first x sentences (string terminated by a full stop) of a paragraph such that the total number of words (space delimited strings) is less than some limit (call it $maxWords) Since the sentences are of variable length, obviously I don't know what x is.
Here's where I got to so far:
<xsl:template match="t:p"> <xsl:variable name="pString"> <xsl:value-of select="."/> </xsl:variable> <xsl:for-each select="tokenize($pString, '\.\s')"> <xsl:variable name="seq"> <xsl:value-of select="string(position())"/> </xsl:variable> <xsl:variable name="wordsSoFar"> <xsl:value-of select="string-length(translate(normalize-space (preceding-sibling::text()), ' ', '')) + 1"/> </xsl:variable> <xsl:if test="$wordsSoFar < $maxWords">
<s n="{$seq}"> <xsl:value-of select="."/> </s>
<xsl:if>
</xsl:for-each> </xsl:template>
But this is not valid because preceding-sibling:: wants a node() not a string (even though "text()" *is* a node imho).
Am I going about this entirely the wrong way?
_______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com https://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (4)
-
Bernhard Kleine
-
Bob Stayton
-
James Cummings
-
Lou Burnard