RE: calabash: redefining standard step

> "James Fuller" <james.fuller.2007@gmail.com> writes:
> 
> > consider the following pipeline
> >
> > <p:pipeline name="pipeline"
> >             xmlns:p="http://www.w3.org/ns/xproc">
> >
> > <!-- should not evaluate this declare-step //-->
> > <p:declare-step name="test1" type="p:identity">
> >     <p:input port="source" sequence="true"/>
> >     <p:output port="result" sequence="true"/>
> >     <p:count/>
> > </p:declare-step>
> >
> > <p:identity/>
> >
> > </p:pipeline>
> >
> > should this not throw an error ? perhaps err:XS0002 or
> 
> It could throw err:XS0002, but I think we need a new error because
> an attempt to declare "p:my-new-step" should also fail.
> 
> In fact, the spec already forbids it:
> 
>   Except as described in Section 2.13, "Versioning Considerations",
>   the XProc namespace must not be used in the type of steps. Neither
>   users nor implementers may define additional steps in the XProc
>   namespace.
> 
> but through editorial carelessness, I seem to have forgotten to
> explicitly make it a static error.

Redeclaring of built-in steps (such as p:identity) is, I think, catched
by err:XS0036 ("All the step types in a pipeline must have unique names:
it is a static error if any step type name is built-in and/or declared
or defined more than once in the same scope.")

Regards,
Vojtech

Received on Thursday, 11 December 2008 15:34:24 UTC