Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Dependencies between attributes and elements >Thread Next - Re: Dependencies between attributes and elements RE: Dependencies between attributes and elementsTo: =?iso-8859-1?Q?'Jo=E3o_Cruz_Morais'?= <napalm@----------.--->, xmlschema-dev@--.--- Date: 8/6/2007 6:16:00 PM > Given this simple xml: > > <vector size="2"> > <value>1</value> > <value>3</value> > </vector> > > Is there a way to validate the number of <value> elements > according to the vector size attribute? > I'm tempted to say no, so should I make this kind of > validation inside my program? XML Schema 1.1 will add this capability using assertions: <xs:assert test="count(value) = @size"/> Meanwhile you have to resort to other approaches, e.g. your own validation code in XSLT, or Schematron. Michael Kay http://www.saxonica.com/ From spiderfish@g... Tue Aug 07 10:07:29 2007 Received: from | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
