Re: injecting options and parameters into XProc

/ "Vasil Rangelov" <boen.robot@gmail.com> was heard to say:
| This seems to create a bit of ambiguity I think.

No more or less than with xsl:param parameters, though, right?

| If another option is specified with the same reference, say
|    <p:option name="allow-version-mismatch" value="no"/>
|    <p:xslt2>
|      <p:input port="stylesheet">
|        <p:document href="stylesheet1.xsl"/>
|      </p:input>
| 	<p:option name="allow-collections"
| select="$allow-version-mismatch"/>
|       <p:option name="allow-version-mismatch"
| select="$allow-version-mismatch"/>
|    </p:xslt2>

Both allow-collections and allow-version-mismatch get the runtime value of
the pipeline's allow-version-mismatch option.

| What value does each option get? Take into account that the default value as
| by the p:xslt2 step is "true" i.e. "yes", not "no" as specified here.

Yes. I cant recall off the top of my head if we have an explicit
dynamic error for that.

| So, does the first option get the "no" because another option above the step
| has the same name as the referenced variable, or does it get the default
| value as declared by the step the option it is in? Both options are in
| scope, both having the same names.

The variables that are in-scope for reference on the p:xslt2 step are
only those that are declared among its ancestors.

| If there's any static or dynamic error here, where does the spec say it? If
| there aren't, what's the right behavior as per the spec, and which part(s)
| illustrate it?

Bullet 2 of 2.7 is supposed to be relevant but I'm not sure it's clear
enough. The options visible to a step are the ones among its
ancestors. A step can't see it's own options.

In 3.9, we find "It is a static error (err:XS0043) if any attribute
value does not satisfy the type required for that attribute" but I
think we need to make it clear that this is a dynamic error if the
value is computed at runtime.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | So, are you working on finding that bug
http://nwalsh.com/            | now, or are you leaving it until later?
                              | Yes.

Received on Wednesday, 10 October 2007 18:29:34 UTC