xsd:enumeration from XML file
-
Is it possible to use the values from a XML file as the restriction/enumeration in a schema? The only way I know off is to use XSL to generate a XSD file that only contains the enumeration and then include it into the other XSD file. For example a customers.xml and a order.xsd as the schmema for orders.xml, where the name should be restricted to those in customers.xml.
-
Is it possible to use the values from a XML file as the restriction/enumeration in a schema? The only way I know off is to use XSL to generate a XSD file that only contains the enumeration and then include it into the other XSD file. For example a customers.xml and a order.xsd as the schmema for orders.xml, where the name should be restricted to those in customers.xml.
Andre Buenger wrote:
The only way I know off is to use XSL to generate a XSD file that only contains the enumeration and then include it into the other XSD file.
Not the only way (e.g. you could put the enumeration into orders.xsd and use DOM to change it according to the content of customers.xml), but I think your approach is better and far more practible, so in my opinion you should go for it.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook