|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: unwanted xmlns="" attribute
> 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/
|
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








