Re: The XML module in Phobos

2009-08-04 Thread Michel Fortin
On 2009-08-04 10:01:51 -0400, Michael Rynn michaelr...@optushome.com.au said: It would be nice to have well defined interfaces for DOM, SAX and PULL parsers which share some of the base parsing code. The DOM can be partial, as node sets returned from XPath query. Nice how the phobos parser

Re: The XML module in Phobos

2009-08-01 Thread Benji Smith
Michel Fortin wrote: On 2009-08-01 00:04:01 -0400, Benji Smith dlangu...@benjismith.net said: But XML documents aren't really lists. They're trees. Do ranges provide an abstraction for working with trees (other than the obvious flattening algorithms, like breadth-first or depth-first

Re: The XML module in Phobos

2009-07-31 Thread Daniel Keep
Andrei Alexandrescu wrote: Daniel Keep wrote: ... Of course, most people HATE this method because it requires you to write mountains of boilerplate code. Pity, then, it's also the fastest and most flexible. :P (It's a pity D doesn't have extension methods since then you could probably

Re: The XML module in Phobos

2009-07-31 Thread Michel Fortin
On 2009-07-30 22:42:29 -0400, Benji Smith dlangu...@benjismith.net said: Michael Rynn wrote: I did look at the code for the xml module, and posted a suggested bug fix to the empty elements problem. I do not have access rights to updating the source repository, and at the time was too busy for

Re: The XML module in Phobos

2009-07-31 Thread Steven Schveighoffer
On Fri, 31 Jul 2009 02:26:34 -0400, Daniel Keep daniel.keep.li...@gmail.com wrote: Another, somewhat smaller concern, is that the range interface is back-to-front for IO. Consider a stream: you don't know if the stream is empty until you attempt to read past the end of it. Standard input

Re: The XML module in Phobos

2009-07-31 Thread Andrei Alexandrescu
Daniel Keep wrote: Andrei Alexandrescu wrote: Interesting. Could you please give more details about this? Why is range-based I/O a bad idea, and what can we do to make it a better one? (A clarification: I *should* have said ...basing IO entirely on ranges is -probably- a bad idea.) rambling

Re: The XML module in Phobos

2009-07-31 Thread Benji Smith
Michel Fortin wrote: Benji Smith wrote: Usually, I use something like XPath to extract information from an XML doc. Something liek this: auto doc = parser.parse(xml); auto nodes = doc.select(/root//whatever[...@id]); I can see how you might do depth-first or breadth-first traversal

Re: The XML module in Phobos

2009-07-30 Thread Michael Rynn
On Mon, 27 Jul 2009 20:15:46 -0400, llee l...@jhsph.edu wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules'

Re: The XML module in Phobos

2009-07-30 Thread Michael Rynn
On Thu, 30 Jul 2009 18:03:39 +1000, Michael Rynn michaelr...@optushome.com.au wrote: corrections.. I had little trouble in compiling a static library version of the Expat 2.01 Whoops, I used an import library to the LibExpat.dll. Pity I seen jobs yet offering for D language programmers. Any jobs

Re: The XML module in Phobos

2009-07-30 Thread Andrei Alexandrescu
Michael Rynn wrote: On Mon, 27 Jul 2009 20:15:46 -0400, llee l...@jhsph.edu wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report

Re: The XML module in Phobos

2009-07-30 Thread Benji Smith
Michael Rynn wrote: I did look at the code for the xml module, and posted a suggested bug fix to the empty elements problem. I do not have access rights to updating the source repository, and at the time was too busy for this. Andrei Alexandrescu wrote: It would be great if you could

Re: The XML module in Phobos

2009-07-30 Thread Daniel Keep
Andrei Alexandrescu wrote: It would be great if you could contribute to Phobos. Two things I hope from any replacement (a) works with ranges and ideally outputs ranges, (b) uses alias functions instead of delegates if necessary. There's really only one sane way to map XML parsing to ranges:

Re: The XML module in Phobos

2009-07-30 Thread zsxxsz
== Quote from Daniel Keep (daniel.keep.li...@gmail.com)'s article This is basically the only way to map xml parsing to ranges. As for CONSUMING ranges, I think that'd be a bad idea for the same reason basing IO entirely on ranges is a bad idea. The only other use for ranges I can think of is

Re: The XML module in Phobos

2009-07-30 Thread Andrei Alexandrescu
Daniel Keep wrote: Andrei Alexandrescu wrote: It would be great if you could contribute to Phobos. Two things I hope from any replacement (a) works with ranges and ideally outputs ranges, (b) uses alias functions instead of delegates if necessary. There's really only one sane way to map XML

Re: The XML module in Phobos

2009-07-28 Thread Kagamin
llee Wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules' maintainer, but I don't know who to contact.

Re: The XML module in Phobos

2009-07-28 Thread Lars T. Kyllingstad
llee wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules' maintainer, but I don't know who to contact.

Re: The XML module in Phobos

2009-07-28 Thread Andrei Alexandrescu
Lars T. Kyllingstad wrote: llee wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules' maintainer, but I

Re: The XML module in Phobos

2009-07-28 Thread Daniel Keep
Andrei Alexandrescu wrote: Lars T. Kyllingstad wrote: llee wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the

Re: The XML module in Phobos

2009-07-28 Thread Andrei Alexandrescu
Daniel Keep wrote: Andrei Alexandrescu wrote: Lars T. Kyllingstad wrote: llee wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report

Re: The XML module in Phobos

2009-07-28 Thread bearophile
Andrei Alexandrescu: Unfortunately I'm not seeing any. There's a simple solution, future D2 programmers will have both libs installed, so they will just use the Tango XML reader. So the best solution is to remove the XML reader from Phobos. The idea is to remove most inter-library redundancy.

Re: The XML module in Phobos

2009-07-28 Thread Michel Fortin
On 2009-07-28 10:09:04 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Yes, I think that will be necessary. Any volunteers? :o) Andrei There is already a high-performance one in Tango. There must be some way to avoid duplicating effort. Unfortunately I'm not seeing any.

Re: The XML module in Phobos

2009-07-28 Thread Ary Borenszweig
Michel Fortin wrote: On 2009-07-28 10:09:04 -0400, Andrei Alexandrescu seewebsiteforem...@erdani.org said: Yes, I think that will be necessary. Any volunteers? :o) Andrei There is already a high-performance one in Tango. There must be some way to avoid duplicating effort. Unfortunately

Re: The XML module in Phobos

2009-07-28 Thread Adam D. Ruppe
On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. -- Adam D. Ruppe http://arsdnet.net

Re: The XML module in Phobos

2009-07-28 Thread Michel Fortin
On 2009-07-28 11:38:36 -0400, Adam D. Ruppe destructiona...@gmail.com said: On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. That, and because there's some fun in doing it. Anyway, this

Re: The XML module in Phobos

2009-07-28 Thread language_fan
Tue, 28 Jul 2009 11:38:36 -0400, Adam D. Ruppe thusly wrote: On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. There are most likely several issues that prevent the reuse of that code.

Re: The XML module in Phobos

2009-07-28 Thread Ary Borenszweig
language_fan wrote: Tue, 28 Jul 2009 11:38:36 -0400, Adam D. Ruppe thusly wrote: On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. There are most likely several issues that prevent the

Re: The XML module in Phobos

2009-07-28 Thread Kagamin
Daniel Keep Wrote: There is already a high-performance one in Tango. There must be some way to avoid duplicating effort. Isn't it high-performance at the cost of not complaining to the DOM specification?

Re: The XML module in Phobos

2009-07-28 Thread Lutger
language_fan wrote: Tue, 28 Jul 2009 11:38:36 -0400, Adam D. Ruppe thusly wrote: On Tue, Jul 28, 2009 at 12:23:50PM -0300, Ary Borenszweig wrote: But *why* use or make another one when the Tango one is already excellent? :( Copyright. There are most likely several issues that prevent

The XML module in Phobos

2009-07-27 Thread llee
The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules' maintainer, but I don't know who to contact. (This is an old

Re: The XML module in Phobos

2009-07-27 Thread llee
llee Wrote: The std.xml module contains several bugs that need to be fixed. The most important one is that the parser fails to parse empty elements (IE elements that use the tag name=value / format). I'd like to report this bug to the modules' maintainer, but I don't know who to contact.