Skip to content

Commit

Permalink
[mod-sbs] Fixes to @text-transform
Browse files Browse the repository at this point in the history
- Don't ignore 'close' (bug)
- Don't fall back to 'single-word' when 'close' is not defined.

see #38 (comment)
  • Loading branch information
bertfrees committed Oct 14, 2016
1 parent 469e266 commit 4d1eeef
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/main/resources/xml/handle-downgrading.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@
TODO: check if string
-->
<xsl:attribute name="open" select="$props[@name='open']/@value/substring(., 2, string-length(.)-2)"/>
<xsl:if test="not($props[@name='close'])">
<!--
TODO: check if string
-->
<xsl:attribute name="close" select="$props[@name='close']/@value/substring(., 2, string-length(.)-2)"/>
<xsl:if test="not($props[@name='open'])">
<xsl:message terminate="yes"
select="concat('@text-transform &quot;',$name,'&quot; does not define &quot;close&quot;')"/>
</xsl:if>
<!--
TODO: check if string
-->
<xsl:attribute name="close" select="$props[@name='close']/@value/substring(., 2, string-length(.)-2)"/>
</css:text-transform>
</xsl:if>
</xsl:for-each>
Expand Down Expand Up @@ -142,7 +144,7 @@
<xsl:variable name="name" as="xs:string" select="."/>
<xsl:variable name="def" as="element()" select="$text-transform-defs[@name=$name]"/>
<brl:literal>
<xsl:value-of select="$def/(@close,@single-word)[1]"/>
<xsl:value-of select="$def/@close"/>
</brl:literal>
</xsl:for-each>
</xsl:if>
Expand Down

0 comments on commit 4d1eeef

Please sign in to comment.