this is a german Web-Mirror of MHONARC.ORG powered by Domainunion AG

xsl-list
[Top] [All Lists]

[xsl] Normalizing space / XPTY0004

2013-07-29 17:56:02
Hi All--

XSLT 2.0
Saxon EE 9.5.0.2 (in oXygen 15.0)

I have a question about normalizing space -- at least I think that's what my 
question is about. I am matching the following TextRun/Text values, but the 
output is putting a space either after the end of the line or before the 
beginning (I can't tell which). That makes the word "are" become "ar e" and 
"larger" become "lar ger" and "unchanged" become "unchang ed". Obviously this 
is not my desired result, but the processor is dutifully matching exactly what 
it finds.

      <Paragraph stylename="Body">
         <TextRun>
            <Text value="If enabled, only the first N-bytes of each ingress 
packet ar"/>
            <Text value="e forwarded to Tool Ports connected to the rule. 
Packets lar"/>
            <Text value="ger than the trim length are 'trimmed' to the size 
specified"/>
            <Text value=". Packets smaller than the trim length are forwarded 
unchang"/>
            <Text value="ed."/>
         </TextRun>
      </Paragraph>


    <xsl:template match="Paragraph[@stylename = 'Body']">
        <xsl:value-of select="./TextRun/Text/@value"/>
    </xsl:template>

Output:
If enabled, only the first N-bytes of each ingress packet ar e forwarded to 
Tool Ports connected to the rule. Packets lar ger than the trim length are 
'trimmed' to the size specified . Packets smaller than the trim length are 
forwarded unchang ed.

I tried <xsl:value-of select="normalize-space(./TextRun/Text/@value)"/>, but I 
get error XPTY0004.

Can someone explain how I should be properly connecting the Text/@value entries 
in this TextRun so that my words are whole? 

-Lief


--~------------------------------------------------------------------
XSL-List info and archive:  https://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: https://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


<Prev in Thread] Current Thread [Next in Thread>