[opencms-dev] XML/XSLT with OpenCMS

Olli Aro olli_aro at yahoo.co.uk
Fri Feb 20 20:39:01 CET 2004


Yes, if you store your document as plain text with extension .xml, OpenCMS
will automatically serve it with the correct mime type. Same works with the
xslt files. I have not ever needed this, but you should be able to easily
transform your xml within a JSP template and that way include it as part of
the OpenCMS content presentation (I have always used java taglibs for
including xml instead, since at least for me it works quicker than xslt).

Regarding the editor interfaces. I would recommend you to create a new
resource type. We discovered a way to do this last week, please see
http://mail.opencms.org/pipermail/opencms-dev/2004q1/009635.html, and I have
build already one XML based resource type with a form GUI since then:)

Regards,

Olli

-----Original Message-----
From: opencms-dev-admin at opencms.org [mailto:opencms-dev-admin at opencms.org]
On Behalf Of M Butcher
Sent: 20 February 2004 17:58
To: opencms-dev at opencms.org
Subject: Re: [opencms-dev] XML/XSLT with OpenCMS

Alex,

I've been occasionally tinkering with an XSLT translation module for 
OpenCms. Right now, I'm working on adding a new Resource Type for XML 
documents (rather than using Plain documents). Because I'm busy with 
"real" work, development of the module has been slow.

It appears, though, that a fairly simple module could be written that 
took two Plain resources (probably with extensions .xml and .xslt) and 
converted them at runtime to one HTML page. Xerces is included, but I 
think you will have to put Xalan in the lib/ directory of the module.

It probably wouldn't hurt to cache the output of Xalan, either. :)

Matt

Alex ! wrote:
> I would like to store data in XML, and retrieve then render with XSLT. 
> Is it as simple as adding the XSL stylesheet and using the apache.org 
> API (or similar) in a JSP ??? Just as you would with any other XML/XSLT 
> transformation.
> 
> Also I'm not quite sure about the best way to store the XML. I am 
> building a field based add/edit interface so I can structure my data and 
> dissallow any html from creeping in via content authors - but should I 
> place the generated XML into a "page"/"plain"/"text" type file with an 
> .xml extension or do it some other way.
> 
> I read some mails from matt butcher in the archives, is there already a 
> module out there to do this.
> 
> Does it even make sense to use the cms for the xml content. (I am going 
> to have to provide xml content syndication so xml is a must, but is xml 
> + OpenCMS a good way?
> 
> If this is a good way to go, I assume I'll have to create a module or 
> set of classes(as a layer) to do the work, which I will be happy to make 
> open source - so please do contribute your ideas.
> 
> Any help/suggestions would be very appreciated.
> 
> Alex.
> 
> _________________________________________________________________
> Tired of 56k? Get a FREE BT Broadband connection 
> http://www.msn.co.uk/specials/btbroadband
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 06/02/2004
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.580 / Virus Database: 367 - Release Date: 06/02/2004
 




More information about the opencms-dev mailing list