W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2009

RE: Follow-up question wrt the previous post

From: <Toman_Vojtech@emc.com>
Date: Thu, 14 May 2009 08:06:47 -0400
Message-ID: <6E216CCE0679B5489A61125D0EFEC7870F8C5303@CORPUSMX10A.corp.emc.com>
To: <xproc-dev@w3.org>
> 
> So, if I want to detect and handle specially the case where an
> optional option has not been specificed, how can I do so?
> 
> Using p:try seems awfully heavyweight.
> 
> In XSLT, I can distinguish between the empty string and the empty node
> set, so we see the common idiom
> 
>  <xsl:param name="foo" select="xyzzy"/>
> 
> But since XProc options are always string-valued, there's no obvious
> default which can be reliably distinguished from a supplied value.

The processor is supposed to report err:XD0023 (instead of throwing a
NPE :-) in the case when the XPath expresison refers to an unbound
option. I don't see any other option than using a p:try/p:catch block
here...

Regards,
Vojtech
Received on Thursday, 14 May 2009 12:07:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 14 May 2009 12:07:44 GMT