Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is p:xslt for XSLT 3.0 able to handle static parameters? #363

Closed
martin-honnen opened this issue Mar 3, 2020 · 6 comments
Closed

Is p:xslt for XSLT 3.0 able to handle static parameters? #363

martin-honnen opened this issue Mar 3, 2020 · 6 comments
Assignees

Comments

@martin-honnen
Copy link

@martin-honnen martin-honnen commented Mar 3, 2020

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 its parameters 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.

@gimsieke

This comment has been minimized.

Copy link
Contributor

@gimsieke gimsieke commented Mar 3, 2020

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.

@xatapult

This comment has been minimized.

Copy link
Contributor

@xatapult xatapult commented Mar 18, 2020

We're going to add a static-parameters to p:xslt

@xatapult xatapult self-assigned this Mar 18, 2020
@gimsieke

This comment has been minimized.

Copy link
Contributor

@gimsieke gimsieke commented Mar 18, 2020

@ndw Is there an RNC for the steps somewhere?

@ndw

This comment has been minimized.

Copy link
Collaborator

@ndw ndw commented Mar 19, 2020

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.

@gimsieke

This comment has been minimized.

Copy link
Contributor

@gimsieke gimsieke commented Mar 19, 2020

Ok, then @xatapult can “do the needful” all by himself

@ndw

This comment has been minimized.

Copy link
Collaborator

@ndw ndw commented Mar 19, 2020

Yes, indeed. Sorry that went right past me on the call yesterday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.