cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steven.no...@the-ecorp.com
Subject RE: [C2] Sitemap compilation problem
Date Wed, 07 Mar 2001 08:50:07 GMT
Starting to answer my own question (as far as I can get):

I found this code fragment in the generated sitemap which looks kind of
suspicious for me:

      if ((map = wildcardMatch(matcher_wildcard_N187_expr,
                               objectModel)) != null) {
        getLogger().debug("Matched matcher_wildcard_N187");
        listOfMaps.add (map);


        if (true)
          return resource_resources /
                 thoughts(pipeline, listOfMaps, environment,
                          cocoon_view);


        listOfMaps.remove (listOfMaps.size() - 1);
      }

To the best of my knowledge (my Java awareness is much too fresh however),
the slash (resource_resources / thoughts) shouldn't be there.

Another thing I have found out is that apparently resources need to be
defined separately:

	<map:resources>
		<map:resource name="slides">
			<map:generate src="docs/samples/slides/slides.xml"/>
			<map:transform
src="stylesheets/slides/slides-navigation.xsl"/>
			<map:transform
src="stylesheets/slides/slides-apachecon.xsl"/>
			<map:serialize/>
		</map:resource>
	</map:resources>

	<map:match pattern="slides/slides">
		<map:redirect-to resource="slides"/>
	</map:match>

What I'll try next is to define separate resources for the faulthy pipelines
in my map, but xml2java via xsl clearly isn't a debug friendly environment
;-(

</Steven>

> -----Original Message-----
> From: steven.noels@the-ecorp.com [mailto:steven.noels@the-ecorp.com]
> Sent: Wednesday, March 07, 2001 8:47 AM
> To: cocoon-dev@xml.apache.org
> Subject: [C2] Sitemap compilation problem
> 
> 
> Hi,
> 
> I've run into some troubles getting the sitemap compiled, my 
> wild guess is
> because of the / in the name of the resource (not the URI) 
> I'm trying to
> redirect to.
> 
> I've been looking around in the XSL that does the sitemap XML->Java
> conversion, to no avail however :-(
> 
> relevant portion of my sitemap:
> 
>     <map:match pattern="resources/">
>         <map:redirect-to resource="resources"/>
>     </map:match>
> 
>     <map:match pattern="resources">
>         <map:generate src="content/resources/resources.xml"/>
>         <map:transform src="style/section.xsl"/>
>         <map:serialize type="html"/>
>     </map:match>
> 
>     <map:match pattern="resources/thoughts/">
>         <map:redirect-to resource="resources/thoughts"/>
>     </map:match>
> 
>     <map:match pattern="resources/thoughts">
>         <map:generate src="content/resources/thoughts/index.xml"/>
>         <map:transform src="style/listsection.xsl"/>
>         <map:serialize type="html"/>
>     </map:match>
> 
>     <map:match pattern="resources/thoughts/*">
>         <map:generate src="content/resources/thoughts/{1}.xml"/>
>         <map:transform src="style/thought.xsl"/>
>         <map:serialize type="html"/>
>     </map:match>
> 
> compilation error in the log:
> 
> DEBUG   7701    [cocoon  ] (Thread-24): Language Exception
> org.apache.cocoon.components.language.LanguageException: 
> Error compiling
> sitemap_xmap:
> Line 0, column 0:
> D:\bin\apps\jakarta-tomcat-3.2\work\localhost_8080%2Fcocoon\or
> g\apache\cocoo
> n\www\sitemap_xmap.java:1341: Method
> resource_services(org.apache.cocoon.sitemap.ResourcePipeline,
> java.util.List, org.apache.cocoon.environment.Environment, 
> java.lang.String)
> not found in class org.apache.cocoon.www.sitemap_xmap.
>           return resource_services(pipeline, listOfMaps,
>                                   ^
> Line 0, column 0:
> D:\bin\apps\jakarta-tomcat-3.2\work\localhost_8080%2Fcocoon\or
> g\apache\cocoo
> n\www\sitemap_xmap.java:1485: Method
> resource_resources(org.apache.cocoon.sitemap.ResourcePipeline,
> java.util.List, org.apache.cocoon.environment.Environment, 
> java.lang.String)
> not found in class org.apache.cocoon.www.sitemap_xmap.
>           return resource_resources(pipeline, listOfMaps,
>                                    ^
> Line 0, column 0:
> D:\bin\apps\jakarta-tomcat-3.2\work\localhost_8080%2Fcocoon\or
> g\apache\cocoo
> n\www\sitemap_xmap.java:1565: Undefined variable: resource_resources
>           return resource_resources /
>                  ^
> Line 0, column 0:
> D:\bin\apps\jakarta-tomcat-3.2\work\localhost_8080%2Fcocoon\or
> g\apache\cocoo
> n\www\sitemap_xmap.java:1566: Method
> thoughts(org.apache.cocoon.sitemap.ResourcePipeline, java.util.List,
> org.apache.cocoon.environment.Environment, java.lang.String) 
> not found in
> class org.apache.cocoon.www.sitemap_xmap.
>                  thoughts(pipeline, listOfMaps, environment,
>                          ^
> Line 0, column 0:
> D:\bin\apps\jakarta-tomcat-3.2\work\localhost_8080%2Fcocoon\or
> g\apache\cocoo
> n\www\sitemap_xmap.java:1710: Undefined variable: resource_resources
>           return resource_resources /
>                  ^
> Line 0, column 0:
> D:\bin\apps\jakarta-tomcat-3.2\work\localhost_8080%2Fcocoon\or
> g\apache\cocoo
> n\www\sitemap_xmap.java:1711: Method
> presentations(org.apache.cocoon.sitemap.ResourcePipeline, 
> java.util.List,
> org.apache.cocoon.environment.Environment, java.lang.String) 
> not found in
> class org.apache.cocoon.www.sitemap_xmap.
>                  presentations(pipeline, listOfMaps,
>                               ^
> 
> 	at
> org.apache.cocoon.components.language.programming.java.JavaLan
> guage.compile(
> JavaLanguage.java:201)
> 	at
> org.apache.cocoon.components.language.programming.CompiledProg
> rammingLanguag
> e.load(CompiledProgrammingLanguage.java:132)
> 	at
> org.apache.cocoon.components.language.generator.ProgramGenerat
> orImpl.generat
> eResource(ProgramGeneratorImpl.java:245)
> 	at
> org.apache.cocoon.components.language.generator.ProgramGenerat
> orImpl.load(Pr
> ogramGeneratorImpl.java:163)
> 	at org.apache.cocoon.sitemap.Handler.run(Handler.java:174)
> 	at java.lang.Thread.run(Thread.java:484)
> 
> Complete sitemap & generated sitemap_xmap.java available on 
> simple request
> :-)
> 
> I'm running a relatively fresh (couple of days) full CVS 
> check-out in the
> Tomcat 3.2 container.
> 
> </Steven>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

Mime
View raw message