[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Why does using the XSL namespace default namespace

Subject: Re: 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
aaron hope
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@xxxxxxxxxxxxx


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


.






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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.