xsl-list
[Top] [All Lists]

[xsl] Setting default namespace in document output with <xsl:result-document>

2011-04-25 16:10:06

Hi, all.

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">

I would also like any <link> or <meta> elements in the <head> section to not 
contain namespace declarations. In other words, I want to avoid what I'm 
getting now, which is:

<meta xmlns="http://www.w3.org/1999/xhtml"; http-equiv="Content-Type" 
content="text/html; charset=utf-8"></meta>
.
<link xmlns="http://www.w3.org/1999/xhtml"; rel="copyright" 
href="../../dcommon/html/cpyr.htm" title="Copyright" type="text/html"></link>
.

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.

I'm using the version of Saxon 9.x that comes with the DITA Open Toolkit 1.5.2.

Thanks!

Steve Fogel
Oracle Corporation

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>