[xquery-talk] Namespace question wrt. XQTS and XQuery/XSLT2Serialization spec

Michael Kay mhk at mhk.me.uk
Sun Nov 13 19:01:01 PST 2005


I've re-run the tests using a modified version of deep-equal() that compares
namespace nodes. This found discrepancies in ten tests in the suite. In all
cases I believe that Saxon is right and the test is wrong. (In two cases the
test suite provides two alternative results, one of which is correct and one
incorrect.) I have bugged the relevant tests at

http://www.w3.org/Bugs/Public/show_bug.cgi?id=2520

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: talk-bounces at xquery.com 
> [mailto:talk-bounces at xquery.com] On Behalf Of Wolfgang Hoschek
> Sent: 13 November 2005 16:40
> To: talk at xquery.com
> Subject: [xquery-talk] Namespace question wrt. XQTS and 
> XQuery/XSLT2Serialization spec
> 
> I'm wondering what the correct output of the XML Output 
> Method of the  
> W3C XQuery/XSLT2 Serialization Spec is wrt. inclusion of namespaces  
> declared on ancestors in the context of subtrees. There are at least  
> two interpretations:
> 
> Example:
>          doc :=
>          <SOAP:a xmlns:SOAP="http://schemas.xmlsoap.org/soap/ 
> envelope/" xmlns:foo="http://example.com">
>              <b>
>                  <SOAP:c/>
>              </b>
>          </SOAP:a>
> 
> result sequence := /*:*/b
> 
> 1) Output method 1 adds all namespaces-in-scope to the subforest's  
> root, generating the following output:
> 
>          <b xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/"  
> xmlns:foo="http://example.com">
>              <SOAP:c/>
>          </b>
> 
> 2) Output method 2 omits superflous namespaces declarations, 
> treating  
> the subforest's root as if it had no ancestors:
> 
>          <b>
>              <SOAP:c xmlns:SOAP="http://schemas.xmlsoap.org/soap/ 
> envelope/"/>
>          </b>
> 
> I noticed that W3C XQTS requires method 2) at times due to Canonical  
> XML comparison, e.g. for SeqUnion/fn-union-node-args-015.xq et al.  
> Which one is correct?
> [I can easily implement either approach once it's clear which route  
> to prefer]
> 
> Thanks,
> Wolfgang.
> 
> 
> 
> 
> _______________________________________________
> talk at xquery.com
> http://xquery.com/mailman/listinfo/talk
> 




More information about the talk mailing list