giacomo 00/08/27 02:08:02
Modified: src/org/apache/cocoon/components/language/markup/sitemap/java
Tag: xml-cocoon2 sitemap.xsl
Log:
enable view access by expicit <map:label> definition
Revision Changes Path
No revision
No revision
1.1.2.25 +18 -1
xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl
Index: sitemap.xsl
===================================================================
RCS file:
/home/cvs/xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java/Attic/sitemap.xsl,v
retrieving revision 1.1.2.24
retrieving revision 1.1.2.25
diff -u -r1.1.2.24 -r1.1.2.25
--- sitemap.xsl 2000/08/25 20:27:10 1.1.2.24
+++ sitemap.xsl 2000/08/27 09:08:01 1.1.2.25
@@ -2,7 +2,7 @@
<!-- Sitemap Core logicsheet for the Java language -->
<!--
* @author <a href="mailto:[EMAIL PROTECTED]">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.24 $ $Date: 2000/08/25 20:27:10 $
+ * @version CVS $Revision: 1.1.2.25 $ $Date: 2000/08/27 09:08:01 $
-->
<xsl:stylesheet
@@ -226,6 +226,16 @@
<xsl:apply-templates select="./*"/>
}
</xsl:for-each>
+
+ <xsl:for-each select="/map:sitemap/map:views/map:view">
+ private boolean view_<xsl:value-of select="translate(@name, '- ',
'__')"/> (ResourcePipeline pipeline,
+ List listOfLists, Environment environment)
+ throws Exception {
+ List list = null;
+ Parameters param = null;
+ <xsl:apply-templates select="./*"/>
+ }
+ </xsl:for-each>
/**
* Process to producing the output to the specified
>code<OutputStream>/code<.
@@ -238,6 +248,7 @@
List list = null;
Parameters param = null;
Dictionary objectModel = environment.getObjectModel();
+ String view = environment.getView();
<xsl:for-each select="/map:sitemap/map:pipelines/map:pipeline">
<xsl:variable name="pipeline-position" select="position()"/>
try {
@@ -510,6 +521,12 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template> <!-- match="map:redirect-to" -->
+
+ <xsl:template match="map:label">
+ <xsl:apply-templates/>
+ if ("<xsl:value-of select="@name"/>".equals(view))
+ return view_<xsl:value-of select="translate(@name, '- ', '__')"/>
(pipeline, listOfLists, environment);
+ </xsl:template> <!-- match="map:label" -->
<xsl:template match="map:pipeline//parameter">
param.setParameter ("<xsl:value-of select="@name"/>", "<xsl:value-of
select="@value"/>");