ActiveBlog

24 out of 25 Dentists Say Their Patients Use Relax NG
by Eric Promislow

Eric Promislow, February 23, 2006

So maybe dentists know more about the gum-chewing habits of their patients than how they prefer to create their XML documents. But a few of us here were discussing whether Relax NG has made headway against XML Schema. I have...

So maybe dentists know more about the gum-chewing habits of their patients than how they prefer to create their XML documents.  But a few of us here were discussing whether Relax NG has made headway against XML Schema.

I have too much SGML experience to be much of a fan of XML Schema as a data-definition language.  In most cases, the description files are harder for humans to create and understand than those old DTDs, and even the argument that it's easier for machines to process them doesn't hold much water.  To process a DTD you needed a true lexical analyzer and parser to handle gotchas like parameter entities, comments, and strings.  XML Schema instances might be easier to lex and parse, but you need a symbol table to handle its type system.

Many of us at ActiveState like Relax NG, and we use the XML-based "full syntax" form for ease of processing in some of our products and systems.  These documents are straightforward to create, read, maintain, and process.

So I was asked which was more popular, and I resorted to that standby, the Google search.  I figured it would be sufficient to treat the respective namespace URIs for RelaxNG and XML Schema as markers in published custom schemas.  In other words, if someone had developed their own schema and was using it to publish XML documents on the web, they would need to publish the schema as well, and Google would pick it up.  Neither of these strings was needed in the instances, just in the schema definition files, so I wouldn't be counting the number of documents created against a certain schema, just the actual schemas.

I had to repeat the queries several times, as the results were fully unexpected, but I always got this answer:

Results 1 - 10 of about 13,900 for 'http://relaxng.org/ns/structure/1.0'

Results 1 - 10 of about 586 for 'http://www.w3.org/2001/XMLSchema'

Even without trying to detect instances of the compact, equivalent, non-XML syntax for RelaxNG, this suggests that people creating their own XML schemas for documents (which are more likely to be published via the web than database rows), are almost 25 times more likely to use Relax NG than XML Schema.

My guess is that the people who used to write DTDs for SGML documents have happily adopted Relax NG, while XML Schema has found a home for more data-intensive applications, such as the data-description component of SOAP's WSDL.

Subscribe to ActiveState Blogs by Email

Share this post:

Category: dynamic languages
About the Author: RSS

Eric Promislow is a senior developer who's worked on Komodo since the very beginning. He has a M.Sc. in Computing Science from Queen's University and a B.Sc. in Biophysics from the University of Ontario. Before joining ActiveState, he helped create the OmniMark text-processing language.

Comments

6 comments for 24 out of 25 Dentists Say Their Patients Use Relax NG
Permalink

I repeated the search using Yahoo! You need to remove the URL punctuation to prevent Yahoo! from returning just a single hit (the page with that URL), so I searched for "www w3 org 2001 XMLSchema" and "www relaxng org ns structure 1.0", with the quotation marks. I then did exactly the same searches with Google, in order to be sure of comparing apples to apples.

There were about 1M yhits and 1.7M ghits for the XML Schema string, and 47 yhits (sic!) and 39.4K ghits for the RELAX NG string. Although these results do not strike me as a whole lot more realistic than your original Google search, it does indicate that mere comparative counts aren't something to draw large-scale conclusions from.

Permalink

Oops. Truncated my name somehow.

Permalink

Thanks, John,

I guess it couldn't hold up for long. I also didn't
analyze the hits that google returned. I'll have to have a closer look at the documents that google was hitting with the full punctuation.

Permalink

Curious. I just repeated your search on Google and
while I got the same result for the RelaxNgG query,
the W3C schema query numbers were completely different:

Results 1 - 10 of about 13,900 for 'http://relaxng.org/ns/structure/1.0'.

Results 1 - 10 of about 71,600 for 'http://www.w3.org/2001/XMLSchema'.

Now that ratio is more what (sadly) I would expect.

Permalink

with Offensive Content Filter: Off

AlltheWeb:
RelaxNG - 9,280
XML Schema - 642,000

Permalink

Apart from wondering what the results would be with
that filter on, I used the namespace URLs in
my search rather than the terms themselves, thinking
they would find public documents that *used* the
technologies, as opposed to ones that just talked
about it.

Obviously XML Schema is discussed and mentioned more.
It has the weight of the W3C and a dozen large
corporations behind it. RelaxNG is the work of a
handful of dedicated individuals who typically let
their work speak for itself.

But there was also wishful thinking behind my post.