Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Facets

From: "Michael Kay" <mike@--------.--->
To: <Farid.Mahini@------.--->, <xmlschema-dev@--.--->
Date: 2/15/2005 10:03:00 PM
You may be able to achieve what you want using key and keyref: define the
elements in the list of acceptable values as a key, and the elements whose
value must be one of these as a keyref.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: xmlschema-dev-request@w... 
> [mailto:xmlschema-dev-request@w...] On Behalf Of 
> Farid.Mahini@L...
> Sent: 15 February 2005 18:58
> To: xmlschema-dev@w...
> Subject: Facets
> 
> 
> Hi,
> 
> Please pardon me if my question is not very clear. I am very 
> new to the
> XML/Schema language.
> 
> 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.
> 
> Thank you,
> -Farid
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Measurements xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="Untitled6.xsd">
>     <Types>	// The values lised under Types are user defined and
> different in XML input files.
>         <Name>Analog</Name>     
>         <Name>Digital</Name>
>         <Name>Bus</Name>
>         <Name>Undefined</Name>
>     </Types>
>     <MeasInfo>		                                
>        // MeasInfo
> is common to all XML input files
>         <Name>Air Flow</Name>
>         <Type>Analog</Type>                              // 
> Type element
> value must be one of those listed under Types element.
>     </MeasInfo>
>     <MeasInfo>
>         <Name>Heading</Name>
>         <Type>Digital</Type>
>     </MeasInfo>
> </Measurements>
> 
> 
> 
> "After all You have done for me, I can do no less for You 
> than my best."
> (Author unknown)
> 
> 
> 
> 
> >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 bryce@s... Wed Feb 16 05:42:00 2005
Received: from bart.w3.org ([128.30.52.40])
	by frink.w3.org with 


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