This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I propose to have a non-normative example in the spec how to check constraints on the global rules. Example: the constraint that an its:locInfoRule element must not have both an its:locInfo child element and an @its:locInfoPointer attribute. We could give an example of a schematron document that describes what to check. <schema xmlns="http://www.ascc.net/xml/schematron" > <ns prefix="its" uri="http://www.w3.org/2005/11/its"/> <pattern name="Check ITS Global Rules Constraint"> <rule context="its:locInfoRule"> <report test="its:locInfo and @its:locInfoPointer">An its:locInfoRule element must not have both an its:locInfo child element and an @its:locInfoPointer attribute.</report> <!-- <assert test="@name">AAA misses attribute name.</assert> <report test="@name">AAA contains attribute name.</report>--> </rule> </pattern> </schema> Out of this, we generate an xslt stylesheet via e.g. the existing schematron processor skeleton1-5.xsl: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns:its="http://www.w3.org/2005/11/its" version="1.0" its:dummy-for-xmlns=""> <xsl:template match="*|@*" mode="schematron-get-full-path"> <xsl:apply-templates select="parent::*" mode="schematron-get-full-path"/> <xsl:text>/</xsl:text> <xsl:if test="count(. | ../@*) = count(../@*)">@</xsl:if> <xsl:value-of select="name()"/> <xsl:text>[</xsl:text> <xsl:value-of select="1+count(preceding-sibling::*[name()=name(current())])"/> <xsl:text>]</xsl:text> </xsl:template> <xsl:template match="/"> <xsl:apply-templates select="/" mode="M1"/> </xsl:template> <xsl:template match="its:locInfoRule" priority="4000" mode="M1"> <xsl:if test="its:locInfo and @its:locInfoPointer"> <xsl:apply-templates mode="schematron-get-full-path"/> <xsl:text>An its:locInfoRule element must not have both an its:locInfo child element and an @its:locInfoPointer attribute.</xsl:text></xsl:if> <xsl:apply-templates mode="M1"/> </xsl:template> <xsl:template match="text()" priority="-1" mode="M1"/> <xsl:template match="text()" priority="-1"/> </xsl:stylesheet> Applying this stylesheet to the erronous file <its:documentRules xmlns:its="http://www.w3.org/2005/11/its"> <its:locInfoRule its:select="//p" its:locInfoPointer="@existing-locInfo"> <its:locInfo>New locInfo</its:locInfo> </its:locInfoRule> </its:documentRules> Will give the following result: /its:documentRules[1]/its:locInfoRule[1]/its:locInfo[1] An its:locInfoRule element must not have both an its:locInfo child element and an @its:locInfoPointer attribute.
closed after discussion at http://www.w3.org/2006/04/18-i18nits-minutes.html#item07 , felix to integrate the result in the spec.
Closed, no further action necessary.