[xquery-talk] Default element namespace: multiple declarations

Ghislain Fourny gfourny at inf.ethz.ch
Wed Nov 11 02:49:29 PST 2020


Dear Mike,

That's a good catch.

If we want to "save the spirit of the spec" while stretching its letter reasonably, my interpretation of

  "The schema import may [...] declare that target namespace to be the default element/type namespace"

is that a schema import that declares a default element/type namespace also literally constitutes a "default element/type namespace declaration" in an extended sense (in addition to the "vanilla" default element/type namespace declarations of 4.14).

As a consequence, my interpretation of

"A Prolog may contain at most one default element/type namespace declaration [err:XQST0066]."

would speak in favor of throwing XQST0066 for the query below.

Does this reasoning make sense?

Kind regards,
Ghislain

> On 11 Nov 2020, at 09:25, Michael Kay <mike at saxonica.com> wrote:
> 
> I can't see any rule that makes it an error to write
> 
> import schema default element namespace "http://example.org/abc";
> declare default element namespace "http://example.org/xyz";
> 
> This looks to me like an oversight in the spec.
> 
> I think Saxon simply uses whichever one comes last.
> 
> Any thoughts?
> 
> Michael Kay
> Saxonica
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk




More information about the talk mailing list