RE: xslt 1.0 namespace on output doc
> should get transformed by: > <?xml version="1.0" encoding="UTF-8" ?> > <xsl:stylesheet version="1.0" > xmlns="http://www.w3.org/1999/xhtml" > xmlns:xhtml="http://www.w3.org/1999/xhtml" <snip/> > <xsl:template match="/"> > <html lang="de" xml:lang="de"> > > into the following xhtml (apart from white-space, and well, not really <snip/> > <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"> <snip/> > > But only Transformiix (Fx 1.5.01) gives me the expected > result, whereas > SAXON 6.5.5 and MSXML 3 both add > xmlns:xhtml="http://www.w3.org/1999/xhtml" > to the html element. With XSLT 1.0, the majority are usually in the right. The specification says that for a literal result element (such as <html>) all namespace nodes that are in-scope for that element in the stylesheet are copied to the result document. This includes the namespace node that maps the prefix "xhtml" to the URI "http://www.w3.org/1999/xhtml" You might be able to prevent this happening with exclude-result-prefixes. This isn't guaranteed to work, however: some processors will ignore the exclude-result-prefixes if the namespace in question is one that is actually used in the result tree. This is conformant behavior because XSLT 1.0 basically says the serializer can add any namespaces it wants. By contrast, the behavior you are seeing from Transformiix appears to be non-conformant. 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