[
Lists Home |
Date Index |
Thread Index
]
"Simon St.Laurent" wrote:
> > 1) Additional data values (defaults). Since this already exists with
> > DTDs, it seems any controversy here should have existed before the PSVI
> > came to being.
>
> I don't think the controversy was clearly recognized until recently.
> The killer for this on DTDs for me was the "non-validating parsers not
> obligated to read external subset" clause, which made it downright
> dangerous to rely on this behavior.
Really? I've been tripping over this for years now. The only solution
I've found is to hard-code attribute defaults into the application.
(Yech.)
> RELAX's avoidance of this 'feature' was pretty clearly a step forward,
> IMHO. It might not be a bad idea to create a simple language that
> specifies default values of elements and attributes - and does nothing
> else - implemented through XSLT. (I hope someone's done that, but my
> memory's failing me now.) That would provide the functionality but also
> make clear that it requires a particular application context - both good
> things.
Agreed. XML Schemas certainly aren't the place to do this.
> There are lots of people who want to slap their existing typed data into
> markup without switching from a OOP or RDBMS notion of types to a
> recognition that "element type declarations" are what they say they
> are. To me, this suggests these people haven't thought through why
> they're using markup in the least, and that seems plain old dangerous.
I disagree. I think they have thought through what they want to do. They
want, for example, to be able to validate that a quantity is a (string
representing an) integer and not "abc". This strikes me as perfectly
reasonable.
I think where the XML Schemas data types have missed the boat is in
their degree of complexity, as Amy Lewis points out. If you want
interoperability, you can't go much beyond saying that a number is an
integer. It is the up to the recipient of the document to decide (a)
whether they can represent that number in whatever language / system
they are using and (b) what data type they choose to represent it in.
(Note that range restrictions -- e.g. I only sell quantities between 1
and 10 -- are separate from type. This is most evident when you think
about how little data has a real world range of, say, -32768 to 32767,
and shows the artificiality of data types like short, int, and double in
markup.)
> The more exciting flip-side to this is issues of partial validity. Rick
> Jelliffe's pretty convincing on the possibilities of both partial
> validity and partial well-formedness, but it's kind of a dark area that
> specs don't seem to want to ponder too deeply.
I agree about partial validity. What's partial well-formedness?
-- Ron
|