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

Re: removing a null namespace

Subject: Re: removing a null namespace
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 29 Apr 2005 13:11:22 +0100
remove null
The XSLT system never changes the namespace of an element automatically.

You show output of

       <h1 xmlns="">header</h1>

so either

this is an h1 in no-namespace copied from the source, in which case you
don't want to use copy-of you want to apply a template that changes
elements in no-namespace to elements in the xhtml namespace

or

this is an h1 in no-namespace created in teh stylesheet, in which case
you want to change the stylesheet to create the element in teh xhtml
namespace.


It looks as if you have the first case, so your input isn't really
xhtml.

A template such as
<xsl:template match="*">
<xsl:element name="local-name()" namespace="http://www.w3.org/1999/xhtml">
<xsl:copy-of select="@*"/>
<xsl;apply-templates/>
</xsl:element>
</xsl:template>

will convert elements in no-namespace into xhtml namepsaced elements
with the same local name.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.