W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > April 2008

[closed] Re: re p:iteration-source

From: Norman Walsh <ndw@nwalsh.com>
Date: Thu, 17 Apr 2008 12:57:49 -0400
To: public-xml-processing-model-comments@w3.org
Message-ID: <m2ej94pgfm.fsf@nwalsh.com>
/ James Fuller <james.fuller.2007@gmail.com> was heard to say:
| In addition, I would propose adding to p:iteration-source an attribute
| that would throw an error if the @select matches nothing e.g.
|
| <p:iteration-source
|   select? = XPathExpression
|  @fail-if-empty='true/false'>
|     (p:empty |
|       (p:pipe |
|        p:document |
|        p:inline)+)?
| </p:iteration-source>
|
| where if @fail-if-empty is set to true (defaults to false) a dynamic
| error is thrown if @select matches nothing.

The WG discussed this and decided that if it was applied to for-each
it would also need to be applied to viewport. And then, why not also
to rename, and perhaps other places.

On balance, we observe that the following XPath 2.0 workaround will
catch the error

  select="(expression) treat as element()+"

so we're not going to add this for V1.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Things work out best for those who make
http://nwalsh.com/            | the best of the way things work out.

Received on Thursday, 17 April 2008 16:58:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 17 April 2008 16:58:27 GMT