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?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Why does using the XSL namespace default namespace preclude literal result elements in the empty namespace?
- From: Aaron Hope <edh at brioforge dot com>
- Date: Sat, 21 Jul 2001 15:16:35 -0400
- References: <3B593436.2050803@brioforge.com> <15193.34092.766000.83820@gargle.gargle.HOWL>
- Reply-To: xsl-list at lists dot mulberrytech dot com
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