How abstract components are created when reading a schema – an animation in 12 slides
-- schemas that use <include> and <import>

July 26, 2002 5:00pm

This presentation will probably involve audience discussion, which will create action items. Use PowerPoint to keep track of these action items during your presentation

In Slide Show, click on the right mouse button

Select “Meeting Minder”

Select the “Action Items” tab

Type in action items as they come up

Click OK to dismiss this box

This will automatically create an Action Item slide at the end of your presentation with your points entered.

org.eclipse.xsd

XML Schema Infoset Model

If viewing in OpenOffice, hit F9 to begin.

If viewing in a browser, animations will only show final states.

© 2002 by IBM Corporation

Parse of a top level schema document.

<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 components

are built, by getting “blank” objects from XSDFactory,

We’ll follow this example:

setting their properties,

linking them to each other, and

making them part of the right schema…

Parse of s1 <xs:schema targetNamespace=“t1”>

XSDSchema

targetNamespace:

incorporatedVersions: list

XSDFactory

t1

content

<xs:schema targetNamespace=“t1">

<xs:include schemaLocation=“s3.xsd”/>

<xs:import namespace=“t2” schemaLocation=“s2.xsd”/>

<xs:element name=“t1e1” type=“xs:string”/>

</xs:schema>

createXSDSchema()

setTargetNamespace(“t1”)

Parse of s1 <xs:include schemaLocation=“s3.xsd”>

XSDSchema

targetNamespace:

incorporatedVersions: list

XSDFactory

t1

content:

Suspend parse

of s1.xsd.

Begin parse

of s3.xsd

<xs:schema targetNamespace=“t1">

<xs:include schemaLocation=“s3.xsd”/>

<xs:import namespace=“t2” schemaLocation=“s2.xsd”/>

<xs:element name=“t1e1” type=“xs:string”/>

</xs:schema>

Parse of s3 <xs:schema targetNamespace=“t1”>

XSDSchema

targetNamespace:

incorporatedVersions: list

XSDFactory

t1

content:

<xs:schema targetNamespace=“t1”>

<xs:element name=“t1e2” type=“xs:string”/>

</xs:schema>

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

createXSDSchema()

setTargetNamespace(“t1”)

t1

Parse of s3 <xs:element name=“t1e2” type=“xs:string”/>

XSDSchema

targetNamespace:

incorporatedVersions: list

XSDFactory

t1

content:

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e2

t1

<xs:schema targetNamespace=“t1”>

<xs:element name=“t1e2” type=“xs:string”/>

</xs:schema>

XSDSimpleTypeDefinition

name: string targetNamespace: http://www.w3.org/2001/XMLSchema

Not shown is that the Schema for Schemas becomes one of the incorporated schemas

XSDSchema

targetNamespace:

http://www.w3.org/2001/XMLSchema

content:

createXSDElementDeclaration()

setTargetNamespace(“t1”)

setName(“t1e2”)

setTypeDefinition( )

getContents( ).add()

t1

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

Parse of s3 </xs:schema>

XSDSchema

targetNamespace:

incorporatedVersions: list

XSDFactory

t1

content:

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e2

t1

Finished parsing

of s3.xsd.

Resume parsing

of s1.xsd

<xs:schema targetNamespace=“t1”>

<xs:element name=“t1e2” type=“xs:string”/>

</xs:schema>

XSDSimpleTypeDefinition

name: string targetNamespace: http://www.w3.org/2001/XMLSchema

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

t1

Parse of s1 <xs:import namespace=“t2”
schemaLocation=“s2.xsd”/>

XSDFactory

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e2

t1

Suspend parsing

of s1.xsd.

Begin parsing

of s2.xsd

<xs:schema targetNamespace=“t1">

<xs:include schemaLocation=“s3.xsd”/>

<xs:import namespace=“t2” schemaLocation=“s2.xsd”/>

<xs:element name=“t1e1” type=“xs:string”/>

</xs:schema>

XSDSimpleTypeDefinition

name: string targetNamespace: http://www.w3.org/2001/XMLSchema

XSDSchema

targetNamespace:

incorporatedVersions: list

t1

content:

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

t1

Parse of s2 <xs:schema targetNamespace=“t2”/>

XSDFactory

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e2

t1

XSDSchema

targetNamespace:

incorporatedVersions: list

t2

content:

<xs:schema targetNamespace=“t2”>

<xs:element name=“t2e1” type=“xs:string”/>

</xs:schema>

XSDSimpleTypeDefinition

name: string targetNamespace: http://www.w3.org/2001/XMLSchema

createXSDSchema()

XSDSchema

targetNamespace:

incorporatedVersions: list

t1

content:

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

t1

Parse of s2 <xs:element name=“t2e1” type=../>

XSDFactory

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e2

t1

XSDSchema

targetNamespace:

incorporatedVersions: list

t2

content:

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t2e1

t2

<xs:schema targetNamespace=“t2”>

<xs:element name=“t2e1” type=“xs:string”/>

</xs:schema>

XSDSimpleTypeDefinition

name: string targetNamespace: http://www.w3.org/2001/XMLSchema

XSDSchema

targetNamespace:

incorporatedVersions: list

t1

content:

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

t1

Parse of s2 </xs:schema>

XSDFactory

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e2

t1

XSDSchema

targetNamespace:

incorporatedVersions: list

t2

content:

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t2e1

t2

Finished parsing

of s2.xsd.

Resume parsing

of s1.xsd

<xs:schema targetNamespace=“t2”>

<xs:element name=“t2e1” type=“xs:string”/>

</xs:schema>

XSDSimpleTypeDefinition

name: string targetNamespace: http://www.w3.org/2001/XMLSchema

XSDSchema

targetNamespace:

incorporatedVersions: list

t1

content:

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

t1

Parse of s1 <xs:element name=“t1e1”../>

XSDFactory

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e2

t1

XSDSchema

targetNamespace:

incorporatedVersions: list

t2

content:

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t2e1

t2

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e1

t1

<xs:schema targetNamespace=“t1">

<xs:include schemaLocation=“s3.xsd”/>

<xs:import namespace=“t2” schemaLocation=“s2.xsd”/>

<xs:element name=“t1e1” type=“xs:string”/>

</xs:schema>

XSDSchema

targetNamespace:

incorporatedVersions: list

t1

content:

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

t1

Parse of s1 </xs:schema>

XSDFactory

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e2

t1

XSDSchema

targetNamespace:

incorporatedVersions: list

t2

content:

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t2e1

t2

XSDElementDeclaration

name:

targetNamespace:

typeDefinition:

isSetAnonymousTypeDefinition: false

t1e1

t1

<xs:schema targetNamespace=“t1">

<xs:include schemaLocation=“s3.xsd”/>

<xs:import namespace=“t2” schemaLocation=“s2.xsd”/>

<xs:element name=“t1e1” type=“xs:string”/>

</xs:schema>

XSDSchema

targetNamespace:

incorporatedVersions: list

t1

content:

XSDSchema

targetNamespace:

incorporatedVersions: list

content:

t1

Project Status

Robert Schloss

2002-04-23T16:54:51