W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2011

RE: Non-required options cannot be empty?

From: Geert Josten <geert.josten@dayon.nl>
Date: Thu, 24 Nov 2011 18:26:05 +0100
Message-ID: <bde26e3df88b4222ca259e86fcd7bc72@mail.gmail.com>
To: Florent Georges <fgeorges@fgeorges.org>
Cc: XProc Dev <xproc-dev@w3.org>
   RE: Non-required options cannot be empty?

That would indeed be an option, or use the XPath 2.0 if in
XMLCalabash, *if*I would have control over the
declarations. But I am talking about the options of p:xslt:

<p:declare-step type="p:xslt">

      <p:input port="source" sequence="true" primary="true"/>

      <p:input port="stylesheet"/>

      <p:input port="parameters" kind="parameter"/>

      <p:output port="result" primary="true"/>

      <p:output port="secondary" sequence="true"/>

      <p:option name="initial-mode"/>                               <!--
QName -->

      <p:option name="template-name"/>                              <!--
QName -->

      <p:option name="output-base-uri"/>                            <!--
anyURI -->

      <p:option name="version"/>                                    <!--
string -->


'' and () are not accepted as default values for these. :(

Kind regards,


-----Oorspronkelijk bericht-----
Van: fgeorges@gmail.com [mailto:fgeorges@gmail.com <fgeorges@gmail.com>]
Namens Florent Georges
Verzonden: donderdag 24 november 2011 18:19
Aan: Geert Josten
CC: XProc Dev
Onderwerp: Re: Non-required options cannot be empty?

On 24 November 2011 18:02, Geert Josten wrote:

> Yeah, was afraid someone was going to mention that. But how about 4

> non-required option?  I would have to consider 24 possible

> combinations..

  That might be a sign that you should use parameters instead?  But I

agree, having a static XPath error when dereferencing an option which

has simply not been specified is rather extreme...  On the other hand,

if a default value is acceptable to you, then just use one (remember

though that options are strings, so use '' instead of ()).



Florent Georges


Received on Thursday, 24 November 2011 17:26:53 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:09 UTC