[XML4Lib] server-side XML and XSLT

Binkley, Peter Peter.Binkley at ualberta.ca
Wed Aug 16 12:51:21 EDT 2006


This is Cocoon's raison d'etre: http://cocoon.apache.org. You can store
the xml and xsl files in the directory structure, and specify pipelines
that indicate how a given request is to be handled, e.g. 
 
<map:match pattern="*.html">
     <map:generate src="docs/{1}.xml"/>
     <map:transform src="stylesheets/page2html.xsl"/>
     <map:serialize type="html"/>
</map:match>
 
This causes a request for "index.html" to be handled by running
"docs/index.xml" through "stylesheets/page2html.xsl" and sending it out
as html. Pipelines can be cached, so a new request for index.html would
be served from the cache unless either the xml or the xsl had been
changed in the meantime. 
 
There's a lot of power and complexity in Cocoon, but you can start with
a minimal sitemap
(http://wiki.apache.org/cocoon/MinimalSitemapConfiguration
<http://wiki.apache.org/cocoon/MinimalSitemapConfiguration> ) and add
extra components if you need them.
 
An alternative, if you're talking about a fairly small number of fairly
static documents, would be to transform them offline and mount the
resulting html as static files. I've blogged about a convenient way to
manage this kind of arrangement with Ant:
http://www.wallandbinkley.com/quaedam/?p=63 . 
 
Peter
 

Peter Binkley

Digital Initiatives Technology Librarian

Information Technology Services

4-30 Cameron Library

University of Alberta Libraries

Edmonton, Alberta

Canada T6G 2J8

Phone: (780) 492-3743

Fax: (780) 492-9243

e-mail: peter.binkley at ualberta.ca

 


________________________________

From: xml4lib-bounces at webjunction.org
[mailto:xml4lib-bounces at webjunction.org] On Behalf Of Pierre Nault
Sent: Wednesday, August 16, 2006 8:21 AM
To: xml4lib at webjunction.org
Subject: [XML4Lib] server-side XML and XSLT


Hello,

   I'm working on a project that consist on publishing, in HTML,
research guides of my colleagues librarians. The main documents are in
XML : we use XSLT stylesheets to transform it in HTML. The
transformations are done on the client-side... with some mitigated
results : browsers are not consistent with the way they deal with
XSLT-CSS-Javascript and XML. Now i'm starting to think that we should do
the transformations on the server-side : that way we just serve pure
html to the client.
I'm sorry for this naive question but, what do I need to do that sort of
work on the server-side. A year ago I used Saxon on command-line to deal
with MARCXML and FRBR but that's it : I'm a real beginner in the XML
technologies... Here we have a Window 2003 server with no database for
our web site. Do I need a database to store the xml files ? Do I have to
install an XSLT processor on the server ?... 

Thanks
Pierre Nault



-- 
What do you call a cyclist who doesn't wear a helmet?  An organ donor.
~David Perry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webjunction.org/wjlists/xml4lib/attachments/20060816/e0472717/attachment.htm


More information about the XML4Lib mailing list