This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Aaron Hope writes:
 > 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.  

The XSLT and HTML names are in different namespaces.  Those namespaces 
can not both be the default namespace at the same time.  What I do is
pick the one that it's the biggest nuissance to type the prefix for
(usially XSLT) as the default 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)

What's wrong with using the zero length string, as in

    <namespace-alias stylesheet-prefix="html" result-prefix=""/>

Admittedly, the one time I recall trying to do this it didn't work,
but I attributed that to a bug in the processor I was using, which was
beta software.



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]