Skip to content

Commit

Permalink
Finally add comment to help future maintainers with debugging 3-pass …
Browse files Browse the repository at this point in the history
…RELAX NG pattern reduction code (which I wrote > 2 weeks ago).
  • Loading branch information
sydb committed Oct 26, 2023
1 parent f8f0e44 commit a720792
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions odds/odd2relax.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -225,21 +225,18 @@ of this software, even if advised of the possibility of such damage.
<xsl:apply-templates mode="pass3"/>
</xsl:for-each>
</xsl:variable>
<!-- The variable $pass3 is not really needed, but is left here to
make it easier to write debugging code. Remember, though,
that if you want to see what the intermediate stages look
like you cannot use <result-document>, because this template
is called from within a variable defintion. You can get
around this by outputing each intermediate stage ($pass1 &
$pass2) into the output file in addition to the final stage
($pass3). This makes for great debugging, but also for a
useless output RELAX NG schema, of course. You can see a
version of this in commit 522e84e from 2023-10-06.
— Syd, 2023-10-09 -->
<xsl:sequence select="$pass3"/>
<!--
<!-\- debugging output: -\->
<a:documentation> ========= above is pass3, next is pass2 ========= </a:documentation>
<rng:div xml:id="pass2">
<xsl:copy-of select="$pass2"/>
</rng:div>
<a:documentation> ========= above is pass2, next is pass1 ========= </a:documentation>
<rng:div xml:id="pass1">
<xsl:copy-of select="$pass1"/>
</rng:div>
<a:documentation> ========= above is pass1, next is input ========= </a:documentation>
<rng:div xml:id="pass0">
<xsl:copy-of select="/*"/>
</rng:div> -->
</xsl:template>

<xsl:template match="tei:moduleSpec">
Expand Down

0 comments on commit a720792

Please sign in to comment.