Re: Associating an option with a step

"Dave Pawson" <> 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

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

Norman Walsh <> | A great deal may be done by severity,            | more by love, but most by clear
                              | discernment and impartial
                              | justice.--Goethe

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