Skip to content

Commit

Permalink
Create tracker URL from bibliosource
Browse files Browse the repository at this point in the history
Needed for issue #36
  • Loading branch information
tomschr committed Jul 17, 2015
1 parent 6d2af23 commit 0fc67f8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
8 changes: 7 additions & 1 deletion suse2013/xhtml/docbook.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@
<xsl:apply-templates select="." mode="object.title.markup"/>
</xsl:if>
</xsl:param>

<xsl:param name="tracker.url">
<xsl:call-template name="tracker.url"/>
</xsl:param>
<xsl:param name="title">
<xsl:if test="$substructure.title.short != ''">
<xsl:value-of select="concat($substructure.title.short, $head.content.title.separator)"/>
Expand Down Expand Up @@ -226,6 +228,10 @@
</xsl:if>
</xsl:if>

<xsl:if test="$tracker.url != ''">
<meta name="tracker-url" content="{$tracker.url}"/>
</xsl:if>

<xsl:apply-templates select="." mode="head.keywords.content"/>
</xsl:template>

Expand Down
12 changes: 12 additions & 0 deletions suse2013/xhtml/titlepage.templates.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,18 @@
</xsl:template>


<xsl:template name="tracker.url">
<xsl:choose>
<xsl:when test="*/bibliosource[@role='tracker']">
<xsl:value-of select="*/bibliosource[@role='tracker'][1]"/>
</xsl:when>
<xsl:when test="*/bibliosource[@class='uri']">
<xsl:value-of select="*/bibliosource[@class='uri'][1]"/>
</xsl:when>
</xsl:choose>
</xsl:template>


<!-- ===================================================== -->
<xsl:template name="part.titlepage.before.recto">
<xsl:call-template name="version.info.page-top"/>
Expand Down

0 comments on commit 0fc67f8

Please sign in to comment.