Skip to content

Commit

Permalink
xslt updated for #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Intelligent2013 committed Nov 7, 2020
1 parent d9737c2 commit 13b7fe9
Show file tree
Hide file tree
Showing 9 changed files with 1,398 additions and 106 deletions.
3 changes: 2 additions & 1 deletion src/main/resources/stepmod.base_xsl/common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,8 @@ width="20" height="20"/> -->
<xsl:variable name="schema_position">
<xsl:apply-templates select="$resdoc_xml//resource/schema[@name=$schema_name]" mode="position"/>
</xsl:variable>
<xsl:value-of select="concat($baselink,'resource_docs/',$resource_doc,'/sys/', $schema_position, '_schema',$FILE_EXT,'#',$express_ref)"/><!-- FOO -->
<!-- <xsl:value-of select="concat($baselink,'resource_docs/',$resource_doc,'/sys/', $schema_position, '_schema',$FILE_EXT,'#',$express_ref)"/> --><!-- FOO -->
<xsl:value-of select="concat('/resource_docs/',$resource_doc,'#',$express_ref)"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat($baselink,'resources/',$module,'/', $module,$FILE_EXT,'#',$express_ref)"/>
Expand Down
25 changes: 23 additions & 2 deletions src/main/resources/stepmod.base_xsl/res_doc/common.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -156,14 +156,35 @@ $Id: common.xsl,v 1.33 2008/05/21 20:50:25 abf Exp $
</xsl:variable>

<xsl:choose>

<xsl:when test="contains($href, concat('/', $current_module, '/'))"><!-- if link inside current module -->
<xsl:text>&lt;&lt;</xsl:text><xsl:value-of select="substring-after($href,'#')"/><xsl:text>&gt;&gt;</xsl:text>
</xsl:when>
<xsl:otherwise>

<xsl:otherwise>
<xsl:call-template name="insertHyperlink">
<xsl:with-param name="a">
<a href="{$href}"><xsl:value-of select="$link_text"/></a>
<!-- <a href="{$href}"><xsl:value-of select="$link_text"/></a> -->
<a>
<xsl:attribute name="href">
<xsl:choose>
<xsl:when test="contains($href, '#')">
<xsl:value-of select="substring-before($href, '#')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$href"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:choose>
<xsl:when test="contains($href, '#')">
<xsl:value-of select="substring-after($href, '#')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$link_text"/>
</xsl:otherwise>
</xsl:choose>
</a>
</xsl:with-param>
</xsl:call-template>

Expand Down
Loading

0 comments on commit 13b7fe9

Please sign in to comment.