forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
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

URL: http://svn.apache.org/viewvc?view=rev&rev=561475
Log:
Use local-name() rather than name() so that attributes with a defined namespace are carried
accross. 
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

Modified: forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl
URL: http://svn.apache.org/viewvc/forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl?view=diff&rev=561475&r1=561474&r2=561475
==============================================================================
--- 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:choose>
         <xsl:when test="contains(., 'site:') or contains(., 'ext:')">
           <xsl:value-of select="concat('error:', .)"/>



Mime
View raw message