Re: [xslt] Re: more on the xslt namespace pipeline issue
- From: S Woodside <sbwoodside yahoo com>
- To: axkit-users axkit org, xslt gnome org
- Subject: Re: [xslt] Re: more on the xslt namespace pipeline issue
- Date: Fri, 4 Apr 2003 22:22:11 -0500
I have now updated to 1.0.29 of libxslt and the testcase I posted
earlier is working now. Daniel, sorry about wasting your time.
Robin Berjon wrote:
> When passing a DOM around, what I believe is the correct namespace
> information will be passed around. However when you save to an
> intermediate file you get this:
>
> <btest>
> <rngform xmlns="http://simonwoodside.com/rng";>
> <title>RNG Form</title>
> </rngform>
> </btest>
Now I am very confused about this difference between the DOM and the
serialized output. I have never used DOM.
Now I am running: Using libxml 20506, libxslt 10029 and libexslt 719
% xsltproc a_instance.xml
<?xml version="1.0"?>
<btest xmlns:simon="http://simonwoodside.com/rng">
<simon:rngform>
<title>RNG Form</title>
</simon:rngform>
</btest>
> As we can see, thanks to namespace defaulting, we now have:
>
> {}btest
> {http://simonwoodside.com/rng}rngform
> {http://simonwoodside.com/rng}}title
After reading http://www.jclark.com/xml/xmlns.htm it seems to me that
this is correct! Is there some difference between the inheritance of an
unprefixed name in input from a file as opposed to in output of a DOM?
> Which is an entirely different document. Properly serialising that
> would have required libxml to add xmlns='' on title, except that's
> only possible starting with namespaces 1.1. Another option would have
> been to add a random prefix to rngform, but that wouldn't be nice.
I can see now that adding the xmlns='' on title in the trace file gives
the same behaviour as AxKit uses internally, but
1) It is still different than the latest xsltproc's output
2) It seems to me that according to the rules of XSLT it is incorrect
(after re-reading the entire XSLT FAQ section on namespaces, I do not
see how this can be correct).
> Unless I am solidly mistaken on how XSLT should treat namespace
> contexts in xsl:element, the bug is yours and the AxKit processing
> pipeline expresses the most logical output.
It seems clear to me that on reading input files, the elements should
inherit an unprefixed namespace in XSLT ... and this is how AxKit
behaves in the first stage of the pipeline. Why should the rules change
in the intermediate stages? I am looking at this from a black-box
perspective, it seems to me that the results of the pipeline should be
exactly the same as the results of manually pipelining it, using
xsltproc.
My head hurts from this stuff.
Simon
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]