vmassol 2003/01/13 03:37:12
Modified: documentation/docs/skins/jakarta.apache.org/stylesheets
document2html.xsl
Log:
Discover invalid ids automatically
Revision Changes Path
1.14 +11 -1
jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/document2html.xsl
Index: document2html.xsl
===================================================================
RCS file:
/home/cvs/jakarta-cactus/documentation/docs/skins/jakarta.apache.org/stylesheets/document2html.xsl,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- document2html.xsl 13 Jan 2003 11:26:48 -0000 1.13
+++ document2html.xsl 13 Jan 2003 11:37:12 -0000 1.14
@@ -1032,6 +1032,16 @@
<xsl:template name="get-source-from-id">
<xsl:param name="id"/>
+
+ <!-- Issue a warning if the id is invalid -->
+ <xsl:if test="not($sitemap//resource[@id=$id])">
+ <xsl:message>
+ <xsl:text>Id [</xsl:text>
+ <xsl:value-of select="$id"/>
+ <xsl:text>] has no reference in sitemap.xml</xsl:text>
+ </xsl:message>
+ </xsl:if>
+
<xsl:value-of select="$sitemap//resource[@id=$id]/@source"/>
</xsl:template>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>