forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r561475 - /forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl
Date Tue, 31 Jul 2007 20:09:11 GMT
Author: rgardler
Date: Tue Jul 31 13:09:10 2007
New Revision: 561475

Use local-name() rather than name() so that attributes with a defined namespace are carried
This may seem a little strange since it will strip the namespace from the attribute in the
output document,
however, with name() the attribute is stripped completely so this is a step in the right direction.
It is
needed to allow the Exhibit contract to work that is currently in development as part of the
DOAP plugin.

If anyone knows how to do this in a better way (i.e. include the namespace in the output)
please go ahead.


Modified: forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl
--- forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl Tue Jul
31 13:09:10 2007
@@ -23,8 +23,12 @@
   The remaining ones are the bogus ones caused by FOR-284 which are
   then excluded by cli.xconf
+<!--  This match needs to cover all namespaces -->
   <xsl:template match="@*">
-    <xsl:attribute name="{name(.)}">
+    <!--  Note this strips namespaces from attributes -->
+    <xsl:attribute name="{local-name(.)}">
         <xsl:when test="contains(., 'site:') or contains(., 'ext:')">
           <xsl:value-of select="concat('error:', .)"/>

View raw message