Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Facets

From: Farid.Mahini@------.---
To: bryce@-------.---, -------------@--.---
Date: 2/15/2005 10:28:00 AM
Thanx you Bryce.  

This method only works if I had previous knowledge of the enumerated values.
In my case users create their own set of Types (not a subset of  acceptable
values by my schema, but literally using their own naming conventions).  For
instance, depending on the hardware under test, the user will compose a
totally different measurement Types. 

-Farid

> -----Original Message-----
> From: Bryce K. Nielsen [mailto:bryce@s...]
> Sent: Tuesday, February 15, 2005 2:35 PM
> To: Farid.Mahini@L...; xmlschema-dev@w...
> Subject: Re: Facets
> 
> 
> > I have an XML document which contains the list of acceptable values
> (strings
> > or enum) for some elements, in addition to the elements 
> themselves.  I
> need
> > to create a schema to validate this XML document. Is there 
> a way to make
> the
> > validation process aware of these facets (on the fly, if 
> you will).  I
> hope
> > the simple XML test file below clarifies my question.
> >
> 
> What you will want to do is have a simpleType that is restricted as an
> Enumeration. Something like this:
> 
>   <xsd:element name="Types">
>     <xsd:complexType>
>       <xsd:sequence>
>         <xsd:element name="Name">
>           <xsd:simpleType>
>             <xsd:restriction base="xsd:string">
>               <xsd:enumeration value="Analog"/>
>               <xsd:enumeration value="Digital"/>
>               <xsd:enumeration value="Bus"/>
>               <xsd:enumeration value="Undefined"/>
>             </xsd:restriction>
>           </xsd:simpleType>
>         </xsd:element>
>       </xsd:sequence>
>     </xsd:complexType>
>   </xsd:element>
> 
> HTH,
> 
> Bryce K. Nielsen
> SysOnyx, Inc. (www.sysonyx.com)
> Makers of xmlDraft, the Smart XSD Editor
> http://www.sysonyx.com/products/xmldraft
> 
> 
> 


>From E-mail Administrator
ATTENTION PLEASE: Do you have our new e-mail addresses?
The current L-3 standard is First.Last @ L-3com.com
E-mail addressed to First.Last @ te.L-3com.com will no longer be delivered.
Please update your address book using the "From" address on this email.



From mike@s... Tue Feb 15 22:02:58 2005
Received: from bart.w3.org ([128.30.52.40])
	b


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