Lists Home |
Date Index |
> I've been meaning to post something like this to xml-dev for awhile, now.
> XForms is probably a good data point to look at for XPath annotations, if
> I'm not misunderstanding the discussion.
> XForms is fully an XPath spec; brethren to XSLT and XPointer. As for
> annotations, XForms defines "model item properties" , such as "required",
> "relevant", "readonly", etc., which attach to the XPath 1.0 data model on a
> per-node basis. Form controls, which also attach to a particular node, alter
> their behavior based on the model item properties (which so far can all be
> represented as strings) at that node.
> >From an implementation standpoint, it would be nice to have a way to attach
> these extra properties to nodes.
The idea itself is similar to what we've been discussing here. I don't think
the binding mechanism defined in XForms is really suitable, since a general
XPath processor would not add anything to the source document, nor is there
really any place in the dat model for the bind elements themselves.
I also don't see in th XForms spec a mechanism for accessing bound properties.
Perhaps this is what leads to your next para...
> >From a standardization standpoint, it would be nice if XPath 2.0 included a
> way to access these properties. (We avoided defining accessor functions in
> XForms 1.0 because there are some non-trivial complications that can crop
> up, related to self-referential calculations, but that's firmly an XForms
> problem to solve)
In the general case, we seem to have two candidates: accessor functions and
special axes. Which one would you think works best with the XForms model
> We were mainly looking a function-based access, though I suspect that's just
> because extension functions are easier to plug into an existing
> implementation (compared to, say, a new axis)
Yes. My question above is more, if backward compat wasn't an issue, which way
would you lean?
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Apache 2.0 API - http://www-106.ibm.com/developerworks/linux/library/l-apache/
Python&XML column: Tour of Python/XML - http://www.xml.com/pub/a/2002/09/18/py.
Python/Web Services column: xmlrpclib - http://www-106.ibm.com/developerworks/w