You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Bertoni (JIRA)" <xa...@xml.apache.org> on 2008/09/12 07:11:44 UTC

[jira] Closed: (XALANC-386) Search fail in tree with normalize-space function

     [ https://issues.apache.org/jira/browse/XALANC-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni closed XALANC-386.
--------------------------------


> Search fail in tree with normalize-space function
> -------------------------------------------------
>
>                 Key: XALANC-386
>                 URL: https://issues.apache.org/jira/browse/XALANC-386
>             Project: XalanC
>          Issue Type: Bug
>          Components: XPathC
>    Affects Versions: 1.7
>         Environment: Operating System: Windows NT/2K
> Platform: Other
>            Reporter: Denis Eab
>         Attachments: bug_func.xml
>
>
> An example with tree files: bug_func.xml, bug_func.xsl, bug_func.txt
> You see the bug in "bug_func.txt".
> After, you have to see bug_func.xsl, bug_func.xml and look at the different 
> search case.
> This algo is useful to make translation.
> Call:
> xalan -o bug_func.txt bug_func.xml bug_func.xsl
> bug_func.xml:
> <?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
> <A>
>   <B/>
>   <R1>
>     <P><L l="d" t="d1"/><L l="f" t="f1"/><L l="e" t="e1"/></P>
>     <P><L l="d" t="d2"/><L l="f" t="f2"/><L l="e" t="e2"/></P>
>   </R1>
>   <R2>
>     <!-- change place of l="e" (3 => 2) -->
>     <P><L l="d" t="d1"/><L l="e" t="e1"/><L l="f" t="f1"/></P>
>     <P><L l="d" t="d2"/><L l="e" t="e2"/><L l="f" t="f2"/></P>
>   </R2>
>   <R3>
>     <!-- change place of l="e" (2 => 1) -->
>     <P><L l="e" t="e1"/><L l="d" t="d1"/><L l="f" t="f1"/></P>
>     <P><L l="e" t="e2"/><L l="d" t="d2"/><L l="f" t="f2"/></P>
>   </R3>
> </A>
> bug_func.xsl:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsl:stylesheet version="1.0"
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>   <!-- Directives générales -->
>   <xsl:strip-space elements="*"/>
>   <xsl:output method="text" encoding="ISO-8859-1"/>
>   <xsl:template match="B">
>     <xsl:text>@cas R1.a Ok:&quot;</xsl:text>
>     <xsl:value-of select="/A/R1/P[L/@l='e' and L/@t=normalize-space( 'e1')]/L
> [@l='f']/@t"/>
>     <xsl:text>&quot;@cas R1.b not Ok (empty):&quot;</xsl:text>
>     <xsl:value-of select="/A/R1/P[L/@l='e' and normalize-space( L/@t)=normalize-
> space( 'e1')]/L[@l='f']/@t"/>
>     <xsl:text>&quot;@cas R2.a Ok:&quot;</xsl:text>
>     <xsl:value-of select="/A/R2/P[L/@l='e' and L/@t=normalize-space( 'e1')]/L
> [@l='f']/@t"/>
>     <xsl:text>&quot;@cas R2.b not Ok (empty):&quot;</xsl:text>
>     <xsl:value-of select="/A/R2/P[L/@l='e' and normalize-space( L/@t)=normalize-
> space( 'e1')]/L[@l='f']/@t"/>
>     <xsl:text>&quot;@cas R3.a Ok:&quot;</xsl:text>
>     <xsl:value-of select="/A/R3/P[L/@l='e' and L/@t=normalize-space( 'e1')]/L
> [@l='f']/@t"/>
>     <xsl:text>&quot;@cas R3.b Ok:&quot;</xsl:text>
>     <xsl:value-of select="/A/R3/P[L/@l='e' and normalize-space( L/@t)=normalize-
> space( 'e1')]/L[@l='f']/@t"/>
>     <xsl:text>&quot;@</xsl:text>
>   </xsl:template>
> </xsl:stylesheet>
> bug_func.txt:
> @cas R1.a Ok:"f1"@cas R1.b not Ok (empty):""@cas R2.a Ok:"f1"@cas R2.b not Ok 
> (empty):""@cas R3.a Ok:"f1"@cas R3.b Ok:"f1"@

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org