You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.
(2) Even passing an arbitrary value of "true" for $attributes at
invocation still does not add the attribute pattern to the context
XPath because of the following top-level variable:
My understanding is that in XSLT top-level variables are evaluated
assuming the context of the document node of the input
document. This document node has no parent. The "and
parent::node()" expression above will always evaluate to false,
thus never adding "@*|" to the XPath expression. My read of the
above is that in this stylesheet it is impossible to trigger the
inclusion of attributes in the search contexts of the stylesheet
created by Schematron. Why would it have been included and how was it tested?
I have suggested the user hack the above to be:
<xsl:if test="$attributes='true'">@*|</xsl:if>
... and to use "attributes=true" on the command line when invoking
the stylesheet with a fragmented Schematron schema in order to avoid
the auto-detect bug of not looking for attributes in rules of
included Schematron fragments.
The text was updated successfully, but these errors were encountered:
Robbert
added a commit
to Robbert/schematron
that referenced
this issue
Mar 7, 2017
Ken Holman raised this issue:
(2) Even passing an arbitrary value of "true" for $attributes at
invocation still does not add the attribute pattern to the context
XPath because of the following top-level variable:
<xsl:variable name="context-xpath">
<xsl:if test="$attributes='true' and parent::node() ">@|</xsl:if>
xsl:choose
<xsl:when test="$only-child-elements='true'"></xsl:when>
<xsl:when test="$visit-text='true'">node()</xsl:when>
xsl:otherwise*|comment()|processing-instruction()</xsl:otherwise>
</xsl:choose>
</xsl:variable>
My understanding is that in XSLT top-level variables are evaluated
assuming the context of the document node of the input
document. This document node has no parent. The "and
parent::node()" expression above will always evaluate to false,
thus never adding "@*|" to the XPath expression. My read of the
above is that in this stylesheet it is impossible to trigger the
inclusion of attributes in the search contexts of the stylesheet
created by Schematron. Why would it have been included and how was it tested?
I have suggested the user hack the above to be:
<xsl:if test="$attributes='true'">@*|</xsl:if>
... and to use "attributes=true" on the command line when invoking
the stylesheet with a fragmented Schematron schema in order to avoid
the auto-detect bug of not looking for attributes in rules of
included Schematron fragments.
The text was updated successfully, but these errors were encountered: