W3C home > Mailing lists > Public > xproc-dev@w3.org > December 2008

Re: Associating an option with a step

From: Norman Walsh <ndw@nwalsh.com>
Date: Tue, 16 Dec 2008 13:53:16 -0500
To: XProc Dev <xproc-dev@w3.org>
Message-ID: <m2zliwt0ir.fsf@nwalsh.com>
"Dave Pawson" <dave.pawson@gmail.com> writes:

> The CR has
>
> <p:xslt name="generate" version="2.0">
>   <p:input port="source">
>     <p:empty/>
>   </p:input>
>   <p:input port="stylesheet">
>     <p:inline>
>       <xsl:stylesheet version="2.0">
>         ...
>       </xsl:stylesheet>
>     </p:inline>
>   </p:input>
>   <p:with-option name="template-name" select="'someName'"/>
> </p:xslt>
>
> If there were 5 <p:input/> statements,
> how to know which one the option is associated with?

The option is associated with the *step* not the input. So it wouldn't
matter.

> 5.7.3 says
> It is a static error (err:XS0031) to use an option name in
> p:with-option if the step type being invoked has not declared an
> option with that name.
>
> Is that the way the CR tells me of this 'link' between option values
> and steps? A positive assertion may be clearer? However.

Elsewhere, it tells you that you can declare options in a
declare-step. And shows you the declaration for p:xslt.

> What if there are two xslt steps in scope? And two corresponding p:with-options?
> (I see 'It is a static error (err:XS0004) to include more than one
> p:with-option with the same option name as part of the same step
> invocation.')
> I.e. I'm avoiding this error by saying I want to execute two
> transforms, one starting with template A and one with template B.
> Is that  not currently possible?

You can't have two p:xslt steps "in scope" because they don't nest. And
options are nested inside steps.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | A great deal may be done by severity,
http://nwalsh.com/            | more by love, but most by clear
                              | discernment and impartial
                              | justice.--Goethe

Received on Tuesday, 16 December 2008 18:54:00 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 16 December 2008 18:54:00 GMT