Altova Mailing List Archives

[xsl] Why does using the XSL namespace default namespace preclude literal result elements in the empty namespace?

From: Aaron Hope <edh@------------->
Date: 7/20/2001 11:52:00 PM
I know that's a long subjetct but the instructions said to be specific...

I've got a stylesheet with 80-90% of elements in the xsl namespace, the 
rest being literal result elements destined for html output.  All those 
xsl: prefixes add up to a lotta noise, and well, i can't help but feel 
there should be a way to avoid it.  If what i gather from the 1.0 spec 
is correct, then these elements can't simply be in an html: namespace 
(html 4.0 or xhtml, say).  I know I can replace them with <element> and 
<attribute> tags, but, again, that's a lot of noise and you end up 
putting in c-like terminator comments, e.g. </element><!-- table -->. 
At first I read the namespace-alias entry and I said "Ooh, there we 
go!", but no, since you can't have empty namespaces other than the 
default, there's no way to set the result namespace to the null namespace.  

So, after all that here's my question: why can't i say

<namespace-alias stylesheet-prefix="html" result-prefix="#none"/>?  (or 
#empty or #null, etc)

I don't get it, did somebody forget that part of the spec?

Or is there some other trick that i'm not aware of?

Vender-specific extensions?

I looked briefly at the 1.1 working draft and the 2.0 requirements, and 
didn't see any provisions for this.  Am I missing something?

Thanks in advance for any info,

PS, relevent portions of specs below

PPS, I apologize if i'm asking a question answered in the archives or 
FAQ.  I did consult those sources, and came up empty.

The |html| output method should not output an element differently from 
the |xml| output method unless the expanded-name of the element has a 
null namespace URI; an element whose expanded-name has a non-null 
namespace URI should be output as XML.

[Definition:] If the attribute name matches | PrefixedAttName 
|, then the | NCName 
<> | gives 
the *namespace prefix*, used to associate element and attribute names 
with the namespace name 
<> in the 
attribute value in the scope of the element to which the declaration is 
attached. In such declarations, the namespace name may not be empty.

[Definition:] If the attribute name matches | DefaultAttName 
<> |, 
then the namespace name 
<> in the 
attribute value is that of the *default namespace* in the scope of the 
element to which the declaration is attached. In such a default 
declaration, the attribute value may be empty.

XSL-List info and archive:


These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.