xsl-list
[Top] [All Lists]

RE: Extracting an attribute value only

2006-01-16 06:19:21
<xsl:template match="content">
  <page name="{(_at_)page}">
    <xsl:apply-templates/>
  </page>
</xsl:template>

Michael Kay
http://www.saxonica.com/ 

-----Original Message-----
From: Sebastian Tennant [mailto:sebyte(_at_)smolny(_dot_)plus(_dot_)com] 
Sent: 16 January 2006 13:12
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] 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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>