Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - XML (Schema) Question [Thread Next] Re: XML (Schema) QuestionTo: NULL Date: 8/7/2005 10:35:00 AM Mike Busch wrote: > Jason Karns wrote: > > > I have a question involving the creation of an XML Schema and am > looking for guidance or the name of someone who may be a good person to > talk to about this. The problem is how to properly define a few > elements in a schema such that nesting is allowed, but for some > elements, nesting of themselves is disallowed. An example from XHTML: > > but <a> cannot be nested within itself. (<a><span><a></a></span></a> > is disallowed.) > > Any suggestions or the name of a good instructor to talk to would be > most helpful. XML Schema can't express that; it's too weak language class. You can say in XML Schema that the a element is allowed as a child of {some elements}. You can also say that a is allowed as a child of b when b is a child of c .. and so on, but only to finite height. There's no way to express that a is never an ancestor of a. The Relax NG and DSD2 schema languages can do it.. Søren | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
