RE: Will the next version of XML Schema have a schema-for-sche
Rick Jelliffe writes: > In XSD, for example, the use of elements to describe complexContent and > simpleContent is jarringly odd and unpleasant, and it comes from the > fact that XSD cannot use attributes to select a content model. Elements > is all it has in this situation. Yes, indeed! That was exactly the reason for that clumsy syntax, and some of us argued that having a more convenient syntax was more important than having the schema language be able to put a tight bound on its own validation. Of all the truly questionnable design decisions that I contributed to, this is the one on which I wish that I had more strongly non-concurred. I did advocate a simpler syntax, but when the more complex one got more support in the workging group, I went along. In retrospect, I think that was a big mistake. While there are many reasons, often discussed, why some aspects of schema are truly and structuarlly (too) complex, but users' experiences are greatly complicated by the fact that the syntax is so unnecessarily clusmy. For example, there's nothing structural in the language that would prevent a syntax like: <element name='e' type="xsd:integer" maxInclusive="10"/> This would map just fine to the components we have, and could have been offered instead of: <element name="e"> <xsd:simpleType> <xsd:restriction base="xsd:integer"> <xsd:maxInclusive value="10"/> </xsd:restriction> </xsd:simpleType> </element> The latter is arguably better markup and is certainly more explicit. To build components for the former, you'd need to follow a runtime type graph to find out that xsd:integer is a simpletype. That's not something you're at all likely to be able to talk about in a Schema for Schemas. Still, I bet a lot of people who hand author schemas would prefer the shorter syntax. Noah -------------------------------------- Noah Mendelsohn IBM Corporation One Rogers Street Cambridge, MA 02142 1-617-693-4036 --------------------------------------
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format