xsl-list
[Top] [All Lists]

[xsl] Question about variable definition and types

2008-03-06 15:01:13
Given 

    <xsl:variable name="itSystems" as="element()*">
        <xsl:for-each select="//system"> 
            <itSystem name="{nameOfSystem}"/>
        </xsl:for-each>
        <xsl:for-each select="//replacedLegacySystem"> 
            <itSystem name="{nameOfLegacySystem}"/>
        </xsl:for-each>
    </xsl:variable>

The type of $itSystems is such that the following Xpath expression
works:

        $itSystems[(_at_)name='whatever...']

However if I remove the as="element()*" attribute then the expression
has to be written as:

        $itSystems/itSystem[(_at_)name='whatever...']

What is the formal type of object returned in each case?  In the first I
believe it is a sequence of element nodes, but in the second there seems
to be an additional level of hierarchy.

        

IMPORTANT NOTICE:
This message may contain confidential information. If you have received this 
e-mail in error, do not use, copy or distribute it. Do not open any 
attachments. Delete it immediately from your system and notify the sender 
promptly by e-mail that you have done so. Thank you.



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