[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Question about variable definition and types
>>>>> "Jim" == Jim Garrison <Jim.Garrison@xxxxxxxxx> writes: Jim> Given <xsl:variable name="itSystems" as="element()*"> Jim> <xsl:for-each select="//system"> <itSystem Jim> name="{nameOfSystem}"/> </xsl:for-each> <xsl:for-each Jim> select="//replacedLegacySystem"> <itSystem Jim> name="{nameOfLegacySystem}"/> </xsl:for-each> </xsl:variable> Jim> The type of $itSystems is such that the following Xpath Jim> expression works: Jim> $itSystems[@name='whatever...'] Jim> However if I remove the as="element()*" attribute then the Jim> expression has to be written as: Jim> $itSystems/itSystem[@name='whatever...'] Jim> What is the formal type of object returned in each case? In Jim> the first I believe it is a sequence of element nodes, but in Jim> the second there seems to be an additional level of Jim> hierarchy. There is - a document node. -- Colin Adams Preston Lancashire
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|