Re: [xslt] "|" operator



Phil Shafer writes:
>What's the difference between 'select=". | one"'
>and 'select="(.) | one"'?  The latter does what
>I thought the former should have done.

FWIW, I ran this w/ xsltproc -v and got:

Registering variable test1
Building variable test1 select . | one
Evaluating variable test1
Object is a Node Set :
Set contains 1 nodes:
1  ELEMENT top
call-template: name out
...
Registering variable test2
Building variable test2 select (.) | one
Evaluating variable test2
Object is a Node Set :
Set contains 2 nodes:
1  ELEMENT top
2  ELEMENT one
call-template: name out

Not much help.  The XSL statements are:

        <xsl:variable name="test1" select=". | one"/>
        ...
        <xsl:variable name="test2" select="(.) | one"/>

Thanks,
 Phil


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]