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

[XSLT Streaming] My code visits descendant nodes twice

Subject: [XSLT Streaming] My code visits descendant nodes twice ... why don't I get an error?
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Thu, 29 Aug 2013 18:05:35 +0000
 [XSLT Streaming] My code visits descendant nodes twice
Hi Folks,

According to the XSLT specification, when using streaming the XSLT code can
only visit descendant nodes once. In the below code I copy all the child Book
elements (visit #1) and then I count the number of child Book elements (visit
#2). The code works without any errors. Why? It seems like I should have
gotten an error since I visited the child Book elements more than once.

    <xsl:template match="BookCatalogue" mode="streaming">
        <BookStore>
            <xsl:copy-of select="Book"/>
            <NumberOfBooks><xsl:value-of
select="count(Book)"/></NumberOfBooks>
        </BookStore>
    </xsl:template>

/Roger

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.