-
Notifications
You must be signed in to change notification settings - Fork 3
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
Annotations #18
Comments
Norman Walsh writes:
Is that different from meta-data? I presume so, but I didn't understand ht
[mail from me always has a .sig like this -- mail without it is forged spam] |
this is about meta data on the step itself ... to be able to introspect ... though we could achieve the same with a concept of read only option I guess. |
James Fuller writes:
Example? Still not getting it, sorry. ht
[mail from me always has a .sig like this -- mail without it is forged spam] |
https://www.w3.org/TR/xquery-30/#id-annotations annotations in XQuery are the closest analog ... with RESTXQ being a good example usage http://exquery.github.io/exquery/exquery-restxq-specification/restxq-1.0-specification.html |
It's just a form of structured metadata that can be used for the purposes of introspection. Consider this example from XQuery: declare %foo function name() {...} The "%foo" part is an annotation. I can, at runtime, ask what annotations does a particular function have or ask for a list of all of the functions that have a particular annotation. These can be used directly by the processor but they can also be used by users as an extension point. As an example of the former, consider the case where you want to define a module of XProc steps and flows. Perhaps it is convenient to modularize the code in a particular way such that there is a "flushthemanifolds" step or flow but you do not want that step or flow to be part of the module's public API. We could define an annotation, %private, that has the effect of making any step or flow so annotated invisible outside of the module. Then you could have: step publicSomething() { ... flushthemanifolds() ... } Anyone importing this module can call the two public steps but cannot call the %private one. An example of user extension would be using annotations to identify steps or flows that have particular REST semantics. It's very handy. |
Norman Walsh writes:
Thanks, got it. ht
[mail from me always has a .sig like this -- mail without it is forged spam] |
It would be nice to provide annotations as well.
The text was updated successfully, but these errors were encountered: