lenya/src/java/org/apache/lenya/cms/cocoon/logicsheets util.xsl,1.13,1.14

Christian Egli <[email protected]>
Newsgroups gmane.comp.cms.wyona.cvs
Message-ID <[email protected]>
Update of /repository/lenya/src/java/org/apache/lenya/cms/cocoon/logicsheets
In directory erbium:/tmp/cvs-serv26799/src/java/org/apache/lenya/cms/cocoon/logicsheets

Modified Files:
	util.xsl 
Log Message:
The util.xsl now uses the PageEnvelope class the get most of its
information. It could be cleaned up very much now.
There are new tags that it'll recognize now. They are based on the
naming for the URI scheme:

xsp-lenya:context-prefix
xsp-lenya:publication-id
xsp-lenya:area
xsp-lenya:document-id

All the other stuffshould be deprecated.


Index: util.xsl
===================================================================
RCS file: /repository/lenya/src/java/org/apache/lenya/cms/cocoon/logicsheets/util.xsl,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** util.xsl	24 Apr 2003 13:52:38 -0000	1.13
--- util.xsl	8 May 2003 07:54:08 -0000	1.14
***************
*** 22,25 ****
--- 22,26 ----
          <xsp:include>org.apache.lenya.cms.ac.Identity</xsp:include>
          <xsp:include>org.apache.lenya.cms.publication.Publication</xsp:include>
+         <xsp:include>org.apache.lenya.cms.publication.PageEnvelope</xsp:include>
        </xsp:structure>
        
***************
*** 78,82 ****
         }
      }
!     
          Publication xspUtilPublication = null;
          String xspUtilServletContextPath = null;
--- 79,86 ----
         }
      }
! 	PageEnvelope xspPageEnvelope = null;
! 	try {
! 		xspPageEnvelope = new PageEnvelope(resolver, request);
! 	} catch (Exception e) {}
          Publication xspUtilPublication = null;
          String xspUtilServletContextPath = null;
***************
*** 104,109 ****
  
  
  <xsl:template match="xsp-lenya:publication-id">
!   <xsp:expr>xspUtilPublication.getId()</xsp:expr>
  </xsl:template>
  
--- 108,125 ----
  
  
+ <xsl:template match="xsp-lenya:context-prefix">
+   <xsp:expr>xspPageEnvelope.getContext()</xsp:expr>
+ </xsl:template>
+ 
  <xsl:template match="xsp-lenya:publication-id">
!   <xsp:expr>xspPageEnvelope.getPublication().getId()</xsp:expr>
! </xsl:template>
! 
! <xsl:template match="xsp-lenya:area">
!   <xsp:expr>xspPageEnvelope.getArea()</xsp:expr>
! </xsl:template>
! 
! <xsl:template match="xsp-lenya:document-id">
!   <xsp:expr>xspPageEnvelope.getDocumentId()</xsp:expr>
  </xsl:template>
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.