RE: Why a DTD and not a XML-Schema ?

"Frantz Dhin" <[email protected]> Thu, 18 Dec 2003 20:43:11 +0100
Newsgroups gmane.linux.zynot.general
Message-ID <[email protected]>
Hello,
There is one advantage of a strongly typed schema that I can think of. =
It is
the intention that xbuilds should be able to import directly into a
relational database management system. We make this a more predictable
endeavor by using a strongly typed format since database tables and =
cells
are also "strongly typed" and can have limitations on number of chars =
and so
forth. It is easier for a dba to know what to expect when he starts =
using
Xeta in a rdbms that we might not have thought of supporting if he has a
schema in hand.
Regards
Frantz Dhin

-----Original Message-----
From: [email protected] [mailto:[email protected]] =
On
Behalf Of [email protected]
Sent: 18. december 2003 20:13
To: Andreas Pokorny
Cc: [email protected]
Subject: Re: Why a DTD and not a XML-Schema ?

Le 18/12/03 =E0 19:09, Andreas Pokorny a =E9crit:
Andreas> Hi,
Andreas> I am currently working on a xbuild ide. The main alpha feature =
will
be the
Andreas> creation of valid xbuild files.=20


Hi,


Andreas> Why libxml2?
Andreas> - supports a lot of encodings, but converts to utf8. That makes
writing
Andreas>   of application code simpler.=20

ok.

Andreas> - faster than all the others...

any benchmarks you are refering too ?


Andreas> Don't be afraid, all suggestions corrections and ..  are =
welcomed!=20
Andreas>=20
Andreas> I do have questions too:
Andreas>  From my point of view, dtd's define  a fixed hierachy of tags =
with
Andreas> attribute names and sub tags. While schemas define a fixed
hierarchy
Andreas> too, but allow finer control over the format of the character =
data
Andreas> within tags an attributes. Is that true? I was not able to read =
the
full

you mean tags and attributes ?
if yes,
XML-SCHEMA allows that
see below

Andreas> spec of xml schema yet.=20
Andreas> -> The serialization library needs the fixed hierachy!

XML-Schema still allows you to to define a fixed hierarchy.

Here is a piece of XML-Schema to define your Person XML tag where the =
name's
length=20
is 32 chars max. and of course the age is a positive integer: =20

<xs:simpleType name=3D"nameType">
  <xs:restriction base=3D"xs:string">
    <xs:maxLength value=3D"32"/>
  </xs:restriction>
</xs:simpleType>

<xs:element name=3D"Person" type=3D"mt:PersonType"/>

<xs:complexType name=3D"PersonType" base=3D"xs:string">
	<xs:attribute name=3D"age" type=3D"xs:non-negative-integer"
use=3D"required" />
	<xs:attribute name=3D"name" type=3D"nameType" use=3D"required"/>
</xs:complexType>



Maybe I should try to convert the DTD in a XML-Schema ?


See you
Pac
_______________________________________________
Xeta mailing list
[email protected]
http://lists.zynot.org/mailman/listinfo/xeta