diff options
author | Shaun McCance <shaunm@gnome.org> | 2012-11-25 01:02:50 -0500 |
---|---|---|
committer | Shaun McCance <shaunm@gnome.org> | 2012-11-25 01:02:50 -0500 |
commit | 3fd44c1370b5771b77cd5d0d37927b1d821991b9 (patch) | |
tree | 618bb1be1634f2519445e4a2d7ed3eda95a6f24a /xslt/dita | |
parent | adff6b16174ca4badf95c183e55033873e8a26d2 (diff) | |
download | yelp-xsl-3fd44c1370b5771b77cd5d0d37927b1d821991b9.tar.gz |
dita2html-media: Implement object and param
This is a straight copy of the same crappy elements from
HTML 4. Maybe some day DITA will do video right.
Diffstat (limited to 'xslt/dita')
-rw-r--r-- | xslt/dita/common/dita-selectors.mod | 5 | ||||
-rw-r--r-- | xslt/dita/html/dita2html-media.xsl | 52 | ||||
-rw-r--r-- | xslt/dita/html/dita2html-topic.xsl | 5 |
3 files changed, 62 insertions, 0 deletions
diff --git a/xslt/dita/common/dita-selectors.mod b/xslt/dita/common/dita-selectors.mod index 8adcf4f6..0d62393a 100644 --- a/xslt/dita/common/dita-selectors.mod +++ b/xslt/dita/common/dita-selectors.mod @@ -269,6 +269,11 @@ topic/p <!ENTITY topic_p "*[name(.) = 'p' or starts-with(@class, '- topic/p ')]"> <!-- =========================================================================== +topic/param +--> +<!ENTITY topic_param "*[name(.) = 'param' or starts-with(@class, '- topic/param ')]"> + +<!-- =========================================================================== topic/ph --> <!ENTITY topic_b "*[ diff --git a/xslt/dita/html/dita2html-media.xsl b/xslt/dita/html/dita2html-media.xsl index 6981468d..3c215433 100644 --- a/xslt/dita/html/dita2html-media.xsl +++ b/xslt/dita/html/dita2html-media.xsl @@ -123,4 +123,56 @@ REMARK: Describe this module </img> </xsl:template> +<!-- = object = --> +<xsl:template mode="dita2html.topic.mode" match="&topic_object;"> + <xsl:variable name="node" select="."/> + <xsl:variable name="conref" select="yelp:dita.ref.conref(.)"/> + <div class="dita-object"> + <xsl:call-template name="dita.id"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + <xsl:call-template name="html.lang.attrs"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + <xsl:apply-templates mode="dita2html.topic.mode" select="&topic_desc;"/> + <div class="contents"> + <xsl:element name="{local-name(.)}" namespace="{$html.namespace}"> + <xsl:for-each select="@*[namespace-uri(.) = '']"> + <xsl:attribute name="{local-name(.)}"> + <xsl:call-template name="dita.ref.conref.attr"> + <xsl:with-param name="attr" select="local-name(.)"/> + <xsl:with-param name="node" select="$node"/> + <xsl:with-param name="conref" select="$conref"/> + </xsl:call-template> + </xsl:attribute> + </xsl:for-each> + <xsl:apply-templates mode="dita2html.topic.mode" select="&topic_param;"/> + </xsl:element> + </div> + </div> +</xsl:template> + +<!-- = param = --> +<xsl:template mode="dita2html.topic.mode" match="&topic_param;"> + <xsl:variable name="node" select="."/> + <xsl:variable name="conref" select="yelp:dita.ref.conref(.)"/> + <xsl:call-template name="dita.id"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + <xsl:call-template name="html.lang.attrs"> + <xsl:with-param name="node" select="$node"/> + </xsl:call-template> + <xsl:element name="{local-name(.)}" namespace="{$html.namespace}"> + <xsl:for-each select="@*[namespace-uri(.) = '']"> + <xsl:attribute name="{local-name(.)}"> + <xsl:call-template name="dita.ref.conref.attr"> + <xsl:with-param name="attr" select="local-name(.)"/> + <xsl:with-param name="node" select="$node"/> + <xsl:with-param name="conref" select="$conref"/> + </xsl:call-template> + </xsl:attribute> + </xsl:for-each> + </xsl:element> +</xsl:template> + </xsl:stylesheet> diff --git a/xslt/dita/html/dita2html-topic.xsl b/xslt/dita/html/dita2html-topic.xsl index f571bf76..89e45058 100644 --- a/xslt/dita/html/dita2html-topic.xsl +++ b/xslt/dita/html/dita2html-topic.xsl @@ -492,6 +492,11 @@ dt.dthd, dd.ddhd { color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>; } th, td { border: solid 1px; } +div.dita-object > div.desc { + margin: 0 0 0.2em 0; + font-weight: bold; + color: </xsl:text><xsl:value-of select="$color.text_light"/><xsl:text>; +} </xsl:text> </xsl:template> |