Status of std.xml (D2/Phobos)

Justin Johansson no at spam.com
Sun Jun 27 08:16:37 PDT 2010


Adam Ruppe wrote:
> On 6/27/10, Justin Johansson <no at spam.com> wrote:
>> btw. I feel it fair to add conjecture that a DOM implementation
>> is pretty basic stuff and that a complete XML ecosystem it much
>> larger than just this (i.e. an in-memory DOM).
> 
> Yes, it is very simple, but so is all the XML I've ever actually
> encountered. I've seen ugly, convoluted HTML and I've seen name/value
> pairs in verbose XML format, but very very little in the middle.
> (Heck, I just used std.string.indexOf("<tagname") for quite a while.)
> 
> This is probably due to my observation bias, with all my XML
> experience coming from working with web services.

Yeah, I understand where you are coming from; sometimes all you
need is some simple DOM stuff which you can hack out yourself in
a few hours.

OTOH, there are some really significant W3C specs that you may
or may not be aware of and these are really difficult to implement
in regular imperative languages like C/C++ and Java.  Java,
being all that is the following of Java I guess, has had the most
success in implementing these specs.

IMHO, the two most fundamental and significant W3C specs that
D libraries could well address are as follows.  These form a
large amount of the (formal) XML ecosystem.

XML Schema Part 2: Datatypes Second Edition
http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/

and

XQuery 1.0 and XPath 2.0 Data Model (XDM)
http://www.w3.org/TR/2007/REC-xpath-datamodel-20070123/

I can tell you for sure that XPath 2.0, which is the basis
for XSLT 2.0 and XQuery 1.0, is truly a challenge to implement
in languages like C++ and Java.  Others have succeeded with
implementations in languages like Eiffel.  I would hope though,
that D2 would be up to the task (is that is wishful thinking?).

Cheers
Justin Johansson







More information about the Digitalmars-d mailing list