You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ro...@apache.org on 2005/02/20 16:26:57 UTC

svn commit: r154515 - in lenya/branches/BRANCH_1_2_X/src/webapp/lenya: pubs/default/xslt/xhtml2xhtml.xsl usecases/kupu/usecase-kupu.xmap xslt/bxeng/change-object-path-back.xsl xslt/bxeng/change-object-path.xsl

Author: roku
Date: Sun Feb 20 07:26:55 2005
New Revision: 154515

URL: http://svn.apache.org/viewcvs?view=rev&rev=154515
Log:
Fixed object2xhtml conversion; Object with a leading / in @data ar used as-is.
This is needed if a page references assets from another page.

Modified:
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecases/kupu/usecase-kupu.xmap
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path-back.xsl
    lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path.xsl

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl?view=diff&r1=154514&r2=154515
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/pubs/default/xslt/xhtml2xhtml.xsl Sun Feb 20 07:26:55 2005
@@ -83,10 +83,16 @@
 
    <!-- this template converts the object tag to img (for compatiblity with older browsers 
     for more, see http://www.xml.com/pub/a/2003/07/02/dive.html -->
+
+   <!-- TODO: Extract all object templates into a separate xslt,
+	     since we have dublicated code in content2edit.xsl in kupu /roku -->
    <xsl:template name="object2img">
       <img border="0">
-        <xsl:attribute name="src">
-          <xsl:value-of select="$nodeid"/>/<xsl:value-of select="@data"/>
+        <xsl:attribute name="src">          
+          <xsl:if test="not(starts-with(@data, '/'))">
+            <xsl:value-of select="$nodeid"/>/
+          </xsl:if>
+          <xsl:value-of select="@data"/>
         </xsl:attribute>
         <xsl:attribute name="alt">
           <!-- the overwritten title (stored in @name) has precedence over dc:title -->

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecases/kupu/usecase-kupu.xmap
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecases/kupu/usecase-kupu.xmap?view=diff&r1=154514&r2=154515
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecases/kupu/usecase-kupu.xmap (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/usecases/kupu/usecase-kupu.xmap Sun Feb 20 07:26:55 2005
@@ -188,7 +188,7 @@
           <map:generate src="{fallback:content/info/assets.xsp}" type="serverpages"/>
           <map:transform src="{fallback:resources/kupu/apache-lenya/lenya/pageassets2kupulibrary.xsl}">
             <map:parameter name="iconUrl" value="{page-envelope:context-prefix}/{global:resourceIconUrl}"/>
-            <map:parameter name="resource-path-url" value="{page-envelope:context-prefix}/{page-envelope:publication-id}/{page-envelope:area}{page-envelope:document-id}/"/>
+            <map:parameter name="resource-path-url" value="{page-envelope:document-id}/"/>
           </map:transform>
           <map:serialize type="xml"/>            
         </map:match>

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path-back.xsl
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path-back.xsl?view=diff&r1=154514&r2=154515
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path-back.xsl (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path-back.xsl Sun Feb 20 07:26:55 2005
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 
-<!-- $Id: change-object-path-back.xsl,v 1.2 2004/03/13 13:09:51 gregor Exp $ -->
+<!-- $Id$ -->
 
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -23,7 +23,7 @@
     xmlns:xhtml="http://www.w3.org/1999/xhtml"
     >
 
-  <xsl:template match="xhtml:object/@data">
+  <xsl:template match="xhtml:object/@data[not(starts-with(., '/'))]">
     <xsl:variable name="url">
       <xsl:value-of select="." />
     </xsl:variable>

Modified: lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path.xsl
URL: http://svn.apache.org/viewcvs/lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path.xsl?view=diff&r1=154514&r2=154515
==============================================================================
--- lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path.xsl (original)
+++ lenya/branches/BRANCH_1_2_X/src/webapp/lenya/xslt/bxeng/change-object-path.xsl Sun Feb 20 07:26:55 2005
@@ -15,7 +15,7 @@
   limitations under the License.
 -->
 
-<!-- $Id: change-object-path.xsl,v 1.2 2004/03/13 13:09:52 gregor Exp $ -->
+<!-- $Id$ -->
     
 <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -32,7 +32,7 @@
   </xsl:variable>
   
   
-  <xsl:template match="xhtml:object/@data">
+  <xsl:template match="xhtml:object/@data[not(starts-with(., '/'))]">
     <xsl:attribute name="data">
       <xsl:value-of select="concat($nodeid, '/', .)" />
     </xsl:attribute>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org