Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Attribute validation of aggregated ID

From: "Priscilla Walmsley" <nospam@-------.--->
To: 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 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent