RE: Follow-up question wrt the previous post

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