This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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@outerthought.org stevenn@apache.org


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]