You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by st...@locus.apache.org on 2000/10/01 02:19:54 UTC
cvs commit: xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java sitemap.xsl
stefano 00/09/30 17:19:54
Modified: src/org/apache/cocoon/components/language/markup/sitemap/java
Tag: xml-cocoon2 sitemap.xsl
Log:
added hidden link translator code (Giacomo, please check if the location is right... this logicsheet is a nightmare to understand without any comment!!!!
Revision Changes Path
No revision
No revision
1.1.2.41 +12 -2 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.40
retrieving revision 1.1.2.41
diff -u -r1.1.2.40 -r1.1.2.41
--- sitemap.xsl 2000/09/28 19:50:42 1.1.2.40
+++ sitemap.xsl 2000/10/01 00:19:53 1.1.2.41
@@ -11,7 +11,7 @@
<!--
* @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
- * @version CVS $Revision: 1.1.2.40 $ $Date: 2000/09/28 19:50:42 $
+ * @version CVS $Revision: 1.1.2.41 $ $Date: 2000/10/01 00:19:53 $
-->
<!-- Sitemap Core logicsheet for the Java language -->
@@ -48,6 +48,7 @@
import org.apache.avalon.SAXConfigurationBuilder;
import org.apache.avalon.utils.Parameters;
+ import org.apache.cocoon.Cocoon;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.environment.Environment;
import org.apache.cocoon.generation.Generator;
@@ -74,6 +75,8 @@
private Parameters emptyParam = new Parameters();
private Generator generator_error_handler = null;
private Configuration generator_config_error_handler = null;
+ private Transformer transformer_link_translator = null;
+ private Configuration transformer_config_link_translator = null;
<!-- generate variables for all components -->
/** The generators */
@@ -184,8 +187,11 @@
confBuilder.endDocument ();
Configuration cconf2 = confBuilder.getConfiguration();
generator_config_error_handler = cconf2;
- generator_error_handler =
+ generator_error_handler =
(Generator) load_component ("org.apache.cocoon.sitemap.ErrorNotifier", cconf2);
+ transformer_config_link_translator = cconf2;
+ transformer_link_translator =
+ (Transformer) load_component ("org.apache.cocoon.sitemap.LinkTranslator", cconf2);
/* Configure generators */
<xsl:call-template name="config-components">
@@ -745,6 +751,10 @@
return view_<xsl:value-of select="translate(@name, '- ', '__')"/> (pipeline, listOfLists, environment);
}
</xsl:for-each>
+ // performing link translation
+ if (environment.getObjectModel().containsKey(Cocoon.LINK_OBJECT)) {
+ pipeline.addTransformer (transformer_link_translator, null, transformer_config_link_translator, emptyParam);
+ }
</xsl:if>
</xsl:if>
<xsl:variable name="component-type">
Re: cvs commit:
xml-cocoon/src/org/apache/cocoon/components/language/markup/sitemap/java
sitemap.xsl
Posted by Giacomo Pati <Gi...@pwr.ch>.
stefano@locus.apache.org wrote:
>
> stefano 00/09/30 17:19:54
>
> Modified: src/org/apache/cocoon/components/language/markup/sitemap/java
> Tag: xml-cocoon2 sitemap.xsl
> Log:
> added hidden link translator code (Giacomo, please check if the location is right... this logicsheet is a nightmare to understand without any comment!!!!
Yup! As soon as I find more time to comtribute I will comment all my
stuff seriously. But for now let's have something working.
> @@ -745,6 +751,10 @@
> return view_<xsl:value-of select="translate(@name, '- ', '__')"/> (pipeline, listOfLists, environment);
> }
> </xsl:for-each>
> + // performing link translation
> + if (environment.getObjectModel().containsKey(Cocoon.LINK_OBJECT)) {
> + pipeline.addTransformer (transformer_link_translator, null, transformer_config_link_translator, emptyParam);
> + }
> </xsl:if>
> </xsl:if>
> <xsl:variable name="component-type">
Yes, this is exactly the place to put your translater in :)
Giacomo
--
PWR GmbH, Organisation & Entwicklung Tel: +41 (0)1 856 2202
Giacomo Pati, CTO/CEO Fax: +41 (0)1 856 2201
Hintereichenstrasse 7 Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen Mailto:Giacomo.Pati@pwr.ch
Web: http://www.pwr.ch