atom feed7 messages in com.eccnet.eccnet.schematron[Schematron-love-in] problem with inc...
FromSent OnAttachments
Jan Peter HeckingJun 5, 2007 7:21 am.sch, .xml, .sch
David CarlisleJun 5, 2007 8:46 pm 
Jan Peter HeckingJun 5, 2007 10:36 pm 
George Cristian BinaJun 6, 2007 2:57 am 
Jan Peter HeckingJun 6, 2007 6:42 am 
David CarlisleJun 6, 2007 5:12 pm 
ChrisNov 28, 2007 10:01 am 
Subject:[Schematron-love-in] problem with includes
From:David Carlisle (d.p.@googlemail.com)
Date:Jun 5, 2007 8:46:01 pm
List:com.eccnet.eccnet.schematron

your posted example didn't use include but I suspect you are hitting the bug Ken reported here:

http://eccnet.eccnet.com/pipermail/schematron-love-in/2007-May/000686.html

In the version of the skeleton at my blog, I use the following fix:

<!-- ISO INCLUDE -->

<xsl:template match="iso:include[not(normalize-space(@href))]" priority="1"> <xsl:if test=" $debug = 'false' "> <xsl:message terminate="yes">Schema error: Empty href= attribute for include directive.</xsl:message> </xsl:if>

</xsl:template>

<!-- Extend the URI syntax to allow # refererences --> <xsl:template match="iso:include"> <xsl:variable name="document-uri" select="substring-before(concat(@href,'#'), '#')"/> <xsl:variable name="fragment-id" select="substring-after(@href, '#')"/>

<xsl:choose> <xsl:when test="$fragment-id"> <xsl:apply-templates select="document( $document-uri,/ )//iso:*[@id= $fragment-id ]"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="document( $document-uri,/ )/*"/> </xsl:otherwise> </xsl:choose> </xsl:template>