I've had to start processing "SPL" Files from the FDA. Turns out the XSLT the FDA publishes is (how to say this nicely) .. "Not the highest quality".
It wont process at all with saxon 9 due to errors. The errors exist in saxon 6 but are warnings so they were ignored. There were so many that I couldnt easily fix the XSL file so I needed to process it with saxon 6. I was able to implement an "xslt1" command which uses the saxon6 jar in the same JVM as saxon 9 ! Quite a feat ... so now xmlsh has xslt 1.0 and 2.0 commands built in.
In addition I needed to run XSLT from MarkLogic. Since its not natively supported the suggested workaround is using a servlet and http-post the xml to the servelet. Xmlsh to the rescue ! I wrote a simple Tomcat servlet for xmlsh. There were some weird problems with it taking over stdin/stdout so I had to imrove on the assumption about taking over System.in and System.out in a container environment. Also had to buffer the input and output or else strange things happened occasionally depending on the document size, but now its working !
Expect to see a xmlsh servlet, either as a seperate package or builtin to the core distro, I havent decided yet.
Expect to see a xmlsh servlet, either as a seperate package or builtin to the core distro, I havent decided yet.
This comment has been removed by the author.
ReplyDeleteInteresting work. Some manpages or help docs will be helpful.
ReplyDeleteThanks, when I am happy with the servelet code I'll include it with the next release and document it.
ReplyDeleteStill on the fence on if I should include it as part of the core, or as a seperate download. Thinking mostly a seperate download so that I can include the whole WAR structure which will be easier to use.
The xmlsh servlet code is now part of release 1.0.0.1 and documented at http://www.xmlsh.org/EmbeddingServlet
ReplyDeleteExcellent post and writing style. Bookmarked.
ReplyDelete