[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] another xpath question
I have another xpath question for you :) If I have the following simplified XML snippet: === <xref xrefid="AA140110301W10AA" xidtype="TEXT"/> <title> Renew LP Piston Seal (Fig 5.5.1 <xref xrefid="F5.5.1" xidtype="FIGURE">) </xref> </title> === and the following xsl templates: <xsl:template match="xref"> (xref) </xsl:template> <xsl:template match="title"> <xsl:value-of select="."/> </xsl:template> I get the following output: (xref) Renew LP Piston Seal (Fig 5.5.1) It matches the first xref correctly, but not the second xref that is within the <title> tags. If I modify the title template to: <xsl:template match="title"> <xsl:value-of select="."/> <xsl:apply-templates/> </xsl:template> I get the output: (xref) Renew LP Piston Seal (Fig 5.5.1) (xref) Whereas the output I want is (xref) Renew LP Piston Seal (Fig 5.5.1(xref)) //the (xref) will be a graphic... Why is it moving the (xref) outside of the (fig) brackets?? And, why will it not match the inner <xref> without calling apply-templates? I thought it would look for a template match whenever it encountered a tag. thanks in advance andrew XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|