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

[xslt30] Dynamic context while evaluating template parameters #13

Open
michaelhkay opened this issue Jul 27, 2020 · 0 comments
Open

[xslt30] Dynamic context while evaluating template parameters #13

michaelhkay opened this issue Jul 27, 2020 · 0 comments

Comments

@michaelhkay
Copy link
Contributor

The context for evaluation of the default value of a template parameter is underspecified. For example, what happens if the sequence constructor contained within xsl:param invokes xsl:next-match?

In fact, I don't think the spec has a clear answer to the question of what the focus is when evaluating such a default value. For xsl:call-template the focus of the caller and callee are the same, so it's not really a problem. For apply-templates, they are different, and we don't clearly say. For xsl:iterate we're explicit that the dynamic context for xsl:param is the context of the callee; but that doesn't really work for variable references, because the "scope of variables" section says that the scope of a variable declared in xsl:param includes following-sibling xsl:param elements - so how can they be part of the static context of a following-sibling xsl:param without also being part of the dynamic context?

As regards xsl:next-match, which is what led me here:

§6.8 says "Whenever a template rule is chosen as a result of evaluating xsl:apply-templates, xsl:apply-imports, or xsl:next-match, the template rule becomes the current template rule for the evaluation of the rule’s sequence constructor." The xsl:param isn't part of the sequence constructor, so this would suggest it uses the caller's current template rule.

However §6.8 also says "These rules ensure that when xsl:apply-imports or xsl:next-match is called, the context item is the same as when the current template rule was invoked." But it seems unclear what the context item for evaluating the default value of an xsl:param in a template rule should be.

rhdunn pushed a commit to rhdunn/qtspecs that referenced this issue Dec 17, 2020
Cleanup some build errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant