Comments (6)
@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 tofn:true()
, which some people prefer overtrue()
(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.
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.
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.
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.
I'm happy with adding an xquery
(or alternatively xq
) namespace for this to the static context.
from qtspecs.
I'm happy with adding an
xquery
(or alternativelyxq
) namespace for this to the static context.
π for xq
from qtspecs.
Related Issues (20)
- fn:sort, array:sort: Parameter names
- fn:deep-equal: unordered β ordered
- Function identity: documentation still too vague HOT 11
- Introduce a Kollection object with functions that operate on all types of items that can be containers of unlimited number of "members" HOT 23
- Type "Promotion" in the coercion rules HOT 2
- XQFO: under/unused variable apparatus HOT 2
- [Editorial] Incorrect terminology: function implementation is now function body
- Better support for typed maps HOT 41
- Should predicate callbacks use EBV? HOT 1
- The rules for the "tail position" of a sequence constructor need to take account of xsl:switch HOT 1
- map:values() - Would it be better to return an array? HOT 2
- Obsolete comment under fn:deep-equal()
- Precision of duration arithmetic
- String comparison in deep-equal HOT 6
- Canonical serialization HOT 3
- Remove fn:numeric-compare HOT 1
- Coercion rules: implicit types
- Module import: apparent contradiction HOT 2
- fn:iterate-while β fn:while-do, fn:do-until
- fn:scan-left and fn:scan-right - produce accumulation of results HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtspecs.