How abstract components are returned when schema.getElementDeclarations() is called – an animation in 3 slides -- schemas that use <include> and <import>

- July 26, 2002 5:00pm EDT

  These schema documents are equivalent to the

  - <xs:schema targetNamespace=“t1“ xmlns:xs=“http://www.w3.org/2001/XMLSchema”>
  - <xs:include schemaLocation=“s3.xsd”/>
  - <xs:import namespace=“t2” schemaLocation=“s2.xsd”/>
  - <xs:element name=“t1e1” type=“xs:string”/>
  - </xs:schema>
  - s2.xsd:
  - <xs:schema targetNamespace=“t2” xmlns:xs=“http://www.w3.org/2001/XMLSchema”>
  - <xs:element name=“t2e1” type=“xs:string”/>
  - </xs:schema>
  - s3.xsd:
  - <xs:schema targetNamespace=“t1” xmlns:xs=“http://www.w3.org/2001/XMLSchema”>
  - <xs:element name=“t1e2” type=“xs:string”/>
  - </xs:schema>

  Calling method

  - The calling method has -- in a variable -- a pointer to the first XSDSchema shown on the left
  - It uses this to get a collection of all the Element Declarations that are part of that schema

  s1.getElementDeclarations()