RE: HELP! XT is putting namespaces in output tag attributes ...

Subject: RE: HELP! XT is putting namespaces in output tag attributes ...
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 28 Jan 2000 09:38:40 -0000
> > Some of my output tags are getting the stylesheet namespace 
> added in their
> > 
> > <aTag  xmlns:enabler="<http://www.jclark.com/xt/java/XSLEnabler>"
> > xmlns="<http://www.w3.org/TR/REC-html40>">...</aTag>

Not with the angle brackets in the URI, surely?

> > 
> > some other tags are just getting this one :
> > 
> > <aTag2 xmlns=""></aTag2>
> > 
> >  Why is it doing this ?

When you copy a literal result element to the result tree, all its namespace
nodes are copied too, unless you ask for them not to be. This is what's in
the spec, if you want to know why it's in the spec, don't ask me!

> > 
> >  How can I get it not to do this  ?

I can't answer for what's currently in xt, but in standard XSLT, you can
suppress a namespace from
the output by specifying exclude-result-prefixes="enabler" on the
xsl:stylesheet element, or by designating it as an extension namespace using
extension-element-prefixes.

SAXON supports both these features :-)

Mike Kay
 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread