| From | Sent On | Attachments |
|---|---|---|
| Jan Peter Hecking | Jun 5, 2007 7:21 am | .sch, .xml, .sch |
| David Carlisle | Jun 5, 2007 8:46 pm | |
| Jan Peter Hecking | Jun 5, 2007 10:36 pm | |
| George Cristian Bina | Jun 6, 2007 2:57 am | |
| Jan Peter Hecking | Jun 6, 2007 6:42 am | |
| David Carlisle | Jun 6, 2007 5:12 pm | |
| Chris | Nov 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>






.sch, .xml, .sch