cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Corey Keith" <>
Subject Dynamic transformation from value in xml document
Date Thu, 01 May 2003 02:57:02 GMT
A newbie question here so I may be overlooking the obvious but anyway...
  I've got a pretty simple pipeline but I'd like to use an attribute
value from my generated document to determine the transformation xslt. 
For something like this:

<map:match pattern="*">
  <map:generate src="mets/{1}.xml"/>
  <map:transform src="xslt/{a value from {1}.xml}.xsl">
    <map:parameter name="use-request-parameters" value="true"/>

So for example if the request was 
and 12345.xml had an attribute on the root node called type with the
value of "book":

<map:match pattern="*">
  <map:generate src="mets/12345.xml"/>
  <map:transform src="xslt/book.xsl">
    <map:parameter name="use-request-parameters" value="true"/>

I was thinking about writing an action which I would pass the source
document location and then sax parse to obtain my value and return that
to the sitemap for later processing.  Does this sound reasonable?  It
seems as if there should be an easier solution.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message