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
--~------------------------------------------------------------------
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>
--~--