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

RE: unwanted xmlns="" attribute

Subject: RE: unwanted xmlns="" attribute
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 4 Oct 2004 10:55:26 +0100
xsl remove an attribute copy
> From an idealogical perspective it may very well be 
> unconventional to do 
> this, I'm trying to define a generic XSLT library that can be 
> imported 
> across all Syndication formats. RSS 0.91 is not namespace 
> qualified whereas 
> 1.0 is.
> 
> Generally the imported modules mean the same things though 
> they do not have 
> to, any thoughts?

Yes, I forgot that oddity of RSS. I would propose using a pipeline approach:
if you find RSS 0.91, first do a transform step that adds the namespaces,
then the rest of the transformation can be written on the basis that the
namespaces are there. A series of simple transformations is generally better
than a complex one that tries to handle everything at once.

A transformation to add namespaces is a simple variant of the identity
transform:

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

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

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.