[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Four things that I've recently learned
Hi Folks, 1. Use the right schema language for the right job. 2. It's the XML vocabulary that matters, not the particular schema language used to implement the vocabulary. 3. Create a metaschema that abstracts away the schema language implementations, thus enabling applications to focus on processing the XML vocabularies, and not worrying about the particular schema languages they're implemented in. 4. Multiple validations on the data should be the norm, not the exception. For details on each of these, scroll down ... 1. Use the right schema language for the right job. XML Schema and Relax NG are two schema languages for expressing grammar-based rules. They are both standards, the former a W3C standard, the later an ISO standard. Although their capabilities are largely overlapping, there are important differences. "Use the right tool for the right job" is an adage that applies to choosing a schema language. Knowing the differences in capabilities is crucial to making a good decision in choosing a schema language. 2. It's the XML vocabulary that matters, not the particular schema language used to implement it. What matters is the XML vocabulary, not how it's implemented. Example: what is important is that you've specified the syntax and semantics (and possibly behavior) of these elements: <Book>, <Title>, <Author>, <Date>, <ISBN>, <Publisher> It's not important that you've specified the XML vocabulary using XML Schema, Relax NG, or even DTD. 3. Create a metaschema that abstracts away the schema language implementations, thus enabling applications to focus on processing the XML vocabularies, and not worrying about the particular schema languages they're implemented in. Design your data as components that can be assembled, like Lego pieces, into instance documents, and use NVDL as a metaschema for specifying the assembled components. 4. Multiple validations on the data should be the norm, not the exception. Also known as "concurrent validation." Grammar-based validation using XML Schema or Relax NG is rarely (if ever) sufficient for checking all your data constraints. Rule-based validation, using Schematron, is typically needed for checking co-constraints, cardinality checks, and algorithmic checks. The tandem of a grammar-based validation and Schematron validation should be the norm. Comments? /Roger
[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
|