Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - extending validation >Thread Next - RE: extending validation RE: extending validationTo: <tgrzej10@------.-->, <xmlschema-dev@--.---> Date: 3/18/2005 6:05:00 PM You could try generating a schema with the required values, but I'm not sure why you would want to. There is always going to be some application-level logic (including error checking) that you can't put in the schema. Why not put the data through a stylesheet after putting it through the schema? Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: xmlschema-dev-request@w... > [mailto:xmlschema-dev-request@w...] On Behalf Of tgrzej10@g... > Sent: 18 March 2005 14:59 > To: xmlschema-dev@w... > Subject: extending validation > > > Hi, > My question is about technology that would allow to validate > element's value against (let's say) database content. For example > I'd like to make a validation rule like this: > > <xsd:simpleType name="USState"> > <xsd:restriction base="xsd:string"> > <xsd:enumeration value="AK"/> > <xsd:enumeration value="AL"/> > <xsd:enumeration value="AR"/> > <!-- and so on ... --> > </xsd:restriction> > </xsd:simpleType> > > but with enumeration values taken from external resource (like > database). > One way to achive this seems to be to dynamically generate required > schema based on database content. On the other hand maybe there are > existing schema validators that allow to call custom functions (that > would perform neccessary checks) while validating a document. Or > maybe in XML Schmema itself there is some construct that would allow > to tell "call external procedure foo to validate this element". > > > I'd be gratefull for any hints and comments, > -- > Tomek Grzejszczyk > > > > From sharonkr@n... Sat Mar 19 14:52:53 2005 Received: from wiggum.w3. | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
