Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Handle if-content=""

  • Loading branch information...
commit b7d504746d3fd756f7251e65ffdd2a2f05ec69a5 1 parent ef5e4d0
Laurence Rowe lrowe authored
Showing with 4 additions and 2 deletions.
  1. +3 −1 lib/diazo/emit-stylesheet.xsl
  2. +1 −1  lib/diazo/runtrace.py
4 lib/diazo/emit-stylesheet.xsl
View
@@ -460,7 +460,9 @@
<xsl:text>&quot;</xsl:text>
</xsl:for-each>
<xsl:text>&gt;</xsl:text>
- <xsl:element name="xsl:value-of"><xsl:attribute name="select">count(<xsl:value-of select="$attr"/>)</xsl:attribute></xsl:element>
+ <xsl:if test="string($attr)">
+ <xsl:element name="xsl:value-of"><xsl:attribute name="select">count(<xsl:value-of select="$attr"/>)</xsl:attribute></xsl:element>
+ </xsl:if>
<xsl:text>&lt;/runtrace&gt;</xsl:text>
</xsl:element>
<xsl:text>&#10;</xsl:text>
2  lib/diazo/runtrace.py
View
@@ -33,7 +33,7 @@ def condition_name(trace):
for trace in trace_doc.xpath('/runtrace/runtrace'):
for el in rules_doc.xpath("id('"+trace.attrib['theme_xmlid']+"')"):
- el.set(condition_name(trace),trace.text)
+ el.set(condition_name(trace),trace.text or '')
return rules_doc
def runtrace_to_html(runtrace_doc):
Please sign in to comment.
Something went wrong with that request. Please try again.