Subject: Re: [xsl] Setting default namespace in document output with <xsl:result-document>|
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Mon, 25 Apr 2011 23:03:15 +0100
I'm wondering how to set the default namespace in, say, the<html> tag of an output document when creating the document with<xsl:result-document>.
I would like the<html> tag to look like this:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Right now it looks like this:
<html xml:lang="en" lang="en">
If this were the main output document, then I could use "exclude-result-prefixes #default" in the stylesheet declaration, but I need the equivalent for<xsl:result-document>. Or maybe if I can get the namespace declaration in the<html> tag, then Saxon will not output it in the<meta> and<link> elements.Yes, if you generate the html element in the correct namespace, the namespace declarations on its children will become redundant and therefore won't be generated by the serializer.
I'm using the version of Saxon 9.x that comes with the DITA Open Toolkit 1.5.2.
Michael Kay Saxonica