This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Why does using the XSL namespace default namespace preclude literal result elements in the empty namespace?
Trevor Nash wrote:
>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?
>
Yes, please, "Why" is exactly what i'm looking for.
>
>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 ;-)
>
I suppose this is the most attractive approach. Thanks for the suggestion!
As to the "perceived" part, don't you see this as a shortcoming?
Personnaly I find
such unnecessarily low signal to noise ratios mildly offensive. (Messy
in life,
anal retentive in code ;) It was one of the most off-putting things
about xsl
when we first met, an "Eww, gross" factor that kept me away for quite
awhile.
I've since become aclimated to xml, and, well, I see xsl as our only
chance for
a semantic web. I *have* to like it.
aaron
>
>Regards,
>Trevor Nash
>--
>Traditional training & distance learning,
>Consultancy by email
>
>Melvaig Software Engineering Limited
>voice: +44 (0) 1445 771 271
>email: tcn@melvaig.co.uk
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
>.
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list