[kupu-checkins] r51319 - kupu/trunk/kupu

mihxil at codespeak.net mihxil at codespeak.net
Thu Feb 7 16:43:31 CET 2008


Author: mihxil
Date: Thu Feb  7 16:43:30 2008
New Revision: 51319

Modified:
   kupu/trunk/kupu/make-jspx.xsl
Log:
didn't work, because attributes can contains spaces

Modified: kupu/trunk/kupu/make-jspx.xsl
==============================================================================
--- kupu/trunk/kupu/make-jspx.xsl	(original)
+++ kupu/trunk/kupu/make-jspx.xsl	Thu Feb  7 16:43:30 2008
@@ -17,7 +17,7 @@
 This means that also the fmt-tags must be available, so your html.kupu must specificy something like:
   <kupu:part name="html">
     <html xmlns="http://www.w3.org/1999/xhtml"
-          xmlns:jsp="http://java.sun.com/JSP/Page" 
+          xmlns:jsp="http://java.sun.com/JSP/Page"
           xmlns:fmt="http://java.sun.com/jsp/jstl/fmt">
       <jsp:output doctype-root-element="html"
                   doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
@@ -33,14 +33,14 @@
 <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:kupu="http://kupu.oscom.org/namespaces/dist"
-   xmlns:i18n="http://xml.zope.org/namespaces/i18n" 
+   xmlns:i18n="http://xml.zope.org/namespaces/i18n"
    xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
    xmlns:html="http://www.w3.org/1999/xhtml"
    xmlns:jsp="http://java.sun.com/JSP/Page"
    exclude-result-prefixes="kupu"
    version="1.0"
    >
-  <xsl:import href="make.xsl" />  
+  <xsl:import href="make.xsl" />
   <xsl:output
     method="xml"
     indent="no"
@@ -70,14 +70,14 @@
       </xsl:when>
       <xsl:when test="@i18n:attributes">
         <xsl:variable name="attributes"><xsl:value-of select="@i18n:attributes" /></xsl:variable>
-        <fmt:message var="_">
+        <fmt:message var="translation">
           <xsl:attribute name="key">
             <xsl:value-of select="@title" /><!-- should be @$attributes, but that doesn't work -->
           </xsl:attribute>
         </fmt:message>
         <xsl:element name="{name()}">
           <xsl:copy-of select="@html:*" />
-          <xsl:attribute name="{$attributes}">${_}</xsl:attribute>
+          <xsl:attribute name="title">${translation}</xsl:attribute>
           <xsl:apply-templates  mode="expand" />
         </xsl:element>
       </xsl:when>
@@ -105,7 +105,7 @@
       <xsl:apply-templates mode="expand" />
     </xsl:copy>
   </xsl:template>
-  
+
   <xsl:template match="text()" mode="expand-i18n">
     <!-- this should probably be trim() rather then normalize-space (but that functions does not natively exist) -->
     <xsl:value-of select="normalize-space(.)" />


More information about the kupu-checkins mailing list