Update of /var/cvs/config/xslt/framework
In directory james.mmbase.org:/tmp/cvs-serv31984

Modified Files:
        head.xslt 
Log Message:
selecting unique script didn't quite work (which makes me doubt about the rest 
too, btw)


See also: http://cvs.mmbase.org/viewcvs/config/xslt/framework


Index: head.xslt
===================================================================
RCS file: /var/cvs/config/xslt/framework/head.xslt,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- head.xslt   13 Jun 2008 11:50:18 -0000      1.5
+++ head.xslt   30 Dec 2008 13:58:33 -0000      1.6
@@ -8,7 +8,7 @@
       
       See 
http://cvs.mmbase.org/viewcvs/html/mmbase/admin/index.jsp?revision=1.14&view=markup
 for a usage example.
       
-      @version $Id: head.xslt,v 1.5 2008/06/13 11:50:18 andre Exp $
+      @version $Id: head.xslt,v 1.6 2008/12/30 13:58:33 michiel Exp $
       @author Michiel Meeuwissen
       @since MMBase-1.9
   -->
@@ -71,21 +71,20 @@
       </xsl:for-each>
 
       <!-- script -->
-      <xsl:variable name="unique-script"
-                    select="$descendants/script[not(. = 
./following-sibling::script and
-                            string(./@charset)   = 
string(./following-sibling::script/@charset) and
-                            string(./@defer)   = 
string(./following-sibling::script/@charset) and
-                            string(./@language)   = 
string(./following-sibling::script/@language) and
-                            string(./@src)   = 
string(./following-sibling::script/@src) and
-                            string(./@type)   = 
string(./following-sibling::script/@type) and
-                            string(./@id)   = 
string(./following-sibling::script/@id)
-                            )]" />
-
-      <xsl:for-each select="$unique-script">
+      <xsl:for-each select="$descendants/script">
+        <xsl:if test="count(preceding-sibling::script[
+                      string(@src)      = string(current()/@src) and
+                      string(@charset)  = string(current()/@charset) and
+                      string(@defer)    = string(current()/@defer) and
+                      string(@language) = string(current()/@language) and
+                      string(@type)     = string(current()/@type) and
+                      string(@id)       = string(current()/@id)
+                      ]) = 0">
         <script>
           <xsl:copy-of select="@*" />
           <xsl:copy-of select="*|text()" />
         </script>
+        </xsl:if>
       </xsl:for-each>
 
       <xsl:variable name="unique-no-script"
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to