Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Robert Jacques
On Tue, 04 May 2010 21:55:53 -0400, Michel Fortin wrote: // String version: can slice string readUntil(isAtEndPredicate)(ref string input) { string savedInput; while (!input.empty && isAtEndPredicate(input.front)) { input.p

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Michel Fortin
On 2010-05-04 19:41:39 -0400, Andrei Alexandrescu said: Anyway, just in case, would you be interested in an XML tokenizer and simple DOM following this model? http://michelf.com/docs/d/mfr/xmltok.html http://michelf.com/docs/d/mfr/xml.html At the base is a pull parser and an event p

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Andrei Alexandrescu
Michel Fortin wrote: On 2010-05-04 12:09:29 -0400, Andrei Alexandrescu said: Graham Fawcett wrote: By "adapt" do you mean writing a wrapper for an existing library, or translating the source code of the library into D? What constitutes a "generous license" in this context? (For what it's wo

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Michel Fortin
On 2010-05-04 12:09:29 -0400, Andrei Alexandrescu said: Graham Fawcett wrote: By "adapt" do you mean writing a wrapper for an existing library, or translating the source code of the library into D? What constitutes a "generous license" in this context? (For what it's worth, libxml2 is under

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Graham Fawcett
On Tue, 04 May 2010 11:56:31 -0700, Andrei Alexandrescu wrote: > Graham Fawcett wrote: >> On Tue, 04 May 2010 09:09:29 -0700, Andrei Alexandrescu wrote: >> >>> Graham Fawcett wrote: On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote: > Graham Fawcett wrote: >> The fac

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Andrei Alexandrescu
Graham Fawcett wrote: On Tue, 04 May 2010 09:09:29 -0700, Andrei Alexandrescu wrote: Graham Fawcett wrote: On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote: Graham Fawcett wrote: The fact that libxml2/libxslt support not only XML parsing and DOM building, but also XSLT, XPath,

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Graham Fawcett
On Tue, 04 May 2010 09:09:29 -0700, Andrei Alexandrescu wrote: > Graham Fawcett wrote: >> On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote: >> >>> Graham Fawcett wrote: The fact that libxml2/libxslt support not only XML parsing and DOM building, but also XSLT, XPath, XPoint

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Richard Webb
RapidXML also uses the Boost license (it's included as part of the Boost PropertyTree library). I haven't used it though, so i can't say how i compares to the others.

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Andrei Alexandrescu
Graham Fawcett wrote: On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote: Graham Fawcett wrote: The fact that libxml2/libxslt support not only XML parsing and DOM building, but also XSLT, XPath, XPointer, XInclude, RelaxNG, etc., means that any homegrown library will be hard-pressed

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread BCS
Hello Adam, An important aspect of mimicing js is I don't really care about the xml standard; it tries to figure out whatever ugly crap you throw its way and makes a few assumptions for html. But, it can be used for generic xml stuff too. That can be handy but can also lead to problems. -- ..

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-04 Thread Graham Fawcett
On Mon, 03 May 2010 16:01:30 -0700, Andrei Alexandrescu wrote: > Graham Fawcett wrote: >> The fact that libxml2/libxslt support not only XML parsing and DOM >> building, but also XSLT, XPath, XPointer, XInclude, RelaxNG, etc., >> means that any homegrown library will be hard-pressed to cover the s

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-03 Thread Ellery Newcomer
On 05/03/2010 06:24 PM, Bernard Helyer wrote: On 04/05/10 11:01, Andrei Alexandrescu wrote: I think what we need for the standard library is to take a solid XML library licensed generously and adapt it to work with arbitrary ranges. Andrei Care to give an example? I was curious about this

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-03 Thread Bernard Helyer
On 04/05/10 11:01, Andrei Alexandrescu wrote: I think what we need for the standard library is to take a solid XML library licensed generously and adapt it to work with arbitrary ranges. Andrei Care to give an example?

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-03 Thread Andrei Alexandrescu
Graham Fawcett wrote: On Tue, 04 May 2010 09:18:46 +1200, Bernard Helyer wrote: When I first started using D, one of the things I needed quite early on was a way of writing and reading XML. Naturally, when I saw std.xml in Phobos, I was quite pleased. That was of course, until I started to use

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-03 Thread Graham Fawcett
On Tue, 04 May 2010 09:18:46 +1200, Bernard Helyer wrote: > When I first started using D, one of the things I needed quite early on > was a way of writing and reading XML. Naturally, when I saw std.xml in > Phobos, I was quite pleased. > > That was of course, until I started to use it. > > http:

Re: Phobos Proposal: replace std.xml with kxml.

2010-05-03 Thread Adam D. Ruppe
On Tue, May 04, 2010 at 09:18:46AM +1200, Bernard Helyer wrote: > I'm going to keep on using kxml regardless, but I thought it would be > nice if Phobos had a working XML library. What say you? I've got something almost ready to be thrown into the ring too, my DOM lib.: http://arsdnet.net/dcode/d

Phobos Proposal: replace std.xml with kxml.

2010-05-03 Thread Bernard Helyer
When I first started using D, one of the things I needed quite early on was a way of writing and reading XML. Naturally, when I saw std.xml in Phobos, I was quite pleased. That was of course, until I started to use it. http://d.puremagic.com/issues/show_bug.cgi?id=3088 http://d.puremagic.com/i