My ultimate goal is to take a schema and generate a blank XML template. From there I'd like to create a web based form that validates data based on the rules outlined in the schema.
My schema looks like this: <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.someplace.com/SOMEPLACE" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.someplace.com/SOMEPLACE" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:include schemaLocation="./Some_Aggregates.xsd"/> <xs:include schemaLocation="./Some_Types.xsd"/> <xs:element name="SomeRq"> <xs:complexType> <xs:sequence> <xs:element ref="SomeID"/> <xs:element ref="SomeIdInfo" minOccurs="0"/> <xs:element ref="SomeInfo"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="SomeRs"> <xs:complexType> <xs:sequence> <xs:element ref="SomeStatus"/> <xs:element ref="SomeID"/> <xs:element ref="SomeIdRec" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema> >From this schema, I should be able to create XML for SomeRq and/or SomeRs. I've got the following java code: XSModel model = schemaLoader.loadURI(argv[0]); if (model != null) { XSNamedMap ccomponents = model.getComponents(XSTypeDefinition.COMPLEX_TYPE); int complexcount = ccomponents.getLength(); XSComplexTypeDefinition complexType = null; XSParticle particle = null; for (int i = 0; i < complexcount; i++) { complexType = (XSComplexTypeDefinition)ccomponents.item(i); System.out.println("name: " + complexType.getName() + complexType.getParticle()); } This code prints out information on the complex types included in <xs:include schemaLocation="./Some_Types.xsd"/>, but not in SomeRq or SomeRs... I am having a difficult time understanding the API for Xerces-J for schemas and haven't found many examples outside of the QueryXS that comes with the most recent version of Xerces. Any help you can provide me with would be great! Thanks, Brent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]