4
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 org.eclipse.xsd XML Schema Infoset Model begin If not full screen, and not running in Internet Explorer, Press F5 to begin… © 2002 by IBM Corporation

How abstract components are returned when schema.getElementDeclarations() is called – an animation in 3 slides -- schemas that use and July 26, 2002 5:00pm

Embed Size (px)

Citation preview

Page 1: How abstract components are returned when schema.getElementDeclarations() is called – an animation in 3 slides -- schemas that use and July 26, 2002 5:00pm

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

org.eclipse.xsdXML Schema Infoset Model

begin

If not full screen, and not running in Internet Explorer,Press F5 to begin…

© 2002 by IBM Corporation

Page 2: How abstract components are returned when schema.getElementDeclarations() is called – an animation in 3 slides -- schemas that use and July 26, 2002 5:00pm

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>

Now let’s follow how the abstract schema componentsare fetched, in response to schema.getElementDeclarations(),

components in memory:

and returned as an EList…

Page 3: How abstract components are returned when schema.getElementDeclarations() is called – an animation in 3 slides -- schemas that use and July 26, 2002 5:00pm

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

Calling m

ethod

XSDSchema

targetNamespace: incorporatedVersions: list

content:

Page 4: How abstract components are returned when schema.getElementDeclarations() is called – an animation in 3 slides -- schemas that use and July 26, 2002 5:00pm

s1.getElementDeclarations() Calling m

ethod

XSDElementDeclaration

name:targetNamespace:typeDefinition:isSetAnonymousTypeDefinition: false

t1e2t1

XSDSchema

targetNamespace: incorporatedVersions: list

t2

content:

XSDElementDeclaration

name:targetNamespace:typeDefinition:isSetAnonymousTypeDefinition: false

t2e1t2

XSDElementDeclaration

name:targetNamespace:typeDefinition:isSetAnonymousTypeDefinition: false

t1e1t1

XSDSchema

targetNamespace: incorporatedVersions: list

t1

content:

XSDSchema

targetNamespace: incorporatedVersions: list

content:

t1

s1.getElementDeclarations()

EList

content:

see org.eclipse.emf.ref.EList