Skip to content

Commit

Permalink
adjust diaries processing for new tei:seg/@type='accounting'
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstadler committed Feb 15, 2019
1 parent 4492a29 commit c6f11f7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions xsl/diaries.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</xsl:element>
</xsl:template>

<xsl:template match="tei:measure[@type='expense'][not(@rend='inline')]"/>
<xsl:template match="tei:measure[@type='expense' or ancestor::tei:seg/@type='accounting'][not(@rend='inline')]"/>

<xsl:template match="tei:measure">
<xsl:element name="span">
Expand Down Expand Up @@ -129,7 +129,7 @@
as well.
-->
<xsl:template match="tei:seg[@rend]" priority="1" mode="rightTableColumn">
<xsl:apply-templates select=".//tei:seg[@rend] | .//tei:measure[@type='expense'][not(@rend='inline')] | .//tei:lb | .//tei:pb" mode="#current">
<xsl:apply-templates select=".//tei:seg[@rend] | .//tei:measure[@type='expense' or ancestor::tei:seg/@type='accounting'][not(@rend='inline')] | .//tei:lb | .//tei:pb" mode="#current">
<xsl:with-param name="counter">
<xsl:number level="any"/>
</xsl:with-param>
Expand All @@ -146,16 +146,19 @@
this is the entry point for the right column.
Need to catch everything to process nested line
and page breaks.
There are several caveats:
* measure@rend='inline' need to be excluded because they will be output in the left column
* ancestor::tei:seg[@rend] need to be excluded, otherwise those measures will be duplicated by the rule above for `tei:seg[@rend]`
-->
<xsl:template match="*[parent::tei:ab]" priority="0.1" mode="rightTableColumn">
<xsl:apply-templates select=".//tei:seg[@rend] | .//tei:measure[@type='expense'][not(@rend='inline')] | .//tei:lb | .//tei:pb" mode="#current">
<xsl:apply-templates select=".//tei:seg[@rend] | .//tei:measure[@type='expense' or ancestor::tei:seg/@type='accounting'][not(@rend='inline')][not(ancestor::tei:seg[@rend])] | .//tei:lb | .//tei:pb" mode="#current">
<xsl:with-param name="counter">
<xsl:number level="any"/>
</xsl:with-param>
</xsl:apply-templates>
</xsl:template>

<xsl:template match="tei:measure[@type='expense'][not(@rend='inline')]" priority="0.5" mode="rightTableColumn">
<xsl:template match="tei:measure[@type='expense' or ancestor::tei:seg/@type='accounting'][not(@rend='inline')]" priority="0.5" mode="rightTableColumn">
<xsl:param name="counter"/>
<xsl:element name="span">
<xsl:attribute name="class">
Expand Down

0 comments on commit c6f11f7

Please sign in to comment.