Harry J. Foxwell wrote: > I have an xml document with several types of map elements, > <Map1>, <Map2>, ... I was trying > to produce one large SVG doc from this for transformation to one > big JPG for browser display. But for what I want to do with the > SVG, it will probably be easier for me to produce a separate SVG > for each type of map element each with different stylesheets. > But then I need to run each of the SVGs through the svg2jpg > serializer and finally create a single HTML page containing all > the resulting JPGs. I hope this is clear: > > +-------+ > |<Map1> | ---> m1(svg) ---> m1(jpg) \ > | | \ > |<Map2> | ---> m2(svg) ---> m2(jpg) \ > | | > abc.html > | ... | ... / > | | / > |<MapN> | ---> mN(svg) ---> mN(jpg) / > +-------+ > abc.xml > > Not sure how to set up my stylesheets & sitemaps for this. > Any hints/examples?
Harrry: It might help to start out thinking about your final desired result.. in your case from right to left in your diagram, you want to end up with an html file, which has jpegs in it. The jpegs are also requested from cocoon, and the requests for those jpegs in turn trigger their own map:match requests. Additionally, it may help to break out each of your <Map1>, <Map2> .. <MapN> out into separate map1.xml, map2.xml, ... mapN.xml files. That way, you can match based on a wildcard and use the same XSL script for all of your maps. I would imagine something like the following: <map:pipeline> <map:match pattern="abc.html"> <map:generate type="file" src="documents/page.xml"/> <map:transform src="stylesheets/page2html.xsl"/> <map:serialize type="xhtml"/> </map:match> <map:match pattern="m*.jpg"> <map:generate type="file" src="documents/map{1}.xml"/> <map:transform src="stylesheets/map2svg.xsl"/> <map:serialize type="svg2jpeg"/> </map:match> </map:pipeline> If you need to keep all of your maps in abc.xml, I would suggest capturing a number in the map:match pattern and then sending it onto your XSL script that would pull out the correctly-numbered map element in your source file. HTH, TC Tony Collen -- [EMAIL PROTECTED] College of Liberal Arts University of Minnesota, Minneapolis, West Bank --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>