|
[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
It's clear to me now that my original question wasn't.
I wanted to be able to write a stylesheet like <stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:html="http://www.w3.org/1999/xhtml" version="1.0"> <!-- plus a little magic here to tell the xslt processor that the
"http://www.w3.org/1999/xhtml" namespace should map to the null
namespace -->
<output method="html"/><template match="/">
<html:html>
<html:head><html:title>My Title</html:title></html:head>
<html:body>My Body (lies over the sea...)</html:body>
</html:html>
</template>
</stylesheet>and get valid html output. What you get from xalan (and it's correct as far as i can tell) is a bunch of xml nodes in the http://www.w3.org/1999/xhtml namespace. <namespace-alias stylesheet-prefix="html" result-prefix="#none"/> seemed like the obvious way to achieve the desired result. I asked my original question largely because it seemed like a deficiency in the standard. It's simply something that I SHOULD be able to do! The creators of the XSLT standard went so far as to create an element specifically designed to map stylesheet nodes in one namespace into another. I understand that this was for the purpose of making stylesheets that could products stylesheets, but why not include the ablity to map to and from the empty namespace? Xalan for one won't even map the empty namespace if it's the #default. Is it just because the xslt processors would have to make sure that the empty namespace is never 'in' a namespace (e.g. xmlns:html="")? This hardly seems sufficient. But then I've never written a stylesheet processor ;). I'd still like a definitive answer: why can't I do that? aaron PS, I hate to sound like i'm whining, but I want to either fix the spec or find out why it's not broken. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








