diff options
Diffstat (limited to 'common/entities/entities.xsl')
-rw-r--r-- | common/entities/entities.xsl | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/common/entities/entities.xsl b/common/entities/entities.xsl index 952f9e4..9275a25 100644 --- a/common/entities/entities.xsl +++ b/common/entities/entities.xsl @@ -13,11 +13,30 @@ <xsl:template match="entity"> <xsl:variable name="name" select="name"/> - <xsl:variable name="desc" select="comment"/> + <xsl:variable name="desc"> + <xsl:choose> + <xsl:when test="comment = ''"> + WHO AM I? WHAT AM I? I CAN'T REMEMBER! + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="comment"/> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> + <xsl:variable name="extra"> + <xsl:choose> + <xsl:when test="@kind = 'system'"> + <xsl:text> SYSTEM</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text></xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <xsl:variable name="body"> <xsl:apply-templates/> </xsl:variable> - <xsl:value-of select="concat( '<!ENTITY ', @name, ' "', normalize-space($body), '" > <!-- ', normalize-space($desc), '-->')" disable-output-escaping="yes"/> + <xsl:value-of select="concat( '<!ENTITY ', @name, ' ', normalize-space($extra), ' "', normalize-space($body), '" > <!-- ', normalize-space($desc), ' -->')" disable-output-escaping="yes"/> </xsl:template> <xsl:template match="use"> |