On Saturday, February 10, 2018 19:53:48 Jesse Phillips via Digitalmars-d- announce wrote: > On Friday, 9 February 2018 at 21:15:33 UTC, Jonathan M Davis > > wrote: > > Hopefully, the documentation is clear enough, but obviously, > > I'm not the best judge of that. So, have at it. > > > > Documentation: http://jmdavisprog.com/docs/dxml/0.1.0/ > > Github: https://github.com/jmdavis/dxml > > Dub: http://code.dlang.org/packages/dxml > > > > - Jonathan M Davis > > This looks so nice. > > I can understand the concerns of the DTD, and it doesn't look > like you needed to do anything special for namespaces with this > parser.
I confess that I haven't looked into namespaces in detail, but from what I understand about them, I don't see any reason to do anything beyond treating them as part of the name. If the application wants to do something special with them, then it's free to do so. Key goals of this parser were to make it fast and simple to use for the typical use case. As much as possible, I'd like to keep the complicated stuff out of it. Personally, I see XML only as data just like JSON is only data, and I think that the complications in the XML spec come from trying to treat it as more than that. I had originally intended to provide at least minimal DTD support but leave most of it to some kind of helper functionality (e.g. have a helper function which took the DTD data and then validated the rest of the XML using it). However, as I got farther along, it became clear that that wasn't going to work without giving up on being able to just slice the input, and I wasn't willing to give up on that, especially when I don't see handling the DTD as valuable for anything but dealing with overly complicated XML that is outside of the programmer's control or to simply be able to say that I completely implemented the XML spec. Slicing is part of why parsers written in D should tend to be inherently fast in comparison to those written in languages like C++, and I want to take advantage of that. In principle, something like an XML parser should be able to be a showcase for why D is great. Tango's was, but Phobos' hasn't been, and I'd like for dxml to be able to be that regardless of whether it eventually replaces std.xml or not. - Jonathan M Davis