Avoid duplicating method content from included wadl
Avoid duplicating method content when the same method is used more than once. Change-Id: Ia8dfcb7481ef39ce5146253a6b10203994a14559
This commit is contained in:
@@ -73,8 +73,8 @@
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="$wadl-content//wadl:method[@rax:id = $thisMethodId]/@*"/>
|
||||
<xsl:apply-templates select="$wadl-content//wadl:method[@rax:id = $thisMethodId]/node()">
|
||||
<xsl:apply-templates select="$wadl-content/wadl:application/wadl:resources/wadl:resource[@id = $parent-id]/wadl:method[@rax:id = $thisMethodId]/@*"/>
|
||||
<xsl:apply-templates select="$wadl-content/wadl:application/wadl:resources/wadl:resource[@id = $parent-id]/wadl:method[@rax:id = $thisMethodId]/node()">
|
||||
<xsl:with-param name="doc" select="$doc"/>
|
||||
</xsl:apply-templates>
|
||||
</xsl:copy>
|
||||
@@ -83,7 +83,7 @@
|
||||
<xsl:template match="wadl:resource[@href and not(./wadl:method)]">
|
||||
<xsl:variable name="doc" select="wadl:doc/*"/>
|
||||
<xsl:variable name="wadl-content" select="document(substring-before(@href, '#'))"/>
|
||||
<xsl:apply-templates select="$wadl-content//wadl:resource[@id = substring-after(current()/@href,'#')]">
|
||||
<xsl:apply-templates select="$wadl-content/wadl:application/wadl:resources/wadl:resource[@id = substring-after(current()/@href,'#')]">
|
||||
<xsl:with-param name="doc" select="$doc"/>
|
||||
</xsl:apply-templates>
|
||||
<xsl:apply-templates select="wadl:resource"/>
|
||||
@@ -95,8 +95,8 @@
|
||||
<xsl:variable name="wadl-content" select="document(substring-before(@href, '#'))"/>
|
||||
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="$wadl-content//wadl:resource[@id = $resourceId]/@*"/>
|
||||
<xsl:apply-templates select="$wadl-content//wadl:resource[@id = $resourceId]/node()[not(self::wadl:method)]">
|
||||
<xsl:apply-templates select="$wadl-content/wadl:application/wadl:resources/wadl:resource[@id = $resourceId]/@*"/>
|
||||
<xsl:apply-templates select="$wadl-content/wadl:application/wadl:resources/wadl:resource[@id = $resourceId]/node()[not(self::wadl:method)]">
|
||||
<xsl:with-param name="doc" select="$doc"/>
|
||||
</xsl:apply-templates>
|
||||
|
||||
|
@@ -261,7 +261,7 @@
|
||||
<xsl:variable name="method.title">
|
||||
<xsl:choose>
|
||||
<xsl:when test="wadl:doc/@title">
|
||||
<xsl:value-of select="wadl:doc/@title"/>
|
||||
<xsl:value-of select="(wadl:doc/@title)[1]"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="@id or @rax:id">
|
||||
<xsl:message>Warning: No title found for wadl:method</xsl:message>
|
||||
|
Reference in New Issue
Block a user