This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Generating namespace declarations given a result tree?
On Thu, 18 May 2000 12:18:58 +0700 James Clark <jjc@jclark.com> wrote:
> John-Paul Sicotte wrote:
> XSLT says you're supposed to output a tree T so that if you parsed it
> back in again and constructed a tree using the XSLT data mdel you would
> get a tree T' that was the same as T except that
>
> - the order of attributes in T' and T may be different
> - T' may have namespace nodes that are not in T
I read this several times before I sent the mail but one critical thing
never clicked in: the tree must be the same including the namespace
nodes. I was always wondering what "the same" meant with regards to
elements (ie. what about prefixes) but if the namespaces nodes must be
the same all of this becomes clear.
> In this specific case, if you didn't output the namespace declarations
> for jpns[1-3] then T would have namespace nodes that T' did not. That's
> not one of the differences that's allowed: XSLT only allows the
> converse. So you must output the namespace declarations for jpns[1-3].
If the namespace nodes need to be the same then the prefixes must
remain as well.
> If XSLT didn't do this, it would be difficult to use XSLT to transform
> XSLT stylesheets.
Or anything that used xpath expressions as attribute values which was
my direct concern.
> James
Thanks very much
John-Paul
----------------------
John-Paul Sicotte
Software Composer
MessagingDirect
mailto:John-Paul@MessagingDirect.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list