Processing a file with HaXml without invoking processXmlWith?

Hi all, I've an application which needs to process some XML, but the only way I can see in the Haddock-generated documentation is using the processXmlWith wrapper, which reads it's input and output arguments from the command line. I'd prefer a pure function which took a Document or a String and returned the same, processed. I hope I've overlooked something. Regards, Echo Nolan

It certainly *is* possible to process XML directly. I have a test module for a modified version of HaXml that do this... maybe this helps? The text program is: http://www.ninebynine.org/Software/HaskellUtils/HaXml-1.12/test/TestXml.hs with supporting data files in the same directory: http://www.ninebynine.org/Software/HaskellUtils/HaXml-1.12/test/ which is all part of my modified version of HaXml at: http://www.ninebynine.org/Software/HaskellUtils/HaXml-1.12/ You may also need to check out my 'Traverse' module: http://www.ninebynine.org/Software/HaskellUtils/HaXml-1.12/src/Text/XML/HaXm... This code is all heavily refactored from the original HaXml for improved XML entity handling, namespace, xml:lang and xml:base support, but I'm fairly sure I didn't actually add anything else that you couldn't reasonably get at using the original HaXml API. #g -- At 01:23 02/06/05 -0700, Echo Nolan wrote:
Hi all, I've an application which needs to process some XML, but the only way I can see in the Haddock-generated documentation is using the processXmlWith wrapper, which reads it's input and output arguments from the command line. I'd prefer a pure function which took a Document or a String and returned the same, processed. I hope I've overlooked something. Regards, Echo Nolan
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
------------ Graham Klyne For email: http://www.ninebynine.org/#Contact

Graham Klyne writes:
This code is all heavily refactored from the original HaXml for improved XML entity handling, namespace, xml:lang and xml:base support [...].
Is there any chance of reuniting the two HaXml versions into a single release? I maintain quite a bit of code that's based on Malcolm's original HaXml version, and I'm reluctant to switch because I'm very happy with his library, but I would also like to have support for the features you've mentioned. So from my perspective, getting your changes back into the "main release" would be the best course of action. We've talked about that before. Has there been any progress? Peter

At 14:38 02/06/05 +0200, Peter Simons wrote:
Graham Klyne writes:
This code is all heavily refactored from the original HaXml for improved XML entity handling, namespace, xml:lang and xml:base support [...].
Is there any chance of reuniting the two HaXml versions into a single release?
Well, this has been discussed, and I think that Malcolm is broadly favourable in principle, but it ultimately depends upon both of us finding time and effort to do the requisite merging. I did talk about my changes with Malcolm as I applied them, so I would hope there's not too much there that is incompatible with his vision for HaXml. Meanwhile, when I have time, I hope to package my version as a Cabal package so that those who want the features I added have a reasonably easy route to using them. Until then, the best I can offer is the code on my web site.
I maintain quite a bit of code that's based on Malcolm's original HaXml version, and I'm reluctant to switch because I'm very happy with his library, but I would also like to have support for the features you've mentioned. So from my perspective, getting your changes back into the "main release" would be the best course of action.
When making changes, I did try fairly hard to maintain as much backward compatibility as I could -- adding features and interfaces rather than displacing them -- though I think there were a couple of unavoidable type signature changes. The most intractable incompatibilities may be incompatible XML handling where I have made changes to follow the official specification more closely.
We've talked about that before. Has there been any progress?
Sadly, no :-( #g ------------ Graham Klyne For email: http://www.ninebynine.org/#Contact

On 2 Jun 2005, Peter Simons wrote:
Graham Klyne writes:
This code is all heavily refactored from the original HaXml for improved XML entity handling, namespace, xml:lang and xml:base support [...].
Is there any chance of reuniting the two HaXml versions into a single release?
Even worse, since I like strong typing and was annoyed by the (a -> [a]) filters and the separation of characters and entities I started some wrappers to HaXml. I use a general tree data structure which is then filled with XML data. The modules allow me to use the type specific functions 'filter', 'concatMap' and all the other standard list functions instead of 'o'. http://cvs.sourceforge.net/viewcvs.py/parallelweb/saksell/modules/ListTree.hs?rev=1.1&view=auto http://cvs.sourceforge.net/viewcvs.py/parallelweb/saksell/modules/XmlString.hs?rev=1.2&view=auto http://cvs.sourceforge.net/viewcvs.py/parallelweb/saksell/modules/XmlTree.hs?rev=1.3&view=auto
participants (4)
-
Echo Nolan
-
Graham Klyne
-
Henning Thielemann
-
Peter Simons