[
Lists Home |
Date Index |
Thread Index
]
Eddie Robertsson scripsit:
> See comments below.
Thanks for the review.
> > 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
I see that. -1 for me.
> or if you want to
> restrict an integer type you can use the various facets provided for this.
But restrictions by facet are only pre-set ones. You can restrict
an integer to be between -5 and +5, but you can't restrict a token,
say, not to be "foo". Whereas in RNG that is just xsd:token - "foo".
> > 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.
True. I didn't word this sharply enough. If you want a list consisting
of alternating numbers and strings, RNG can do that but XSD can't:
a list type created from a union type is "list {(xsd:integer|xsd:string}+}",
and matches things like "2 5 foo bar".
> > 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?
Right. I was lumping that with the PSVI under the heading of
infoset augmentations. I will mention it explicitly in the next version.
--
John Cowan <jcowan@reutershealth.com> http://www.reutershealth.com
I amar prestar aen, han mathon ne nen, http://www.ccil.org/~cowan
han mathon ne chae, a han noston ne 'wilith. --Galadriel, _LOTR:FOTR_
- Prev by Date:
Re: [xml-dev] DTDs, W3C Schemas, RELAX NG, Schematron?
- Next by Date:
XPath,XPointer and XLink
- Previous by thread:
Re: [xml-dev] DTDs, W3C Schemas, RELAX NG, Schematron?
- Next by thread:
Re: [xml-dev] DTDs, W3C Schemas, RELAX NG, Schematron?
- Index(es):
|