OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] DTDs, W3C Schemas, RELAX NG, Schematron?

[ Lists Home | Date Index | Thread Index ]

Hi John,

> > Please elaborate on how RELAX is more powerful than XSD.

I've just started using RELAX-NG and I've come to realize that it does indeed
have more to offer than XML Schemas. However, there are a few of you below
points that can be done woth XML Schemas as well.
See comments below.

> 5) RNG allows a (simple) datatype to be restricted not only by facet,
> but by explicit extension and exception.  One can write 'xsd:integer -
> "0"' to mean a nonzero integer (although unfortunately "00" will still
> validate), or 'xsd:integer | "Inf" | "+Inf" | "-Inf"' when a value may
> be integral or infinite.

This can quite easily be done using union types in XML Schema or if you want to
restrict an integer type you can use the various facets provided for this.

> 11) RNG lists consist of non-whitespace separated by whitespace, and the
> non-whitespace need not be all of the same (simple) type.  A pattern like
> "list {xsd:integer, xsd:string}+" is perfectly valid, and matches content
> like "2 foo 5 bar".

This can be done by creating a list type from a union type in XML Schema.

> Some of these things may be feasible in XSD, and if so, attribute their
> presence here to my ignorance of XSD.

Yes, but only two...(at least easily)

> What does RNG lack?  Mainly, it has no notion of keys or other identity
> constraints, except for DTD-compatible ID and IDREF(S).  RNG validators
> also don't provide any sort of PSVI, and indeed only a subset of legal
> RNG schemas would be able to produce type tags at all (validity is always
> decidable, but just *which* rule(s) were applicable may not always be).

What about default values?

Cheers,
/Eddie






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS