On Thu, 2002-11-21 at 12:31, [EMAIL PROTECTED] wrote:
> John,
> 
> Have you considered querying org.exolab.castor.xml.schema.Schema
> for the schema rules instead of the generated source?

Well, the problems with working directly with the schema is that I need
to only get a subsection of the schema and that subsection is much
easier to determine based on the object model and not the schema
itself.  This is why I am looking at trying to use the object model
instead.

So for example I have a schema that looks something like this:

<xs:schema xmlns:xs = "http://www.w3.org/2001/XMLSchema";
 elementFormDefault = "qualified"
 attributeFormDefault = "unqualified">

  <xs:include schemaLocation = "included-schema.xsd"/>

  <xs:element name = "PurchaseOrder">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref = "PurchaseOrderHeader"/>
        <xs:element ref = "PurchaseOrderLineItem"/>
        <xs:element ref = "PurchaseOrderSummary"/>
      </xs:sequence>
    </xs:element>

</xs:schema>


Now the above included schema called included-schema.xsd has a lot of
stuff that i dont care about in terms of a PurchaseOrder so I figured
that the easiest way to get the validation information for only the
PurchaseOrder is to load the PurchaseOrderDescriptor that was generated
and work with that as it will only contain the subset of descriptors
that I need.  Is there a better way to accomplish this?


Thanks,
John
-- 
********************************
** John Thorhauer
** [EMAIL PROTECTED]
** take a look at:
**  http://tambora.zenplex.org
**  http://www.zenplex.org
**  http://www.zenplex.com
********************************

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to