|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: "Query about retrieving attribute value as well as
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
|
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
|

Cart








