RE: Question: Should namespace::* return anything?

Subject: RE: Question: Should namespace::* return anything?
From: Khun Yee Fung <kyeefung@xxxxxxxxxx>
Date: Fri, 17 Dec 1999 16:25:24 -0500
I modified the code for the tool to give this behaviour. Now my problem is
this: I ran the expression: //namespace::*. What should the result be?

>From the spec:

		Elements never share namespace nodes: if one element node is
not the same node as another element node, then none of the namespace nodes
of the one element node will be the same node as the namespace nodes of
another element node.

For instance, if the XML document is as follow:

<?xml version='1.0?>
<top>
  <second/>
</top>

and the expression is "//namespace::*". Are there two nodes (albeit looking
identical) in the final nodeset or there is one node in the final nodeset,
or there is no node in the final nodeset? Of course, the final option is,
the expression is not valid.

Thanks.

Khun Yee

		-----Original Message-----
		From:	Ray Waldin [mailto:rwaldin@xxxxxxxxxxx]
		Sent:	Friday, December 17, 1999 2:54 PM
		To:	xsl-list@xxxxxxxxxxxxxxxx
		Subject:	Re: Question: Should namespace::* return
anything?

		Khun Yee Fung wrote:
		> How about namespace::*? Is it the same as
namespace::node() or the result is
		> always an empty nodeset?

		My understanding is that namespace::* returns an empty
node-set for all context
		nodes except when the context node is an element.  For
element nodes it should
		always return a node-set with at least one namespace node,
the node representing
		the "built-in" namespace (prefix="xml",
		uri="http://www.w3.org/XML/1998/namespace";), plus a node for
each namespace
		that's been declared in the element itself or any of it's
ancestors.

		-Ray


		 XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread