cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ola Berg <>
Subject 3 suggestions
Date Thu, 05 Sep 2002 09:29:37 GMT
Being a user of the Cocoon XML-publishing feature, I have not thought of any improvements in
the web-app/flowscript area.

But here are some random thougths. The first two, I have to implement real soon.

1) XML directory generator

Given a dir


Where doc1 and doc2 contains a <title> element:

 <title>Document <number>1</number></title>

I would like to write this in the sitemap:

<map:generate type=\"xml-directory\" src=\"file:/path/to/dir\" xpath=\"/doc/title\"/>

and get this from the serializer

<dir:directory name=\"dir\" lastModified=\"1026478615000\" date=\"7/12/02 2:56 PM\" requested=\"true\">
  <dir:file name=\"doc1.xml\" lastModified=\"1010746920000\" date=\"1/11/02 12:02 PM\"
content=\"Document 1\"/> 
  <dir:file name=\"doc2.xml\" lastModified=\"1010746920000\" date=\"1/11/02 12:02 PM\"
content=\"Document 2\"/> 

Maybe one could do it more elaborate passing through markup in the extracted document snippet
(using namespaces)

<dir:file name=\"doc1.xml\" ...>
  Document <a:number>1</a:number>

2) Lousy HTML. At work there are legacy web apps where bad HTML is generated by bad old scripts.
In an attempt to XML-ize and automate, we need to be able to handle the lousy HTML. But even
with a site map that says:

<map:generate src=\"hello.html\" type=\"html\"/>
 <map:serialize type=\"xhtml\"/>
the tidy can\'t even handle

 <h1>Hello, world!</H1>
  Hi there.
  This is plain wrong.
  But it works in certain browsers
...and the \"html\" I need to handle is worse than that. 

3) src-path in the exceptions from the parsers

As it stands, it is difficult to determine which of the sources in a pipe that the parser
compains about. Isn\'t it possible to wrap the exceptions so that info on what part of the
process that did fail?


0733 - 99 99 17

To unsubscribe, e-mail:
For additional commands, email:

View raw message