cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@sundn.de>
Subject C2: Bug in selector translation
Date Thu, 02 Nov 2000 15:55:41 GMT
I tried to use the Selectors again and found two problems
I used the following configuration:
	
	<map:selectors default="browser">
   		<map:selector src="org.apache.cocoon.selection.BrowserSelectorFactory" name="browser">
			<browser name="explorer" useragent="MSIE"/>
			<browser name="pocketexplorer" useragent="MSPIE"/>
			<browser name="handweb" useragent="HandHTTP"/>
			<browser name="avantgo" useragent="AvantGo"/>
			<browser name="imode" useragent="DoCoMo"/>
			<browser name="opera" useragent="Opera"/>
			<browser name="lynx" useragent="Lynx"/>
			<browser name="java" useragent="Java"/>
			<browser name="wap" useragent="Nokia"/>
			<browser name="wap" useragent="UP"/>
			<browser name="wap" useragent="Wapalizer"/>
			<browser name="mozilla5" useragent="Mozilla/5"/>
			<browser name="mozilla5" useragent="Netscape6/"/>
			<browser name="netscape" useragent="Mozilla"/>
  		</map:selector>
   		<map:selector src="de.sundn.prod.sunshine.selection.LocalSelectorFactory" name="sunShineLocalSelector"/>
	</map:selectors>

Both selectors are factories. The translation of the stylesheet invokes two times the method
"generateClassSource()" of the default selector (here: "browser") but never of the second
translator.

Using the following pipeline fragment (which doesn't make sense, I know - but it is works
for the translation):
	<map:select type="sunShineLocalSelector">
		<map:when test="local">
			<map:redirect-to uri="licencing"/>
		</map:when>
		<map:otherwise>
			<map:redirect-to uri="portalsunshine"/>
		</map:otherwise>
	</map:select>
	<map:select type="browser">
		<map:when test="local">
			<map:redirect-to uri="licencing"/>
		</map:when>
		<map:otherwise>
			<map:redirect-to uri="portalsunshine"/>
		</map:otherwise>
	</map:select>
Only for the first map:when test="local" is code generated, but not for the second one.

I looked now for a very long time into the sitemap.xsl, but I don't see the bug. Does anyone
of you?


Regards
Carsten Ziegeler

Open Source Group              sunShine - Lighting up e:Business
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                           mailto:cziegeler@sundn.de 
================================================================


Mime
View raw message