Subject: Re: [xsl] xpath query From: Colin Paul Adams <colin@xxxxxxxxxxxxxxxxxx> Date: Sun, 20 Jan 2008 16:05:07 +0000 |
>>>>> "Sean" == Sean Tiley <sean.tiley@xxxxxxxxx> writes: Sean> I guess fundamentally I do not understand how the processor Sean> applies the stylesheet templates to the xml document. Sean> Say I have the followng XML Sean> <root> <file name="test.java"> <error line="4" Sean> message="Message1" severity="2"/> <error line="67" Sean> message="Message2" severity="4"/> </file> <file Sean> name="code.java"> <error line="2" message="Message1" Sean> severity="2"/> <error line="54" message="Message2" Sean> severity="4"/> <error line="122" message="Message1" Sean> severity="2"/> </file> </root> Sean> Then as the processor processes the tree for this xml file, Sean> it finds the <root> element, then looks for a template that Sean> matches it. It would find the identity template and invoke Sean> this template. At this point, what does it put out to the Sean> result tree if anything? A recap of what the identity template looks like. here is one form. <xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template> If this is the template that proves to be the best match for your element named root, then the processor will perform an xsl:copy of that element.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xpath query, Sean Tiley | Thread | Re: [xsl] xpath query, Sean Tiley |
Re: [xsl] xpath query, Sean Tiley | Date | Re: [xsl] xpath query, Sean Tiley |
Month |