Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - XSD restriction of nesting an element within another element with a specific attribute value? [Thread Next] Re: XSD restriction of nesting an element within another element with a specific attribute value?To: NULL Date: 2/4/2009 10:40:00 PM On Feb 5, 1:41=A0am, PeteOlcott <PeteOlc...@gmail.com> wrote: > <ElementName AttributeName=3D"Specific Value"> > =A0 <OtherElementName /> > </ElementName> > > =A0The idea is to somehow force the restriction that the > <OtherElementName> element can only be nested within the <ElementName> > tag if this tag has the attribute value of "Specific Value" for its > attribute named AttributeName. This could be difficult with XSD 1.0. But you could do some validation at an application level. XSD 1.1 has a facility called 'assertions' which will make this requirement solved easily (ref, http://www.w3.org/TR/xmlschema11-1/#cAssert= ions). But XSD 1.1 is currently in draft. I am hoping we would see XSD 1.1 becoming a recommendation soon, and implemented in products. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
