[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Recursive call trouble
> I've made some changes according to what you've > provided. Now when the template is called I'm getting an unknown XSLT > error. unknown to the system or unkonown to you? (It's best to quote the error exactly) > I'm using Xalan as my parser. Xalan is not a parser, you are probably using xerces as your parser, xalan is the XSLT engine. > <!-- How I'm trying to start the Recursive call --> > <xsl:template match="floordoc"> > ... a match template only says what to do if you applly templates to a matching node, it doesm't by itself, cause any code to run. <!-- The modified Recursive call --> <xsl:template match="floordoc/bill/title" name="intro"> unless you have title elements in other places you can probably just write <xsl:template match="title" name="intro"> <xsl:variable name="num" select="string-length(.)" /> when I suggested to use . here I was assuming that you were starting off by applying templates to a title element and this templat ewill fire becuase of the match attribute, in which case the current element would be title and . would do the right thing, but for some reasdon you are calling this by name from your floordoc template so in that case the current node is floordoc. so . would select teh floordoc element not title. I suspect you want to keep . here but get rid of teh call-template in the floordoc template. <xsl:value-of select="substring(floordoc/bill/title/para/text(), If the current node is title (or even if it is floordoc) then the xpath floordoc/bill/title/para/ will select nothing unless the current elemnt has a floordoc child. You want . here. <xsl:value-of select="substring(floordoc/bill/title/para/text(), same again David
|
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
|