RE: Dealing with unbound options

> Someone please tell me I'm having a brain cramp. I want to write a
> recursive-directory-list step. It starts out like this:
> 
> <p:declare-step type="cx:recursive-directory-list">
>   <p:output port="result"/>
>   <p:option name="path" required="true"/>
>   <p:option name="include-filter"/>
>   <p:option name="exclude-filter"/>
>   <p:option name="depth" select="-1"/>
>   
>   <p:directory-list>
>     <p:with-option name="path" select="$path">
>       <p:empty/>
>     </p:with-option>
>     <p:with-option name="include-filter" select="$include-filter">
>       <p:empty/>
>     </p:with-option>
>     <p:with-option name="exclude-filter" select="$exclude-filter">
>       <p:empty/>
>     </p:with-option>
>   </p:directory-list>
> </p:declare-step>
> 
> Except that the reference to $include-filter is an error if the
> include-filter option wasn't specified on the call to
> cx:recursive-directory-list.
> 
> I think I remember talking about this. Someone please tell me we
> thought of a solution.

I think the pipeline produces err:XD0023 - "It is a dynamic error if an
XPath expression is encountered which cannot be evaluated (because it is
syntactically incorrect, contains references to unbound variables or
unknown functions, or for any other reason)."

But... I am afraid think something has gone wrong here. You once started
a thread on xproc-dev (using the very same pipeline :-)

http://lists.w3.org/Archives/Public/xproc-dev/2009May/0116.html

Now, if you look at the meeting minutes from May 28 2009:

http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2009M
ay/0021.html)

you will see that we agreed on adding a new XPath extension function to
test for unbound options. But somehow this decision was never
incorporated into the draft.

Regards,
Vojtech

Received on Friday, 16 October 2009 07:44:19 UTC