Giter Site home page Giter Site logo

Comments (6)

ChristianGruen avatar ChristianGruen commented on June 23, 2024 1

@rhdunn Thanks for your assessment.

I wanted to keep the %private and %public annotations rules unchanged (but I like your suggestion to revise the text).

The reasons for my suggestion are:

  • The annotation namespace URI is the only one for which no prefix exists.
  • The prefix-less syntax implies that the standard annotations have no namespace. With the prefix, you can make the prefix visible by writing %ann:public instead of %public. That’s similar to fn:true(), which some people prefer over true() (one difference certainly is that the default function namespace can be changed).

For existing users, nothing would change, and the ann prefix can always be overwritten.

from qtspecs.

rhdunn avatar rhdunn commented on June 23, 2024

Doesn't this cause an issue due to the annotation definitions being in an implicit "default annotation namespace"? I.e. %private, etc. would need to be %ann:private if the annotation namespace were made explicit, which would break XQuery.

err is given a name in the spec because it is referenced in many places in the spec. It's given a binding in XQuery 4.0 (3.1 didn't have this in the static context) to make it easier for users to write catch blocks.

The annotation namespace is used in various places in the spec, so this could be useful for that, but I think it would make the spec more confusing. Maybe something like:

A variable declaration may use annotations to specify that the variable is %private or %public (which is the default).

to:

A variable declaration may use one of the following annotations in the annotations namespace to specify that the variable is %private or %public (which is the default).

where annotations namespace is a definition link pointing to https://qt4cg.org/specifications/xquery-40/xquery-40.html#id-namespaces-and-qnames:

[Definition: The annotation namespace URI is http://www.w3.org/2012/xquery. ] It has no prefix and is reserved for use in this specification. It is currently used for annotations and option declarations that are defined by the XML Query Working Group.

This would be consistent and allow readers of the spec to know where to look to find the annotation namespace when reading e.g. the variable declaration section.

from qtspecs.

benibela avatar benibela commented on June 23, 2024

It is not an annotation namespace when it is used for annotations and options

And it is called http://www.w3.org/2012/xquery not http://www.w3.org/2012/annotations

This looks like it was supposed to be used for any feature that is XQuery-only.

Then the prefix should be xquery: if it gets any

from qtspecs.

ChristianGruen avatar ChristianGruen commented on June 23, 2024

It is not an annotation namespace when it is used for annotations and options

Good point, I missed this (although Reece quoted the relevant part of the spec). xquery would be fine as well.

from qtspecs.

rhdunn avatar rhdunn commented on June 23, 2024

I'm happy with adding an xquery (or alternatively xq) namespace for this to the static context.

from qtspecs.

ChristianGruen avatar ChristianGruen commented on June 23, 2024

I'm happy with adding an xquery (or alternatively xq) namespace for this to the static context.

πŸ‘ for xq

from qtspecs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.