Subject: Re: [xsl] "Query about retrieving attribute value as well as node value" From: Jörg Heinicke <joerg.heinicke@xxxxxx> Date: Mon, 1 Oct 2001 14:56:25 +0200 |
XSL doesn't manipulate the source-document, but building a new one. So you have in your output-document "in theory" many attributes with it's values but no elements. You have to copy the element-nodes too. Look at the changed XSL. Furthermore I changed the namespace as the other posters said already. Joerg > <?xml version="1.0"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > <xsl:template match="/"> > <xsl:apply-templates/> > </xsl:template> > > <xsl:template match="root"> > <xsl:copy> > <xsl:apply-templates/> > </xsl:copy> > </xsl:template> > > <xsl:template match="para"> > <xsl:copy> > <xsl:for-each select="style"> > <xsl:attribute name="color"> > <xsl:value-of select="@color1"/> > </xsl:attribute> > <xsl:attribute name="size"> > <xsl:value-of select="@size1"/> > </xsl:attribute> > <xsl:attribute name="face"> > <xsl:value-of select="@face1"/> > </xsl:attribute> > <xsl:value-of select="."/> > </xsl:for-each> > </xsl:copy> > </xsl:template> > > </xsl:stylesheet> > > Regards > > Bikash Paul XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] "Query about retrieving attri, Bikash Paul | Thread | [xsl] child nodes containing a stri, Carmelo Montanez |
Re: [xsl] Problems passing attribut, David Carlisle | Date | [xsl] Best way to have user decide , Hewko, Doug |
Month |