Re: Is it possible to apply an XSL file on the childs of one nod

wxdqz

New Member
Perform the first match on the root of the node you're passing. If at allpossible, you should upgrade to use the newer XSLT namespace rather than theolder XSL namespace that you're using now.<?xml version='1.0'?><xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"><xsl:template match="/"><table border="0"><tr><td><xsl:for-each select="./paragraph"><xsl:value-of select="paragraph"/></xsl:for-each></td></tr></table></xsl:template></xsl:stylesheet>>"Dimitri De Blomme" <[email protected]> wrote in messagenews:[email protected]...>> Hi,>> I'm a beginner in XML.> I have an XML file with the following structure> <document>> <section id="1">> <paragraph id="1">> </paragraph>> <paragraph id="2">> </paragraph>> </section>> <section id="2">> <paragraph id="1">> </paragraph>> <paragraph id="2">> </paragraph>> </section>> </document>>> I have the following code in my ASP page (to position on the 1st section):>> Set objNode = objXML.SelectSingleNode("document/section[@id='1']")>> And I would like to apply an XSL file on the selected node (all theparagraphs> of the selected node)> Response.Write(objNode.transformNode(objXSL))>> I can't find how to do that in my XSL file.> Is it possible to do a <xsl:template match="CURRENT NODE"> ?>> <?xml version='1.0'?>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">> <xsl:template match="???">> <table border="0">> <tr>> <td>> <xsl:for-each select="./paragraph">> <xsl:value-of select="paragraph"/>> </xsl:for-each>> </td>> </tr>> </table>> </xsl:template>> </xsl:stylesheet>>>> Thank you.> Dimitri.>
 
Back
Top