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

XSLT Extension Instructions invoking Named Templates #168

Closed
michaelhkay opened this issue Sep 30, 2022 · 8 comments
Closed

XSLT Extension Instructions invoking Named Templates #168

michaelhkay opened this issue Sep 30, 2022 · 8 comments
Labels
Enhancement A change or improvement to an existing feature Tests Needed Tests need to be written or merged XSLT An issue related to XSLT

Comments

@michaelhkay
Copy link
Contributor

This feature is already present in the draft specification; the issue is being raised to seek WG endorsement of the change.

See section 10.1.3 of the draft.

The change is self contained with no dependencies. It adds no new functionality, merely syntactic convenience.

@ndw
Copy link
Contributor

ndw commented Oct 3, 2022

👍 👍 👍

@ChristianGruen ChristianGruen added XSLT An issue related to XSLT Enhancement A change or improvement to an existing feature labels Oct 3, 2022
@michaelhkay
Copy link
Contributor Author

See also issue #92 which proposes a modification to the propsed spec.

@kosek
Copy link

kosek commented Jun 2, 2023

I would like to extend this proposal and allow sequence constructor inside extension instruction. I'm using such instructions in my code and it would be nice to be able to rewrite them to pure XSLT 4.0 code. Sequence constructor could be mapped to predefined parameter name. E.g.

<t:_>Hello world.</t:_>

Would be translated to

<xsl:call-template name="t:_">
  <xsl:with-param name="xsl:input">Hello world.</xsl:with-param>
</xsl:call-template>

@michaelhkay michaelhkay added the Requires confirmation Text is in the current draft but requires WG review and acceptance label Jul 16, 2023
@Arithmeticus
Copy link
Contributor

What if anything would prevent an application of the same convenience to functions as well?

How likely is it that a writer or reader might confuse an extension instruction with a result tree element or vice versa? Is there a way to mitigate the potential confusion? Probably not, other than inculcating a habit of not using a namespace for both functionality and output.

@Arithmeticus
Copy link
Contributor

Answered my own second question, of course less than a minute after sending, namely, the guardrail of extension instructions.

@ndw
Copy link
Contributor

ndw commented Jun 4, 2024

Jirka will raise his idea for an extension as a separate issue.

@ndw
Copy link
Contributor

ndw commented Jun 11, 2024

The CG agreed to close this issue without further action at meeting 081

@ndw ndw closed this as completed Jun 11, 2024
@michaelhkay
Copy link
Contributor Author

For clarification: the issue was to seek WG confirmation of the status quo text, which is now approved. Note that there is no PR.

@michaelhkay michaelhkay added Tests Needed Tests need to be written or merged and removed Propose Closing with No Action The WG should consider closing this issue with no action Requires confirmation Text is in the current draft but requires WG review and acceptance labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A change or improvement to an existing feature Tests Needed Tests need to be written or merged XSLT An issue related to XSLT
Projects
None yet
Development

No branches or pull requests

5 participants