cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörn Heid <h...@fh-heilbronn.de>
Subject AW: XML selector
Date Thu, 06 Sep 2001 08:08:40 GMT
I don't think this is possible as of SAX: When the first element is
generated from your xsp the pipeline has to be determined.
What you want to have is that the pipeline depends on the dom tree (C1). For
that, you have to find another way.

The simplest solution for your problem, I think, is to write an action which
puts the information you desires into the sitemap. Then you can use the
ParameterSelectorFactory to determine the transformation.

Other opinions? Am I right?

JOERN_HEID


-----Ursprüngliche Nachricht-----
Von: Paolo [mailto:lavoro@arsenio.net]
Gesendet: Donnerstag, 6. September 2001 09:47
An: Cocoon-Users
Betreff: XML selector


I need to select the correct stylesheet checking some XML flags of the
pipeline. Something like this (look at the XML selector):

	<map:match pattern="*">
 	   <map:generate type="serverpages" src="db.xsp"/>

	   <map:select type="xml " node="/test/test2/flag">
	      <!-- you could insert parameters here as well -->
	      <map:when test="normal">
   	         <map:transform src="stylesheets/normal.xsl"/>
	      </map:when>
	      <map:when test="special">
   	         <map:transform src="stylesheets/special.xsl"/>
		 <map:serialize/>
	      </map:when>
	      <map:otherwise>
   	         <map:transform src="stylesheets/default.xsl"/>
	      </map:otherwise>
	   </map:select>

   	   <map:transform src="stylesheets/dynamic-page2html.xsl"/>
   	   <map:serialize/>
   	</map:match>

Remember I don't want to do that in the XSP generator because of leaving
separated logic and view of my page.

Any hint for me?

ByeBye,
Paolo Scaffardi
AIRVENT SAM S.p.A.



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message