[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

Subject: Re: "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 retrieving attributes
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.