Saturday, May 22, 2004
Xan Xupdate Xon How Things Xare Going
So I'm really getting annoyed at the entire collection of XML-related software tools. Do you really need to preface everything with an X? Xalan, Xang, Xerces, Xindice, Xupdate, Xquery, Xpath... I'm also annoyed at how the documentation for Cocoon sucks. And don't give me the usual open source trash about how I can go fix it if I don't like it -- I don't understand it enough yet! (Perhaps one day...) I especially enjoy how the Cocoon Wiki has a nice smattering of articles, each relevant to a different Cocoon release. Taken on the whole, they probably just screw over newcomers to the Cocoon scene more than they help. Someone with experience should scan through it and cull the outdated stuff.
The good news: I've finally got Cocoon 2.1.4 and Xindice 1.1b4 playing happily with each other. It even supports XUpdates, which is nice.
I'm a bit confused - the problem manifested itself as an exception compiling the xupdate query due to the fact that the xmlns:xu attribute was being clobbered in one of the pipelines... but I have no idea where or how. I ended up just hacking the queryDocument() method in Collection.java. First, declare the following constant in the class declaration area:
Next, near line 1232, right after the
Now the next thing to look at is how to get arbitrary fragments from Xindice included into random documents. The CInclude transformer and xmldb pseudo-protocol are looking mighty useful for that right about now.
The good news: I've finally got Cocoon 2.1.4 and Xindice 1.1b4 playing happily with each other. It even supports XUpdates, which is nice.
I'm a bit confused - the problem manifested itself as an exception compiling the xupdate query due to the fact that the xmlns:xu attribute was being clobbered in one of the pipelines... but I have no idea where or how. I ended up just hacking the queryDocument() method in Collection.java. First, declare the following constant in the class declaration area:
protected static final String SEARCH_STRING = "";
Next, near line 1232, right after the
public final NodeSet queryDocument(String style, String query, NamespaceMap nsMap, Object key)
declaration, insert the following piece of sleaze:
query = query.substring(0, query.indexOf(SEARCH_STRING)) +
"" +
query.substring(query.indexOf(SEARCH_STRING) + SEARCH_STRING.length(), query.length());
Now the next thing to look at is how to get arbitrary fragments from Xindice included into random documents. The CInclude transformer and xmldb pseudo-protocol are looking mighty useful for that right about now.