Important Considerations

Advanced information you may need to know when working with cataloged XML Schema components.

About <xsd:import> and <xsd:include>

When an XSD documents uses <xsd:import> or <xsd:include> definitions, the referred XSD documents will also be loaded and cataloged together in the same module.

If you catalog two separate XSD documents which both include a common third XSD document, the types defined in the shared XSD will be included twice in your catalog.

For example, given the following scenario:
Customer.xsd includes Address.xsd
Provider.xsd includes Address.xsd
      
If you catalog Customer.xsd you will get components for both Customer types and Address types under the Customer module. If you then catalog Provider.xsd you will get components for both Provider and (again) Address types under the new Provider module. Those types defined in the shared Address.xsd appear twice.
Although Address components under the Customer and Provider modules are not strictly of the same PBL type, you can convert objects from one to the other by converting them to XML strings and re-creating the objects. Example:
  customer as XSD.Customer.Customer
  customer = XSD.Customer.Customer()
  customer.loadFromUrl("file://c:/tmp/customer.xml")

  // customer.address is of PBL type XSD.Customer.Address

  xmlAddress as String = generateXmlFor(customer.address)

  provider as XSD.Provider.Provider()
  provider.address = XSD.Provider.Address(xmlAddress)