Subject: Re: [xsl] Why does using the XSL namespace default namespace preclude literal result elements in the empty namespace? From: Aaron Hope <edh@xxxxxxxxxxxxx> Date: Sat, 21 Jul 2001 15:37:36 -0400 |
Yes, please, "Why" is exactly what i'm looking for.Because namespace-alias is used to swap one namespace for another. It has nothing to do with what prefix the XSLT processor uses in the output: you do not get any control over this, though most processors try to follow what is in the input. It is a feature of the namespace recommendation that the empty namespace cannot be associated with a prefix. I.e. you can say xmlns="" but not xmlns:null="". If you want the empty namespace in the output, then you have to reserve the default namespace for literal result elements. I guess somebody somewhere knows why?
I suppose this is the most attractive approach. Thanks for the suggestion!
One way to address this problem, and other perceived shortcomings of XSLT syntax, is to write a stylesheet which takes something like
<stylesheet> <template match="/"> <h:html/> </template> </stylesheet>
and produces
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
<xsl:template match="/"> <html/> </xsl:template> </xsl:stylesheet>
Its not hard. Though you will have to understand what namespace-alias really does, and you may end up finding out more than you really want to know about white space handling ;-)
Regards, Trevor Nash -- Traditional training & distance learning, Consultancy by email
Melvaig Software Engineering Limited
voice: +44 (0) 1445 771 271 email: tcn@xxxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Why does using the XSL na, Trevor Nash | Thread | Re: [xsl] Why does using the XSL na, Aaron Hope |
Re: [xsl] Why does using the XSL na, Aaron Hope | Date | Re: [xsl] Why does using the XSL na, Aaron Hope |
Month |