[m-rev.] diff: fix term-path-with-field-names bug in XUL stylesheet
Ian MacLarty
maclarty at cs.mu.OZ.AU
Wed Dec 29 14:57:31 AEDT 2004
Estimated hours taken: 0.5
Branches: main
Fix bug in stylesheet for converting Mercury terms to a XUL tree where
term paths with field names weren't displayed correctly when in a list.
scripts/xul_tree.xsl
Pass fieldtermpath argument when applying template to elements in a
list.
Index: scripts/xul_tree.xsl
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/xul_tree.xsl,v
retrieving revision 1.1
diff -u -r1.1 xul_tree.xsl
--- scripts/xul_tree.xsl 11 Dec 2004 01:59:51 -0000 1.1
+++ scripts/xul_tree.xsl 29 Dec 2004 03:43:32 -0000
@@ -135,6 +135,18 @@
<xsl:value-of select="concat($termpath, '/', position())"/>
</xsl:if>
</xsl:with-param>
+ <xsl:with-param name="fieldtermpath">
+ <xsl:if test="ancestor::*">
+ <xsl:choose>
+ <xsl:when test="@field">
+ <xsl:value-of select="concat($fieldtermpath, '/', @field)"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="concat($fieldtermpath, '/', position())"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:with-param>
</xsl:apply-templates>
</xsl:if>
</xsl:when>
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list