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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Depicting interdependence relationships in xml

[ Lists Home | Date Index | Thread Index ]
  • From: Rick JELLIFFE <ricko@geotempo.com>
  • Date: Tue, 17 Oct 2000 06:13:06 +0800

rohit srivastava wrote:
> 
> Hello,
> I am in the process of creating an XML vocabulary. I have elements whose
> values depend on the values of other elements. For example if element A
> assumes the value Ax(say), element B can only take on the value Bx(from a
> list of other possible values). And if the value of element A was Ay(say),
> then element B will be constrained to take on the value By(say).
> I am wondering, is it possible to constrain an XML document in this manner?
> I looked at DTD's and i don't think that they allow an XML document to be
> constrained in this manner(please correct me if i am wrong).
> 
> Or is there someplace else that i should be looking to implement such
> relationships in my XML docuements(at the time of generating XML or possibly
> using XSL; but then XSL only works on preexisting docs).
 
Check the Schematron language
  http://www.ascc.net/xml/resource/schematron/schematron.html
or (in the future)
  http://sourceforge.net/projects/schematron

This is a language for making assertions about patterns within a
document: the patterns may concern structures or values (strings or
numbers).  It is specifically designed to let you state and validate
co-occurence constraints between arbitrary elements/attributes in a
document, specified using XPaths. And it is quite friendly, if you are a
developer.

For a high-end version of a similar language which has richer datatypes
and a less terse syntax, aimed at constraints between documents, see 
www.xlinkit.com  

These are probably your best bets currently.

Rick Jelliffe




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS