[yelp-xsl] dita2html-media: Implement object and param
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] dita2html-media: Implement object and param
- Date: Sun, 25 Nov 2012 06:03:35 +0000 (UTC)
commit 3fd44c1370b5771b77cd5d0d37927b1d821991b9
Author: Shaun McCance <shaunm gnome org>
Date: Sun Nov 25 01:02:50 2012 -0500
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.
xslt/dita/common/dita-selectors.mod | 5 +++
xslt/dita/html/dita2html-media.xsl | 52 +++++++++++++++++++++++++++++++++++
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 8adcf4f..0d62393 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 6981468..3c21543 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 f571bf7..89e4505 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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]