lv:classify/@desc whitespace normalization during macropass

This allows for nice formatting with newlines (to avoid excessively long
lines) without affecting the output.

* src/current/include/preproc/expand.xsl
  (preproc:expand lv:classify/@desc): Normalize lv:classify/@desc whitespace
master
Mike Gerwitz 2016-10-25 11:40:08 -04:00
parent 5a9fb0d142
commit 0c2ef00e51
1 changed files with 20 additions and 1 deletions

View File

@ -497,7 +497,8 @@
</xsl:attribute>
</xsl:if>
<xsl:sequence select="@*" />
<xsl:apply-templates mode="preproc:expand"
select="@*" />
<!-- force @keep on @terminate -->
<xsl:if test="@terminate='true'">
@ -510,6 +511,24 @@
</xsl:template>
<!--
Normalize whitespace for class descriptions
-->
<xsl:template mode="preproc:expand" priority="5"
match="lv:classify/@desc">
<xsl:attribute name="desc"
select="normalize-space( . )" />
</xsl:template>
<!--
All other class attributes are copied verbatim
-->
<xsl:template mode="preproc:expand" priority="1"
match="lv:classify/@*">
<xsl:sequence select="." />
</xsl:template>
<!-- default lv:match/@on short-hand to assert on a value of TRUE -->
<xsl:template match="lv:match[ not( @value
or @anyOf