Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Attribute validation of aggregated ID [Thread Next] Re: Attribute validation of aggregated IDTo: NULL Date: 2/3/2006 12:30:00 PM Hi Michael, I think the only way to do that is to have two separate attributes - one that refers to the book and the other that contains the page number. If you created a list of a union of IDREF and string it would never validate the reference because something like "yourbook" will always be a valid string. Hope that helps, Priscilla ------------------------------------------------------------------ Priscilla Walmsley Author, Definitive XML Schema / XML in Office 2003 http://www.datypic.com ------------------------------------------------------------------ "Michael Möllney" <m.moellney@i...> wrote in message news:u5wW%23QOKGHA.3876@T...... > Hi Group.... > > I'm looking for a XML Schema description that validates an aggregation of > an ID in an attribute: > > XML looks like > > <BOOK id="mybook" /> > <CHAPTER name="Chap1" page="mybook:23" /> // should be valid > <CHAPTER name="Chap2" page="mybook:40" /> // should be valid > <CHAPTER name="Chap3" page="yourbook:65" /> // fail: no ID 'yourbook' > > where id in BOOK is an ID type > and > where page in CHAPTER should be validated to be of pattern: > IDREF':'string. > > I did not find a way to describe this.... > If this is easy, please point me to a description for this.... > I could only find how to produce lists of atomic types. > > So probably I could somehow produce a list (using space instead of ':' as > separator) of unions containing IDREF and string but is there a nicer way? > > Any help would be fine, > thanks in advance, > > Michael | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
