Closed martin-honnen closed 4 years ago
Independent of how the XProc processors compile/invoke XSLT, there is probably currently no way to pass static parameters to p:xslt
. We probably need to introduce a new map option static-parameters
for p:xslt
whose value is ignored for XSLT versions less than 3. Whether XProc processors that claim to support XSLT 3 are required to “do the right thing” with them or whether support is implementation-defined needs to be discussed, primarily between Achim and Norm.
We're going to add a static-parameters
to p:xslt
@ndw Is there an RNC for the steps somewhere?
No. The RELAX NG grammar for steps is generated automatically from the p:declare-step
declaration. If you, for example, add a new parameter there, it will automatically be reflected in the RNC/RNG for XProc 3.0.
Ok, then @xatapult can “do the needful” all by himself
Yes, indeed. Sorry that went right past me on the call yesterday.
In XSLT 3 a new feature of static parameters was introduced where you can declare e.g.
<xsl:param name="param1" static="yes" as="xs:string" select="'foo | bar'"/>
and then you can use them in so called shadow attributes e.g.<xsl:template _match="{$param1}">...</xsl:template>
.Is
p:xslt
for XSLT version 3.0 supposed to be able to allow setting such static parameters with itsparameters
option?I think, for instance for Saxon 9.9, this requires setting them on the compiler before you compile the XSLT code and not on the Xslt30Transformer before you apply-templates or call-template, as you can do with normal parameters.