Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Schema data type setting

Reply
Thread Tools

Schema data type setting

 
 
The Magpie
Guest
Posts: n/a
 
      05-25-2007
Thanks for the help with the FAQ and the IBM page, but they didn't help
and I've had no luck finding the answer so far. In fact, I'm beginning
to think what I want can't be done. If anyone knows of a method to
manage it can you help out please?

Basically, I'm looking at validating datatypes. They come in sets, of
one or more validations so we might have (descriptive, not actual code):

<type "a">
<restriction pattern="validation1"/>
</type>

<type "b">....</>

<type "c">....</>

What I'm looking for is a way to define a type that will be valid for
any data that meets any one of the three example datatypes so that:

<type "maintype">
<either is type "a" valid/>
<or is type "b" valid/>
<or is type "c" valid/>
</type>

Any ideas anyone?
 
Reply With Quote
 
 
 
 
Priscilla Walmsley
Guest
Posts: n/a
 
      05-27-2007
Sounds like what you need is a union type.

See an example at:

http://www.datypic.com/books/defxmls...r11.html#EX116

Hope that helps,
Priscilla

---------------------------------------------
Priscilla Walmsley
Author, Definitive XML Schema (Prentice Hall)
XQuery (2007, O'Reilly Media)
http://www.datypic.com
http://www.xqueryfunctions.com
---------------------------------------------

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
The Magpie
Guest
Posts: n/a
 
      05-28-2007
Priscilla Walmsley wrote:
> Sounds like what you need is a union type.
>
> See an example at:
>
> http://www.datypic.com/books/defxmls...r11.html#EX116
>
> Hope that helps,
> Priscilla
>

You know what? That not only could be what I want, but I'm stunned it
never occurred to me. Thanks - I'll try it.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML-Schema: Is there a way to make different type elements(each type has more than one Element) present in random order? Aray XML 1 01-05-2007 08:22 AM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
For XML Schema gurus - populate 2 combo boxes from schema data Joyce XML 0 03-01-2005 10:31 AM
tomcat 4.x : setting mime type for a directory or setting a default mime type CJ Java 1 10-29-2004 07:51 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57