svn commit: r617269 - in /lenya/trunk/src/pubs/default: sitemap.xmap xslt/page2xhtml.xsl

[email protected]
Newsgroups gmane.comp.cms.lenya.cvs
Message-ID <[email protected]>
Author: andreas
Date: Thu Jan 31 14:38:02 2008
New Revision: 617269

URL: http://svn.apache.org/viewvc?rev=617269&view=rev
Log:
Cleaned up XSLT parameters.

Modified:
    lenya/trunk/src/pubs/default/sitemap.xmap
    lenya/trunk/src/pubs/default/xslt/page2xhtml.xsl

Modified: lenya/trunk/src/pubs/default/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/sitemap.xmap?rev=617269&r1=617268&r2=617269&view=diff
==============================================================================
--- lenya/trunk/src/pubs/default/sitemap.xmap (original)
+++ lenya/trunk/src/pubs/default/sitemap.xmap Thu Jan 31 14:38:02 2008
@@ -161,15 +161,13 @@
         <map:generate src="cocoon:/lenyabody-raw-{1}/{2}/{3}/{4}/{page-envelope:default-language}/{page-envelope:language}/{5}"/>
         <map:transform src="fallback://lenya/modules/svg/xslt/image2svg.xsl"/>
         <map:transform src="cocoon:/getDoctypeXSLT-{4}">
-          <map:parameter name="root" value="/{2}/{3}"/>
           <map:parameter name="publication-id" value="{2}"/>
           <map:parameter name="area" value="{3}"/>
+          <map:parameter name="uuid" value="{page-envelope:document-uuid}"/>
+          <map:parameter name="language" value="{page-envelope:document-language}"/>
           <map:parameter name="url" value="{page-envelope:document-url}"/>
           <map:parameter name="document-path" value="{page-envelope:document-path}"/>
           <map:parameter name="document-type" value="{4}"/>
-          <map:parameter name="uuid" value="{page-envelope:document-uuid}"/>
-          <map:parameter name="language" value="{page-envelope:document-language}"/>
-          <map:parameter name="contextprefix" value="{request:contextPath}"/>
           <map:parameter name="lastPublishedUser" value="{access-control:user-name:{workflow:lastUser.publish}}"/>
           <map:parameter name="lastPublishedDate" value="{workflow:lastDate.publish}"/>
           <!-- Following is a show off to explain lenya.properties.xml -->

Modified: lenya/trunk/src/pubs/default/xslt/page2xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/pubs/default/xslt/page2xhtml.xsl?rev=617269&r1=617268&r2=617269&view=diff
==============================================================================
--- lenya/trunk/src/pubs/default/xslt/page2xhtml.xsl (original)
+++ lenya/trunk/src/pubs/default/xslt/page2xhtml.xsl Thu Jan 31 14:38:02 2008
@@ -28,26 +28,24 @@
   exclude-result-prefixes="xhtml lenya"
   >
   
-  <!-- {context-prefix}/{publication-id}/{area} -->
-  <xsl:param name="root"/>
-  <xsl:param name="context-prefix"/>
+  <xsl:param name="publication-id"/>
+  <xsl:param name="area"/>
+  <xsl:param name="uuid"/>
+  <xsl:param name="language"/>
   
   <!-- i.e. doctypes/xhtml-document -->
   <xsl:param name="document-type"/>
   
   <xsl:param name="document-path"/>
   
-  <!-- The request url i.e. /lenya/doctypes/xhtml-document_en.html -->
-  <xsl:param name="url"/>
-  <xsl:param name="uuid"/>
-  <xsl:param name="language"/>
-  
   <xsl:param name="lastPublishedUser"/>
   <xsl:param name="lastPublishedDate"/>
   
   <!--Following is a show off to explain lenya.properties.xml -->
   <xsl:param name="author"/>
   
+  <xsl:variable name="root" select="concat('/', $publication-id, '/', $area)"/>
+  
   <xsl:template match="cmsbody">
     <html>
       <head>
@@ -56,16 +54,11 @@
         <link rel="stylesheet" href="{$root}/css/page.css" type="text/css"/>
         <link rel="SHORTCUT ICON" type="image/ico" href="/lenya/images/lenya.ico"/>
         <!-- Load doctype-specific CSS -->
-        <xsl:choose>
-          <xsl:when test="$document-type">
-            <!-- Looking into the pub e.g. {$yourPub}/resources/shared/css/{$document-type}.css -->
-            <link rel="stylesheet" href="{$root}/css/{$document-type}.css" type="text/css"/>
-            <xsl:copy-of select="xhtml:html/xhtml:head/*"/>
-          </xsl:when>
-          <xsl:otherwise>
-            <!-- do nothing -->
-          </xsl:otherwise>
-        </xsl:choose>
+        <xsl:if test="$document-type">
+          <!-- Looking into the pub e.g. {$yourPub}/resources/shared/css/{$document-type}.css -->
+          <link rel="stylesheet" href="{$root}/css/{$document-type}.css" type="text/css"/>
+          <xsl:copy-of select="xhtml:html/xhtml:head/*"/>
+        </xsl:if>
         <meta content="Apache Lenya" name="generator"/>
         
         <title><meta:value element="title" ns="http://purl.org/dc/elements/1.1/" default="error-404"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.