[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: pulling a document with a null namespace into a na

Subject: RE: pulling a document with a null namespace into a namespace
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Sun, 10 Aug 2003 17:17:44 +0100
null name space
Write a stylesheet containing the following template rule:

<xsl:template match="*">
<xsl:element name="w:{local-name()}" namespace="http://wibble.com/ns">
  <xsl:copy-of select="@*"/>
  <xsl:apply-templates/>
</xsl:element>
</xsl:template>

Michael Kay

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Michael Clark
> Sent: 08 August 2003 17:16
> To: XSL List (XSL-List@xxxxxxxxxxxxxxxxxxxxxx)
> Subject:  pulling a document with a null namespace into 
> a namespace
> 
> 
> I've tried, I really have, but I can't come up with a 
> solution to this.
> 
> Given some document with unknown elements (i.e., I can't 
> enumerate the elements inside the stylesheet for special 
> processing) in a null namespace:
> 
> <random>
> 	<elements baz="foo">qux</elements>
> </random>
> 
> Can I use XSLT to process this document and move it into a namespace:
> 
> <w:random xmlns:w="http://wibble.com/ns">
> 	<w:elements baz="foo">qux</elements>
> </w:random>
> 
> Thanks for reading!
> 
> Michael
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 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.