[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Question about variable definition and types

Subject: Re: Question about variable definition and types
From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx>
Date: Thu, 06 Mar 2008 22:24:27 +0000
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.