[opencms-dev] <cms:parse> usage
Christoph P. Kukulies
kuku at physik.rwth-aachen.de
Fri Sep 26 18:08:01 CEST 2008
On Fri, Sep 26, 2008 at 03:03:37PM +0100, Olli Aro wrote:
> Well you cannot paste that code in as it is in your CustomVisitor, since it
> includes references to all kind of bespoken stuff we have. It was just an
> illustration on how to use the parsers and add width and height property to
> image tags that are missing it.
>
> Maybe it would help if you tell me what you are hoping to achieve with your
> custom parser and then I can give you pointers on how to do it?
Actually I was seeking a way to write out all links in my pages into a
file. Something that wget -r does from the outside.
--
Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>
> Regards,
>
> Olli
>
> -----Original Message-----
> From: Christoph P. Kukulies [mailto:kuku at physik.rwth-aachen.de]
> Sent: 26 September 2008 14:43
> To: olli_aro at yahoo.co.uk; The OpenCms mailing list
> Subject: Re: [opencms-dev] <cms:parse> usage
>
>
> Hi Olli,
>
> I'm following this thread with great interest. Still I - me mundane -
> have no idea where one should put that code piece below.
>
>
> On Fri, Sep 26, 2008 at 02:05:58PM +0100, Olli Aro wrote:
> > The whole point of this is that you can parse through the content inside
> the
> > tag and do what ever you like with that content. The most common
> application
> > would be to manipulate content. For example we have used this in order to
> > ensure that all images in the content have width and height attributes
> set.
> >
> > Below is some code for you for this application:
> >
> > /*
> > * (non-Javadoc)
> > * @see org.opencms.util.CmsHtmlParser#visitTag(org.htmlparser.Tag)
> > */
> > public void visitTag(Tag tag) {
> >
>
> ....
>
> --
> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
More information about the opencms-dev
mailing list