[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XForms Annotations (was Annotations in XPath-NG?)
> 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" [1], 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 properties? > 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. html Python/Web Services column: xmlrpclib - http://www-106.ibm.com/developerworks/w ebservices/library/ws-pyth10.html
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|