Lists Home |
Date Index |
Michael Kay wrote:
> Yes, I think one thing we've learnt from the problems with "namespace
> nodes" is that representing all information in terms of nodes is a bad
> idea, because nodes carry too much baggage - they have identity, they
> belong to a document, they have a parent. Can two elements in different
> documents share a "type node"? If the context item is a "type node",
> what is the value of "/"?
I think the problem with namespace nodes is different in that they must coexist
with the other nodes in the *same* document. As I see it, this restriction wouldn't
apply to an annotation:: axis. What nodes and what document(s) they belong
to would not be specified in the XPath-NG specification. So without this restriction,
why not use nodes (elements, attributes, text etc) for type information (and other
annotations)? Why not use XML for type information structures in XPath? I mean,
the selector syntax is kind of built into the language it self :-). I see no reason to invent
something new here (however fun it may be).
To answer the question "If the context item is a "type node" what is the value of '/'"
you would have to check with the specification for the particulary type system you
And axis or not, I think it's really just a question of notation if you say
foo/annotation::psvi:type-definition or foo/annotation ('psvi:type-definition').