cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guardiola, Derek (ELS-STL))" <D.Guardi...@Elsevier.com>
Subject RE: sitemap.xls - XSLTFactoryLoader flaw?
Date Wed, 11 Jun 2003 15:28:31 GMT

CVS "latest source distribution". I'm not sure exactly which version that is
distributed but I believe it might be 2.0.4 due to the timestamp.

--
Derek Guardiola
Elsevier Science


-----Original Message-----
From: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
Sent: Tuesday, June 10, 2003 3:56 PM
To: cocoon-dev@xml.apache.org
Subject: Re: sitemap.xls - XSLTFactoryLoader flaw?


Hmm, I never I had any problems with the sitemap in such a simple case 
with nearly all Cocoon versions 2.0.4 and below. In current 2.0 CVS and 
in 2.1 the sitemap.xsl (=> compiled sitemap) is no longer used as 
default, but the interpreted sitemap, which as a lot faster.

What's the Cocoon version you use?

Joerg

Guardiola, Derek (ELS-STL)) wrote:
> lines 454 of sitemap.xls
> 
>           // Prepare the pattern for "<xsl:value-of select="@pattern"/>"
>           this.<xsl:value-of select="$matcher-name"/>_expr =
> this.preparePattern("<xsl:value-of select="$matcher-type"/>",
"<xsl:value-of
> select="XSLTFactoryLoader:escapeBraces($factory-loader, @pattern)"/>");
> 
> 
> 
> The XSLTFactoryLoader:escapeBraces($factory-loader, @pattern) seems to be
> causing the site mappings "pattern" to come out blank after the first
> map:match tag.  In the generated file (sitemap_xmap.java) looks like
this..
> 
> 
> 
>       /** Prepare patterns of PreparableMatchers. */
>       public void prepareMatchers() throws Exception {
>       
>       
>           // Prepare the pattern for "hello.html"
>           this.matcher_N1006D_expr = this.preparePattern("wildcard",
> "hello.html");
>           
>           // Prepare the pattern for "hello2.html"
>           this.matcher_N1007B_expr = this.preparePattern("wildcard", "");
> {SHOULD BE hello2.html}
>           
>           // Prepare the pattern for "helloCustom.html"
>           this.matcher_N10089_expr = this.preparePattern("wildcard", "");
> {SHOULD BE helloCustom.html}
>           
>           // Prepare the pattern for "hellocustomgen.html"
>           this.matcher_N10097_expr = this.preparePattern("wildcard", "");
> {SHOULD BE hellocustomgen.html}
>           
>       }
> 
> 
> the xmap file...
> 
>  <map:pipelines>
>  
>  	<map:pipeline>   
> 		<map:match pattern="hello.html" type="wildcard">
> 			<map:generate src="test/hello.xml" />
> 		    <map:transform src="test/hello.xsl" />
> 		    <map:serialize type="html" />
> 		</map:match>
> 
> 		<map:match pattern="hello2.html" type="wildcard">
> 			<map:generate src="test/hello.xml" />
> 		    <map:transform src="test/hello.xsl" />
> 		    <map:serialize type="html" />
> 		</map:match>
> 
> 		<map:match pattern="helloCustom.html" type="wildcard">
> 			<map:generate type="myGenerator" />
> 			<map:transform src="test/hello.xsl" />
> 		    <map:serialize type="html" />
> 		</map:match>
> 	
> 		<map:match pattern="hellocustomgen.html" type="wildcard">
> 			<map:generate type="myGenerator" />
> 			<map:transform src="test/hello.xsl" />
> 		    <map:serialize type="html" />
> 		</map:match>
> 	</map:pipeline>
> 
> </map:pipelines>
> 
> 
> 
> 
> 
> 
> I removed the $factory-loader from the method call and it seems to be
> working ok now.  Is this a bug in the system that might need to be
> corrected?
> 
> XSLTFactoryLoader:escapeBraces(@pattern) is the solution, but i don't want
> to circumvent anything.
> 
> 
> --
> Derek Guardiola
> Elsevier Science

Mime
View raw message