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

Re: p:option not required without default value

From: Henry S. Thompson <ht@inf.ed.ac.uk>
Date: Fri, 29 Aug 2008 18:05:08 +0100
To: "Innovimax SARL" <innovimax@gmail.com>
Cc: "Norman Walsh" <ndw@nwalsh.com>, public-xml-processing-model-wg@w3.org
Message-ID: <f5bsksnpxa3.fsf@hildegard.inf.ed.ac.uk>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Innovimax SARL writes:


> [[
> 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.
> ]]

Yeah, but that's because its content is interpreted as a sequence
constructor, and in XSLT 1.0 it was a content spec., which defaulted
to the empty string, and so the above is for backwards compatibility.
p:option is necessarily empty.  The fact that uninitialised variables
and parameters are the empty string is a big source of bugs in XSLT,
in my experience.

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)

iD8DBQFIuCxEkjnJixAXWBoRAosKAKCBAcW5cuFl4+rAP5NbtMQeJ17xRgCfQw2v
qxA/gTXviN+yspVjVN4qfiU=
=DV1P
-----END PGP SIGNATURE-----
Received on Friday, 29 August 2008 17:05:51 GMT

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