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

Re: p:option not required without default value

From: Innovimax SARL <innovimax@gmail.com>
Date: Fri, 29 Aug 2008 15:44:26 +0200
Message-ID: <546c6c1c0808290644o5401f4cev6e51011ddeeb2323@mail.gmail.com>
To: "Henry S. Thompson" <ht@inf.ed.ac.uk>
Cc: "Norman Walsh" <ndw@nwalsh.com>, public-xml-processing-model-wg@w3.org

Here is what XSLT 2.0 does

[[
If an optional parameter has no select  attribute and has an empty
sequence constructor, and if there is no as attribute, then the
default value of the parameter is a zero length string.
]]

Mohamed

On Fri, Aug 29, 2008 at 3:32 PM, Henry S. Thompson <ht@inf.ed.ac.uk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Norman Walsh writes:
>
>> "Innovimax SARL" <innovimax@gmail.com> writes:
>>
>>> Nothing is said in the spec about what to do if we have the following
>>> pipeline
>>>
>>> <p:pipeline xmlns:p="http://www.w3.org/ns/xproc" xmlns:ix="
>>> http://www.innovimax.fr/ns">
>>>     <p:declare-step type="ix:test">
>>>         <p:input port="source"/>
>>>         <p:output port="result"/>
>>>         <p:option name="not-required-no-default"/>
>>>         <p:choose>
>>>             <p:when test="$not-required-no-default">
>>>                 <p:identity/>
>>>             </p:when>
>>>             <p:otherwise>
>>>                 <p:filter select="/*"/>
>>>             </p:otherwise>
>>>         </p:choose>
>>>     </p:declare-step>
>>>     <ix:test/>
>>> </p:pipeline>
>>
>> You're right. That either has to be an error or we have to specify what
>> the default default value for options.
>
> The empty node set.  That way testing it will fail, which is surely
> what you want.
>
> Hmm.  Problem is that there is no XPath equivalent of 'boundp'. . .
>
> I can see arguments either way.  Flbssst. . .
>
> ht
> - --
>       Henry S. Thompson, School of Informatics, University of Edinburgh
>                         Half-time member of W3C Team
>      10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
>                Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
>                       URL: http://www.ltg.ed.ac.uk/~ht/
> [mail really from me _always_ has this .sig -- mail without it is forged spam]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
>
> iD8DBQFIt/pQkjnJixAXWBoRAum3AJ0RrJN3NyK7wyntd/kvKKHMQMR/8ACfROCi
> fVdf9UuN8SazooZv1XaEwTk=
> =b9vF
> -----END PGP SIGNATURE-----
>
>



-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Friday, 29 August 2008 13:45:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 29 August 2008 13:45:05 GMT