diff options
author | Shaun McCance <shaunm@gnome.org> | 2009-05-22 19:05:21 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2009-05-22 19:05:21 -0500 |
commit | d22c730ed4c964f5eb8e5970245bbc89a9ec5657 (patch) | |
tree | a19c71cacc0c57e4e27013a2c0bd25414729ea35 /xslt | |
parent | 9ca4bc9a03bf900ed855e3e815b1a06df0df1ae8 (diff) | |
download | gnome-doc-utils-d22c730ed4c964f5eb8e5970245bbc89a9ec5657.tar.gz |
[mallard] Finishing block_list and xslt implementation
Diffstat (limited to 'xslt')
-rw-r--r-- | xslt/mallard/html/mal2html-list.xsl | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/xslt/mallard/html/mal2html-list.xsl b/xslt/mallard/html/mal2html-list.xsl index 051248d..ebd3312 100644 --- a/xslt/mallard/html/mal2html-list.xsl +++ b/xslt/mallard/html/mal2html-list.xsl @@ -36,7 +36,7 @@ REMARK: Describe this template --> <xsl:template name="mal2html.list.css"> <xsl:text> -ul.list { margin: 0; padding: 0; } +ol.list, ul.list { margin: 0; padding: 0; } li.item-list { margin-left: 1.44em; } ul.tree { @@ -61,6 +61,18 @@ div.tree-lines ul.tree ul.tree ul.tree { <!-- = list = --> <xsl:template mode="mal2html.block.mode" match="mal:list"> <xsl:param name="first_child" select="not(preceding-sibling::*)"/> + <xsl:variable name="el"> + <xsl:choose> + <xsl:when test="not(@type) or (@type = 'none') or (@type = 'box') + or (@type = 'check') or (@type = 'circle') or (@type = 'diamond') + or (@type = 'disc') or (@type = 'hyphen') or (@type = 'square')"> + <xsl:text>ul</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>ol</xsl:text> + </xsl:otherwise> + </xsl:choose> + </xsl:variable> <div> <xsl:attribute name="class"> <xsl:text>list</xsl:text> @@ -68,9 +80,17 @@ div.tree-lines ul.tree ul.tree ul.tree { <xsl:text> first-child</xsl:text> </xsl:if> </xsl:attribute> - <ul class="list"> + <xsl:element name="{$el}" namespace="{$mal2html.namespace}"> + <xsl:attribute name="class"> + <xsl:text>list</xsl:text> + </xsl:attribute> + <xsl:if test="@type"> + <xsl:attribute name="style"> + <xsl:value-of select="concat('list-style-type:', @type)"/> + </xsl:attribute> + </xsl:if> <xsl:apply-templates mode="mal2html.list.list.mode" select="mal:item"/> - </ul> + </xsl:element> </div> </xsl:template> |