W3C home > Mailing lists > Public > xproc-dev@w3.org > October 2013

RE: No more parameter ports

From: Toman, Vojtech <vojtech.toman@emc.com>
Date: Wed, 9 Oct 2013 03:14:24 -0400
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <F3C7EBECE80AC346BE4D1C5A9BB4A41F2FA2252359@MX11A.corp.emc.com>
> Ok, then there are to things that are a drag about that:
> 1. That you have to declare the params at all.
> 2. That you have to provide a value to pass in.
> 
> #2 seems to be the worse of the two. What if you have in your xslt:
> 
> <xsl:param name="blah">
>  <xsl:choose>
>   <!-- some logic here that only happens if nothing is passed in -->
> </xsl:choose> </xsl:param>
> 
> Now you have to move that logic into the xpl as well? Or refactor the
> xslt so that you take in a dummy param and then test the dummy param
> and do the logic if it's not the default value?

A good point. This could perhaps be solved/improved if we work on our "unspecified optional option" story. For example, we might say that the following works if $optional-option is not specified (param would remain unspecified):

<p:with-param name="param" select="$optional-option"/>

Regards,
Vojtech

--
Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
vojtech.toman@emc.com
http://developer.emc.com/xmltech
Received on Wednesday, 9 October 2013 07:15:10 UTC

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