Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate default namespace for elements from the default namespace for types #372

Closed
michaelhkay opened this issue Feb 26, 2023 · 3 comments · Fixed by #715
Closed

Separate default namespace for elements from the default namespace for types #372

michaelhkay opened this issue Feb 26, 2023 · 3 comments · Fixed by #715
Labels
Enhancement A change or improvement to an existing feature Requires confirmation Text is in the current draft but requires WG review and acceptance XPath An issue related to XPath

Comments

@michaelhkay
Copy link
Contributor

Currently the static context provides a "default namespace for elements and types". It's not at all clear why these should be the same. For types, the vast majority of QNames representing types are in the XML Schema namespace, which is never used for elements.

In the current 4.0 drafts the two default namespaces are separated; but this has not been reviewed or agreed by the CG. This issue is raised for discussion of the change, and I will also review the design to see whether it still make sense.

Some observations on the current text for XQuery:

  1. In section 2.2.1 (static context) it would be good to give a bit more detail (if only as a forwards reference) about the circumstances in which the default element namespace and the default type namespace are used.
  2. In 3.4 Sequence Types the sentence "[Lexical QNames]appearing in a [sequence type] have their prefixes expanded to namespace URIs by means of the [statically known namespaces] and (where applicable) the [default element namespace] or [default type namespace]" is rather inelegantly worded. If there is a prefix, then the statically known namespaces are used; if there is none, then the relevant default namespace is used, and it would be nice to explain more clearly which one applies.
  3. In 3.6 Item Types, we need to be clearer about references to named/declared item types, and about how the names are resolved. Do we really want these names to be in the same symbol space as atomic types? Perhaps we should have a rule that Item Types (like functions) must be in a namespace and this must not be the same as an imported schema namespace.
  4. In 5.14, Default namespace declaration, there seems to be duplication between the two paragraphs starting "for backwards compatibility reasons"
  5. Appendix C.1 (much though I dislike it) should say something about the initialisation of the default namespaces for elements and for types.

Note that issue #65 talks of the need for different default namespaces for input and output elements. I think that's a separate issue.

Observations on the current text for XSLT:

  1. In 5.1.2.1 the paragraph "The [xsl:]xpath-default-namespace attribute must be in the [XSLT namespace] if and only if its parent element is not in the XSLT namespace needs to be generalised to [xsl:]default-element-namespace. In fact, this rule should move to the parent section 5.1.2, which needs an introduction.
@ChristianGruen ChristianGruen added XPath An issue related to XPath Enhancement A change or improvement to an existing feature labels Mar 13, 2023
@michaelhkay michaelhkay added the Requires confirmation Text is in the current draft but requires WG review and acceptance label Jun 14, 2023
@ndw
Copy link
Contributor

ndw commented Sep 19, 2023

At meeting 046, the CG concluded that there was not consensus for this change. It will be "rolled back" out of the specifications.

@ndw ndw closed this as completed Sep 19, 2023
@michaelhkay michaelhkay reopened this Sep 19, 2023
@michaelhkay
Copy link
Contributor Author

I don't think we should close the issue until we have written and applied the PR that implements the CG decision on the issue.

@ndw
Copy link
Contributor

ndw commented Sep 19, 2023

You're absolutely right. That was careless. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A change or improvement to an existing feature Requires confirmation Text is in the current draft but requires WG review and acceptance XPath An issue related to XPath
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants