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

 


Help: OASIS Mailing Lists Help | MarkMail Help

obix-xml message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: XML Design Considerations


There was a thread last month: "What makes a good schema".

I agree with the points made: that ease of selecting nodes via xpath and processing with  xslt are desirable features.

I think the ability to compile a schema description (i.e. RELAXNG or XML Schema) into code to operate on instance documents (i.e. in Microsoft .Net you can compile an XML Schema into C# code ) is desirable.  Not every data model can be suitably described with an XML or RELAXNG schema, but when possible, they should be. A downside of using code compiled from schemas is that the generated code will usually reject invalid documents even when the information in them is correct-enough (i.e. if a required attribute is missing, but your app doesn't need it) for the application to process.  Generally a small price to pay for reduced development costs.

It is desirable to easily identify errors in instance documents.  I think this is the most useful role of Schema instances - to help those developing instance documents identify mistakes in their own applications.  Validating by systems processing documents using Schemas is usually not all that important - if a rule is important in a specific application, that application will perform necessary checks anyway.

I am a proponent of using the Schematron language as an adjunct to RELAXNG or W3 schemas rather than relying on prose to define relationships between parts of instance documents not expressable by XML Schema http://www.schematron.com/.  It leaves less room for error.  I feel its sufficient to use Schematron only to validate what cannot be express in XML Schema or RELAXNG rather than to attempt to validate the entire document in Schematron, although the error reporting by Schematron can be more informative.  Being able to write a schematron does provide some confidence instance documents will be easily processable. 

I am also a proponent of using RDDL http://www.rddl.org/ to document resources related to namespaces (i.e. xml namespaces or web service namespaces). You will note that an author of RDDL is also an an author of the XML 1.0 spec.

I am curious as to how the partipants feel about RDDL and schematron as adjuncts to XML or RELAXNG schemas, and whether they feel whether RELAXNG or W3 Schema should be used as the primary schema language.  I would suggest RELAXNG should be used as the primary schema language for defining XML documents in this comittee.  XML Schemas can be generated from RELAXNG schemas for use in WSDL, .Net,  etc.
 
This is the link to the OASIS TC on RELAXNG: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=relax-ng


Doug Ransom
Energy Analytics Domain Expert
Power Measurement 
2195 Keating Cross Road
Saanichton, BC, Canada  V8M 2A5 
Tel: (250) 652-7100  ext. 7558 
Fax: (250) 652-0411 
E-Mail: mailto:doug.ransom@pwrm.com 
Website: http://www.pwrm.com 
  
ION®  smart energy everywhere™






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]