XML Schemapatterns
XML Schemapatterns
Agenda
Popular XML Schema Design Patterns > Russian Doll > Salami Slice > Venetian Blind > Garden of Eden NetBeans Support on XML Schema Design Patterns
You can conveniently classify the four most common patterns according to two criteria, namely:
> Ease of use for instance developers > Ease of reuse for schema developers
Russian Doll
Russian Doll
The Russian Doll design contains only one single global element. All the other elements are local. You nest element declarations within a single global declaration
Global element
Disadvantages
> Reuse of elements is limited not easy to use from
Usage
Russian Doll is the simplest and easiest pattern to use by instance developers. However, if its elements or types are intended for reuse, Russian Doll is not suitable for schema developers.
10
Salami Slice
11
Salami Slice
All the elements in the Salami Slice design are global. No nesting of element declarations is required and you can reuse the declarations throughout the schema. You must define all the elements within the global namespace.
12
Global elements
13
Disadvantages
> Exposes the complexity in namespace.
14
Venetian Blind
15
Venetian Blind
The Venetian Blind design contains only one global element. All the other elements are local. You nest element declarations within a single global declaration by means of named complex types and element groups. You can reuse those types and groups throughout the schema and must define only the root element within the global namespace.
16
Global element
17
Disadvantages
> Limits encapsulation by exposing types.
18
Usage
Because it has only one single root element and all its types are reusable, Venetian Blind is suitable for use by both instance developers and schema developers.
> Venetian Blind is considered as an extension of
19
Garden of Eden
20
Garden of Eden
You define all the elements and types in the global namespace and refer to the elements as required.
21
Global elements
22
Disadvantages
> Contains many potential root elements. > Limits encapsulation by exposing types. > Is difficult to read and understand.
23
24
Creating type
> Create Type(s) > Do not Create Type(s)
25
26
Thank you!