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

Allow tokens in xsl:mode/@name #3

Closed
yamahito opened this issue Nov 30, 2020 · 5 comments
Closed

Allow tokens in xsl:mode/@name #3

yamahito opened this issue Nov 30, 2020 · 5 comments
Labels
Enhancement A change or improvement to an existing feature Propose Closing with No Action The WG should consider closing this issue with no action XSLT An issue related to XSLT

Comments

@yamahito
Copy link

A minor request:

I find I often want to re-use the same behaviours across modes, or use related modes across similar content.

In the xsl:template and xsl:apply-templates, we can use a space separated list of mode names: it would be convenient if I could do the same thing in xsl:mode instructions.

@michaelhkay
Copy link
Contributor

michaelhkay commented Dec 2, 2020

You mean something like

<xsl:mode name="a" on-no-match="fail" />
<xsl:mode name="b" on-no-match="deep-skip"/>
<xsl:mode name="a b" typed="no"/>

with some rule for combining the multiple declarations as with xsl:output and xsl:decimal-format?

Having a list of names on a single declaration would be a departure from current practice and the implications would need working through; we currently have cases where we allow multiple declarations for one component, but not the other way around.

@yamahito
Copy link
Author

yamahito commented Dec 2, 2020

I was thinking more like

<xsl:mode name="a b" on-no-match="fail"/>
<xsl:mode name="c d" on-no-match="deep-skip"/>

rather than allowing for combinations.

@rhdunn rhdunn added XSLT An issue related to XSLT Enhancement A change or improvement to an existing feature labels Sep 14, 2022
@michaelhkay
Copy link
Contributor

I guess the semantics aren't actually that complex; we just define

<xsl:mode name="a b" on-no-match="fail"/>
as an abbreviation for

<xsl:mode name="a" on-no-match="fail"/>
<xsl:mode name="b" on-no-match="fail"/>

But it's not at all clear to me that it's really a usability improvement.

@ChristianGruen ChristianGruen changed the title [xslt] Allow tokens in xsl:mode/@name Allow tokens in xsl:mode/@name Apr 27, 2023
@michaelhkay
Copy link
Contributor

On balance, I think the complexity exceeds the benefits, and I'm going to propose closing with no action.

@michaelhkay michaelhkay added the Propose Closing with No Action The WG should consider closing this issue with no action label Jun 14, 2023
@yamahito
Copy link
Author

Sad face :(

But understandable.

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 Propose Closing with No Action The WG should consider closing this issue with no action XSLT An issue related to XSLT
Projects
None yet
Development

No branches or pull requests

3 participants