[opencms-dev] External editing

M Butcher mbutcher at grcomputing.net
Thu Jul 8 18:53:02 CEST 2004


Alex,

Alexander Kandzior wrote:
> Matt, Tom, all,
> 
> 
>>And it works avoids the problems of images, bad HTML, bad 
>>linking, etc. 
>>that a GUI like DreamWeaver would introduce.
> 
> 
> Spoken like a true programmer. Unfortunatly most of the not-so-programming
> adept customers will want that Dreamweaver support.

ROTFL! Yes... I've seen CMS contracts won and lost based on support for 
Dreamweaver and other HTML corruptors. ;-) Seriously, though, image 
support poses an interesting problem... would we automatically dump all 
of the image galleries to the DAV client?

>>On the other hand, creating a special 
>>launcher/loader/whatever-its-called-now to extract the HTML 
>>fragment and 
>>wrap it in <html><body> would probably be fairly easy.
> 
> 
> Well it wouldn't be a loader. A loader would means the resource is actually
> processed by a request.

I guess that if we were using a stand-alone servlet, then implementing a 
resource loader would be rather silly, wouldn't it?

> I think it would be just an API call, somhing like
> this:
> 
> 1. Somehow webdav http information about the file to edit is gathered.
> 2. The file is read from VFS with readFile(name)
> 3. The content of the file is transformed somehow from XML to HTML

This is as easy as grabbing the CDATA section from the DOM, right?

> 4. The transformed file is delivered through Webdav to end user
> 5. End user does modifications
> 6. The modified file is transferd back though webdav
> 7. The transformation from step 3 is applied backwards

This is slightly more complex... we don't know how much of the HTML to 
strip off. (Probably reasonible to take the contents of <body/>). 
Also... I don't know how well XERCES handles non-compliant HTML. I guess 
we could run it through JTidy first, though....

> 8. The modified and transformed file is saved to VFS with writeFile(name)

Otherwise, this sounds good.



More information about the opencms-dev mailing list