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

dir/
 doc1.xml
 doc2.xml

Where doc1 and doc2 contains a <title> element:

<doc>
 <title>Document <number>1</number></title>
...
</doc>

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\"/> 
</dir:directory>

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>
</dir:file>

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

<html>
<body>
 <h1>Hello, world!</H1>
  Hi there.
 <p>
  This is plain wrong.
 <p>
  But it works in certain browsers
</body>
</html>
 
...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?

/O

--------------------
[EMAIL PROTECTED]
0733 - 99 99 17

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to