Re: [xml] XML Data Typing with libxml

Date view Thread view Subject view Author view

From: Bjorn Reese (breese@mail1.stofanet.dk)
Date: Tue Feb 06 2001 - 12:54:51 EST


Gary Pennington wrote:

> I'm using libxml to manipulate XML documents and I need to add some
> support for data typing and validation. Fairly simple stuff initially,
> e.g. attribute must be numeric, and then some more complex validations,
> e.g. attribute must be numeric and a minumum value of A and a maximum
> value of B.
>
> What's the best approach to take with libxml?

There are a couple of alternatives, depending on your exact requirements.
XML Schema is probably the soundest choice for your purposes, but you do
say "initially" so...

XML Schema does not try to address all possible issues -- for example,
XML Schema cannot handle constraints between disjoint parts of the
document (I participate in an attempt to map certain types of structured
data into XML, and the inability to express such constraints constitute
a major problem).

It is interesting to note that several of the alternatives to XML Schema
has been created by members of the W3C XML Schema group to address
specific issues not addressed by XML Schema.

To get a better impression of some of the alternatives see

  Dongwon Lee and Wesley Chu
  "Comparative Analysis of Six XML Schema Languages"
  http://www.cobase.cs.ucla.edu/tech-docs/dongwon/sigmod-record-00.html

----
Message from the list xml@rpmfind.net
Archived at : http://xmlsoft.org/messages/
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rpmfind.net


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Feb 06 2001 - 14:43:34 EST