[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: cocoon or xalan

Subject: Re: cocoon or xalan
From: Steven Noels <stevenn@xxxxxxxxxxxxxxxx>
Date: Tue, 18 Jun 2002 00:26:19 +0200
Re:  cocoon or xalan
Joerg Heinicke wrote:

there is no either or with Cocoon and Xalan. The first one is an XML publishing framework (http://xml.apache.org/cocoon/index.html), the second one an XSLT processor. Cocoon uses normally Xalan, but you can use any other Java XSLT processor too (I think).
What are your "coding issues"? You can setup quite fast a business logic in the sitemap, but maybe you don't want to. An easy transformation in the sitemap looks like the following:


<map:match pattern="index.html">
  <map:generate src="index.xml"/>
  <map:transform src="index.xsl"/>
  <map:serialize type="html"/>
</map:match>


or more interestingly (and still very simple):


<map:match pattern="**.html">
  <map:generate src="{1}.xml"/>
  <map:transform src="somestylesheet.xsl"/>
  <map:serialize type="html"/>
</map:match>

This will match every request that ends with a .html, and will use the matched part of the URI (**) to substitute the {1} portions further down below, i.e.

   URI request                                 XML source document
-----------------------------------------------------------------------
http://host:port/mountpoint/index.html    ->   index.xml
http://host:port/mountpoint/foo/bar.html  ->   foo/bar.xml

Other cool features are aggregation (merging several XML pipelines into one - think 'portal' or 'frames-on-steroids'), and a host of components doing RDBMS-querying, PDF-serialization, SVG and whatnot.

Yes, it's much more elaborate than Xalan packaged as a Servlet, but it offers you much more bang for (no) buck.

HTH,

</Steven>


-- Steven Noels http://outerthought.org/ Outerthought - Open Source, Java & XML Competence Support Center stevenn@xxxxxxxxxxxxxxxx stevenn@xxxxxxxxxx


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.