RE: Non-required options cannot be empty?

   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 -->

</p:declare-step>

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

Kind regards,

Geert

-----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 ()).

  Regards,

-- 

Florent Georges

http://fgeorges.org/

http://h2oconsulting.be/

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