This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4691 - Clarify that sch:rule/@context expression can't use deref() function
Summary: Clarify that sch:rule/@context expression can't use deref() function
Alias: None
Product: SML
Classification: Unclassified
Component: Core (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: Second draft
Assignee: Virginia Smith
QA Contact: SML Working Group discussion list
Keywords: resolved
Depends on: 4618
  Show dependency treegraph
Reported: 2007-06-22 00:20 UTC by Pratul Dublish
Modified: 2007-08-23 09:08 UTC (History)
0 users

See Also:


Description Pratul Dublish 2007-06-22 00:20:47 UTC
The non-normative text about Rules should include some verbiage to clarify that the context expression for Schematron rules is NOT an XPath query and it can not make use of deref() function.  This bug is related to 4618 and Action
Comment 1 Virginia Smith 2007-07-05 18:59:48 UTC
Contingent on Action 102.
Comment 2 Kumar Pandit 2007-08-03 01:31:42 UTC
Summary of this issue:
a. The schematron rule context is interpreted according to the Production 1 of XSLT. The matching semantic is identical to that of XSLT's xsl:template/@match attribute.
b. xslt patterns do not allow function calls except in a predicate.
c. Consequently, we cannot have deref() fn call in the rule context. For example, context expression such as <sch:rule context="smlfn:deref(sm:Applications/sm:Application)"> is invalid.
Comment 3 Virginia Smith 2007-08-23 09:08:45 UTC
The paragraph in Section 4 following the 1st code sample is changed to:

A Schematron pattern embedded in the xs:annotation/xs:appinfo element for a complex type definition or an element declaration is applicable to all instances of the complex type or element. In the above example, the pattern Length is applicable for all elements whose type is IPAddress or a derived type of IPAddress. A pattern element contains one or more rules and a rule element contains one or more assert and/or report elements. Each rule specifies its context using the context attribute. This context expression is evaluated in the context of each applicable element and results in an element node set for which the assert and report test expressions defined in the rule are evaluated. The context expression is defined as an XSLT Pattern. This means that the smlfn:deref function may not be used in the location path of a context expression.