Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Use schema to valid data field where code values are stored in another xml document

From: "John Saunders" <john.saunders at trizetto.com>
To: NULL
Date: 4/5/2007 1:08:00 PM

"Harlz" <nospam@n...> wrote in message 
news:eoEcFG6dHHA.2332@T......
>I have a xml spec I created for an order entry process.  I'm validating the
> xml against a schema (xsd).  One of the fields in the xml spec is a 
> product
> code.  I have another xml document that lists the product codes with a
> description of the products.  I want the schema to import the product 
> codes
> xml document and validate the product code field against these codes from
> the product data xml document.  My reason is if I add  or change products 
> I
> only have to modify the product code xml document.  I'm not even sure if
> this is possible any one know if this is possible.

One XML schema can import or include another. If you put your product code 
file into the format for an XML schema, then your main schema could import 
it.

If it's not an XML schema, then another XML schema cannot use it.

Also, how many product codes are there? If there are many, then your schema 
could become quite large and inefficient. You might consider leaving product 
code validation out of the schema, and instead, validate it in code, using 
the product code file.

If you _really_ want to do it "the XML way", then you could create an XSL 
stylesheet which references the product code file using the "document" 
function.

John




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