[yelp-xsl] dita2html: Pass id attribute through to HTML
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] dita2html: Pass id attribute through to HTML
- Date: Thu, 4 Oct 2012 16:04:27 +0000 (UTC)
commit a25fc2119e5098a9efac3cffb1a28f926ee9d9c3
Author: Shaun McCance <shaunm gnome org>
Date: Wed Oct 3 08:53:41 2012 -0400
dita2html: Pass id attribute through to HTML
xslt/dita/html/dita2html-block.xsl | 16 ++++++++++++++++
xslt/dita/html/dita2html-inline.xsl | 1 +
xslt/dita/html/dita2html-list.xsl | 9 +++++++++
xslt/dita/html/dita2html-topic.xsl | 6 ++++++
4 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/xslt/dita/html/dita2html-block.xsl b/xslt/dita/html/dita2html-block.xsl
index 61d7a94..80ac293 100644
--- a/xslt/dita/html/dita2html-block.xsl
+++ b/xslt/dita/html/dita2html-block.xsl
@@ -36,6 +36,7 @@ REMARK: Describe this module
<!-- = cmd = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_cmd;">
<p>
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</p>
@@ -44,6 +45,7 @@ REMARK: Describe this module
<!-- = codeblock = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_codeblock;">
<div class="code">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<pre class="contents">
<xsl:apply-templates mode="dita2html.topic.mode"/>
@@ -54,6 +56,7 @@ REMARK: Describe this module
<!-- = context = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_context;">
<div class="context">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</div>
@@ -62,6 +65,7 @@ REMARK: Describe this module
<!-- = desc = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_desc;">
<div class="desc">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</div>
@@ -70,6 +74,7 @@ REMARK: Describe this module
<!-- = info = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_info;">
<p>
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</p>
@@ -93,6 +98,7 @@ REMARK: Describe this module
</xsl:choose>
</xsl:variable>
<div>
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:attribute name="class">
<xsl:text>note</xsl:text>
@@ -114,6 +120,7 @@ REMARK: Describe this module
<!-- = p = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_p;">
<p>
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</p>
@@ -122,6 +129,7 @@ REMARK: Describe this module
<!-- = postreq = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_postreq;">
<div class="postreq">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</div>
@@ -130,6 +138,7 @@ REMARK: Describe this module
<!-- = prereq = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_prereq;">
<div class="prereq">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</div>
@@ -138,6 +147,7 @@ REMARK: Describe this module
<!-- = result = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_result;">
<div class="result">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</div>
@@ -146,6 +156,7 @@ REMARK: Describe this module
<!-- = section = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_section;">
<div class="section">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</div>
@@ -154,6 +165,7 @@ REMARK: Describe this module
<!-- = shortdesc = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_shortdesc;">
<p class="shortdesc">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</p>
@@ -162,6 +174,7 @@ REMARK: Describe this module
<!-- = stepresult = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_stepresult;">
<p>
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</p>
@@ -170,6 +183,7 @@ REMARK: Describe this module
<!-- = stepxmp = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_stepxmp;">
<div class="example">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</div>
@@ -189,6 +203,7 @@ REMARK: Describe this module
</xsl:choose>
</xsl:variable>
<div class="title">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:element name="{concat('h', $depth_)}" namespace="{$html.namespace}">
<xsl:apply-templates mode="dita2html.topic.mode"/>
@@ -199,6 +214,7 @@ REMARK: Describe this module
<!-- = tutorialinfo = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_tutorialinfo;">
<p>
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</p>
diff --git a/xslt/dita/html/dita2html-inline.xsl b/xslt/dita/html/dita2html-inline.xsl
index 3ccbd4d..4dea195 100644
--- a/xslt/dita/html/dita2html-inline.xsl
+++ b/xslt/dita/html/dita2html-inline.xsl
@@ -43,6 +43,7 @@ FIXME
<xsl:param name="node" select="."/>
<xsl:param name="class" select="local-name($node)"/>
<span class="{$class}">
+ <xsl:copy-of select="$node/@id"/>
<xsl:call-template name="html.lang.attrs">
<xsl:with-param name="node" select="$node"/>
</xsl:call-template>
diff --git a/xslt/dita/html/dita2html-list.xsl b/xslt/dita/html/dita2html-list.xsl
index db626e1..6093291 100644
--- a/xslt/dita/html/dita2html-list.xsl
+++ b/xslt/dita/html/dita2html-list.xsl
@@ -36,6 +36,7 @@ REMARK: Describe this module
<!-- = li = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_li;">
<li class="list">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</li>
@@ -44,6 +45,7 @@ REMARK: Describe this module
<!-- = ul = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_ol;">
<div class="list">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<div class="inner">
<ol class="list">
@@ -57,6 +59,7 @@ REMARK: Describe this module
<xsl:template mode="dita2html.topic.mode" match="&topic_step;">
<xsl:variable name="pre" select="preceding-sibling::&topic_step;"/>
<li class="steps" value="{count($pre) + 1}">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</li>
@@ -65,6 +68,7 @@ REMARK: Describe this module
<!-- = steps = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_steps;">
<div class="steps">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<div class="inner">
<div class="region">
@@ -79,6 +83,7 @@ REMARK: Describe this module
<!-- = steps-unordered = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_steps-unordered;">
<div class="steps">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<div class="inner">
<div class="region">
@@ -93,6 +98,7 @@ REMARK: Describe this module
<!-- = stepsection = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_stepsection;">
<li class="stepsection">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</li>
@@ -101,6 +107,7 @@ REMARK: Describe this module
<!-- = substep = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_substep;">
<li class="steps substeps">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates mode="dita2html.topic.mode"/>
</li>
@@ -109,6 +116,7 @@ REMARK: Describe this module
<!-- = substeps = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_substeps;">
<div class="substeps">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<ol class="substeps">
<xsl:apply-templates mode="dita2html.topic.mode"/>
@@ -119,6 +127,7 @@ REMARK: Describe this module
<!-- = ul = -->
<xsl:template mode="dita2html.topic.mode" match="&topic_ul;">
<div class="list">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<div class="inner">
<ul class="list">
diff --git a/xslt/dita/html/dita2html-topic.xsl b/xslt/dita/html/dita2html-topic.xsl
index a9f2382..29a46ad 100644
--- a/xslt/dita/html/dita2html-topic.xsl
+++ b/xslt/dita/html/dita2html-topic.xsl
@@ -129,6 +129,7 @@ div.links > div.inner > div.region > div.desc { font-style: italic; }
<xsl:template mode="dita2html.topic.mode" match="&topic_body;">
<div class="region">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<div class="contents">
<xsl:apply-templates mode="dita2html.topic.mode"/>
@@ -141,6 +142,8 @@ div.links > div.inner > div.region > div.desc { font-style: italic; }
<div class="hgroup"/>
<div class="contents">
<div class="links">
+ <xsl:copy-of select="@id"/>
+ <xsl:call-template name="html.lang.attrs"/>
<div class="inner">
<div class="region">
<ul>
@@ -156,6 +159,7 @@ div.links > div.inner > div.region > div.desc { font-style: italic; }
<xsl:template mode="dita2html.topic.mode" match="&topic_link;">
<!-- FIXME -->
<li class="links">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<a>
<xsl:attribute name="href">
@@ -191,6 +195,7 @@ div.links > div.inner > div.region > div.desc { font-style: italic; }
<xsl:template mode="dita2html.topic.mode" match="&topic_linkinfo;">
<li class="links links-linkinfo">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<xsl:apply-templates modes="dita2html.topic.mode"/>
</li>
@@ -201,6 +206,7 @@ div.links > div.inner > div.region > div.desc { font-style: italic; }
<xsl:when test="&topic_title; or &topic_desc; or &topic_linkinfo;">
<li class="links">
<div class="links">
+ <xsl:copy-of select="@id"/>
<xsl:call-template name="html.lang.attrs"/>
<div class="inner">
<xsl:apply-templates mode="dita2html.topic.mode" select="&topic_title;"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]