[opencms-dev] newbie: parse & modify generated page

Jonathan Woods jonathan.woods at scintillance.com
Wed Aug 16 17:32:01 CEST 2006


Gerhard - 

There's a recent thread started by Yuriy Glebov which concerns methods for
obtaining the values of XML document nodes.  You could do that, grabbing
(e.g.) the content of the "body" node into a String, then do with that
whatever you wanted.  Naturally, this would mean not using <cms:include...>,
and instead dropping into scriptlet world - but at least you can do whatever
you want there.

Jon 

-----Original Message-----
From: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org] On Behalf Of Gerhard Erich Bruckner
Sent: 16 August 2006 16:25
To: The OpenCms mailing list
Subject: Re: [opencms-dev] newbie: parse & modify generated page

thanks for the comments. let me reformulate once more:

is there any way of post-processing the output of e.g.
cms.include( null, "body" ) ?

the context: i want to add a filter that substitutes certain text nodes (if
content matches regular expression) for nodes of other type (<acronym>, <a>,
...) after the page is assembled -> to force the content authors to have
their abbreviations explained without interfering with their sources!

i have a prototype javascript that performs very poorly - for that reason i
would like to have it done on the server-side.

we use opencms VERSION 5

thx,
gerhard

On Mon, 14 Aug 2006, Shi Yusen wrote:

> Hi Gerhard,
> 
> What does elegant way mean? Generally, you can parse the page with jTidy.
> You can download a weather module for OpenCms 5.0 (sorry, I cann't 
> remember the url for this module) and see what it does.
> 
> Regards,
> 
> Shi Yusen/Beijing Langhua Ltd.
> --------------------------------------------------------------
> Tel: 86-10-88514088, 88514099
> Fax: 86-10-88514099
> Email: shiys at langhua.cn
> Website: http://www.langhua.cn/
> --------------------------------------------------------------
>  
> -----????-----
> ???: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.
> org] ?? Gerhard Erich Bruckner
> ????: 2006?8?14? 18:34
> ???: opencms-dev at opencms.org
> ??: [opencms-dev] newbie: parse & modify generated page
> 
> hi there!
> 
> does anyone know of an elegant way of parsing and modifying the 
> already-generated DOM of an HTTP-response (for a certain project) 
> before returning the result to the browser?
> 
> from my understanding, that can only be done in the somewhere close to 
> the main servlet. (the controller in MVC terms)
> 
> any ideas? (for version 5)
> 
> thx!
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change 
> your list options, or to unsubscribe from the list, please visit 
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 
> 
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list To change 
> your list options, or to unsubscribe from the list, please visit 
> http://lists.opencms.org/mailman/listinfo/opencms-dev
> 

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





More information about the opencms-dev mailing list