W3C home > Mailing lists > Public > www-forms@w3.org > August 2006

Re: url params et al

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Fri, 25 Aug 2006 15:11:06 -0700
Message-ID: <44EF757A.70308@orbeon.com>
To: www-forms@w3.org


> while I go with most of what you say, I don't see any use case for AVTs 
> within @ref, @nodeset or MIP attributes. These are XPath expressions by 
> nature, so anything expressible with AVTs is expressible without them, 
> e.g. ref="{/myexpr}" can be written as ref="*[name()=/myexpr]".
> Is it just to late for me and I'm missing sth obvious ?

Your example above is incorrect. What this does:


is tell the @ref attribute that its actual value must be evaluated by 
first executing the content of the brackets as an XPath expression. The 
result of that expression is then used itself as an XPath binding 
expression (because that's the semantic of @ref). Say you have:


This turns @ref into:


If on the other hand I have:


Then @ref turns into:


And you can of course have more complex uses of AVTs, like:


The point is that with AVTs, what you are actually doing is telling the 
XForms processor to evaluate XPath expressions that have been built at 
runtime after the XForms engine initialization. So you need the 
capability to execute such expressions. Standard XForms can't do it at 
all. Standard XSLT can't do it except with AVTs, or with the evaluate() 
extension function that every XSLT processor provides.

As far as I know you can't write an equivalent XPath expression as you 
suggest: you either need AVTs or an evaluate() function.

This said my feeling is that are not many use cases for AVTs in @ref, 
and I personally wouldn't push too much for this at the moment.


Orbeon - XForms Everywhere:
Received on Friday, 25 August 2006 22:11:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:18 UTC