You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Gary L Peskin <ga...@firstech.com> on 2000/10/16 19:52:14 UTC

Re: Requirements suggestion for Gary: (Was: [XalanJ-1.2D02] NodeSet extension... Null Pointer Exception)

Didier Villevalois wrote:
> 
> Hello Gary,
> Ok, I used nodeset all this saturday and sunday and goes to the
> following conclusions:
> 
> So if you want to anticipate the use of XSLT 1.1, you should return:
> 
> - a node-list if the rtf contains more than one node (as now)
> - a single node if the rtf contains only one node

Nodeset currently returns a node-list consisting of a single node.  This
is in conformance with XSLT 1.0, section 11.1 which states "A result
tree fragment is treated equivalently to a node-set that contains just a
single root node."

So, if the RTF contains only one node, it seems like under this
definition, we should return a node-set containing a root node that is
the parent of the RTF node.

It doesn't seem consistent that, if there is only one node in the RTF,
then that node should be directly accessible in the node-set.  So, in
your example

<xsl:variable name="toto">
              <myNode />
</xsl:variable>

It seems like $toto in XSLT 1.1 should be a root node whose child node
is the element myNode.

> 
> 2) It seems that nodeset() lose namespace declarations. So when i
> nodeset-ize an rtf that contains namespace-qualified element names i
> can't make any matching on the resulting nodeset as the mapping
> between my prefixes and my namespace-uris does not exist for this
> nodeset.
> 
> This is very strange and i didn't succeed in understanding what was
> wrong in the nodeset code. (in fact i didn't took too much time for
> this...)
> 

I didn't take namespace handling into account when first writing
nodeset.  In addition, I think the namespace handling has maybe changed
somewhat although I'm easily confused these days between XalanJ1 and
XalanJ2.

I'll look into it in the next day or two after I get some other stuff
finished and post any changes.

Thanks for your input.

Gary