Re: [xml] New user, evaluating XML libraries

On Thu, Dec 21, 2006 at 09:03:21AM +0000, Boris Kolpackov wrote:
... SAX not formerly defined except for Java. On the other hand the
XMLTextReader from C# is part of the ECMA C# spec, and is a good API.

You mean SAX, which is only defined for Java, is a bad thing but
XMLTextReader, which is only define for C#, is good? ;-)

  API wise, definitely, yes.

  Also DOM *requires* UTF-16 for all strings. This means that in general
1/ you will loose time, most content around is UTF-8
2/ you will loose memory space/cache efficiency as the converted output is
   way larger in average
3/ you will looose CPU efficiency as breaking cache is #1 performance
   problem in modern computers

I think it largely depends on what kind of data one is handling. If there
are a lot of non-latin characters then UTF-8 will waste at leaset as much
and normally a lot more (4-byte surrogate pairs) space than UTF-16.

  all the markup is usually ASCII. And no UTF-16 XML instances are not

  There is no functional XSD validator. Go to the xmlschemas-dev
archive at W3C, check the last 5 questions from Michael Kay (who is
a Schemas implementor and one of the W3C spec writers), they are unanswered
for weeks now, nobody can tell what it is supposed to do. Trying to use
XSD to promote interoperability or validation of data is kind of a joke.
Relax-NG on the other hand is an ISO standard, has a formal specification
and can be read and understood by most programmers in a matter of a couple
of days.

While what you say could be true, most XML parsers these days support
XML Schema while there is hardly any that support Relax-NG. Also there

  Technically nor XSD nor RNG are handled by parsers, it's sitting on top.

are a lot of industry standards organizations that managed to define
interoperable schemas that describe fairly complex XML vocabularies.
Finally, one last thing, that a lot of people tend to overlook, is that
it is fairly straightforward (in most cases) to provide XML data
binding (generated types in a programming language that represent the
given vocabulary) from XML Schema. I do not think it will be anywhere
as easy or at all possible to do the same with Relax-NG.

  When you mean data bindings, it's records, even easier in RNG than XSD,
and RNG usually reuses XSD datatypes. I see no positive differential for 
XSD here. Anyway the initial question was *not* about data bindings, 
and further exchanges showed that XSD (nor RNG) was not part of the picture,
so please could you keep this focused on what is really needed and not 
what you would like to promote, thanks.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]