- From: Peter Nunn <peter.nunn@vistic.net>
- Date: Sat, 14 Apr 2007 15:22:20 +1200
- To: www-forms@w3.org
- Message-ID: <462048EC.2010704@vistic.net>
Ivan, I think the wording of point 2 is not that the nodes must have a common parent, rather the namespace must be the same. (or that is how I see it) consider: <?xml version="1.0" encoding="UTF-8"?> <instance xmlns="http://tempuri.org/ns1" xmlns:ns1="http://tempuri.org/ns1"> <base-colors> <color>blue</color> <color>red</color> </base-colors> <mixed-colors xmlns="http://tempuri.org/ns2"> <color>orange</color> <color>safron</color> </mixed-colors> </instance> the xpath expression "//*:color" returns the nodes: <blue> <red> <orange> <safron> However the nodeset is not consistent in respect to a repeat element as it violates rule 2 in that orange and safron do not share a common namespace. "//color" returns the nodes: <blue> <red> which is consistent with rule2. While this is a constructed example it serves to illustrate the meaning of the specification. While the specification says the behavior is non-deterministic, my personal view is that when an xpath returns a collection of nodes that do not share a common namespace then a binding error should occur.
Received on Saturday, 14 April 2007 03:22:17 UTC