|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Problem with iterating through a sequence of integ
Hi Andrew, > It seems an odd requirement (I've never needed to > process a sequence in this way) - maybe you could > define the requirements a little more fully? I am creating a tutorial on XPath! (oddly enough) To demonstrate how an XPath expression is evaluated, I have an XSLT for-loop that iterates over each value in the sequence specified by the XPath: <xsl:for-each select="XPath Expression"> -- if the value is a node, -- then show the node; otherwise (it's -- an atomic value) show the atomic value. </xsl:for-each> So, I tried to implement it like this: <xsl:for-each select="XPath Expression"> <xsl:choose> <xsl:when test=". instance of node()"> <xsl:apply-templates select="." /> </xsl:when> <xsl:otherwise> <xsl:value-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:for-each> /Roger
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. 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
|







