|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Extracting an attribute value only
<xsl:template match="content">
<page name="{@page}">
<xsl:apply-templates/>
</page>
</xsl:template>
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Sebastian Tennant [mailto:sebyte@xxxxxxxxxxxxxxx]
> Sent: 16 January 2006 13:12
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Extracting an attribute value only
>
> Hi all,
>
> I have an XML doc that begins:
>
> <?xml version="1.0">
> <?xml-stylesheet href="ss.xsl" type="text/xsl" ?>
> <content page="welcome">
> [...]
> </content>
>
> I'd like to create a new XML doc using XSLT that takes the value of
> the page attribute and assigns it to a new attribute in the document
> element of the result tree, like this:
>
> <?xml-version="1.0">
> <page name="welcome">
> [...]
> </page>
>
> I'm going round in circles!
>
> TIA
>
> sdt
|
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








