Re: Option syntax

On 5/31/07, Norman Walsh <ndw@nwalsh.com> wrote:
> / Jeni Tennison <jeni@jenitennison.com> was heard to say:
> [...]
> | I understand the argument that it'd be a pain for implementers to
> | provide context to all XPath expressions while still providing
> | efficient applications, but given a choice between least surprise to
> | users and least work to implementers, I'm going to opt for the former.
> | In all other cases (eg <p:for-each>, <p:viewport>, <p:choose>), we say
> | that the default readable port provides the context if one isn't
> | specified explicitly.
>
> Yes. I've never thought of options in these terms, but I concede that
> the principle of least surprise applies.
>
> | In the case of <p:choose> (where you also have
> | to evaluate an XPath expression), it's a dynamic error if the default
> | readable port gives a sequence: if you prefer that rule to picking the
> | first document, I'd be happy with that.
>
> Yes, I like that better.
>

Hum...interesting

It just recall me that I would never be able to make something like this
<p:choose>
  <p:when test="....is the input a sequence...">
  </p:when>
</p:choose>

I would propose a p:occurence component, that will do something like
p:count but only give 3 possible answers : 0, 1, + (so will need small
buffering)

Mohamed
-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 €

Received on Friday, 1 June 2007 22:12:48 UTC