Search Posts

Visits: 176

GB/T 24589.2—2010 XML Schema

Salami Slice design for tables in module
Russian Doll & Venetian Blind design for fields in table

Nobu’s Comments on current pattern

  • It’s hard to understand the structure of table
  • <xs:element> definition for field has no information about datatype. Requires checking type definition in corresponding type definition.
  • Cannot validate field’s lexical representation
  • prohibiting reuse of datatype result in poor maintainability of XML Schema
  • No extension is considered
  • No localization is considered

We cam make this design more simple and flexible.

Revised Salami Slice design by Nobu

Nobu propose the Revised Salami Slice design for both tables and fields.

This design introduces use of type definition for component items. You define all the elements and types in the global namespace and refer to the elements as required.

See the following example.

Because it exposes all its elements and types globally, Revised Salami Slice, is completely reusable. However, because Garden of Eden exposes multiple elements as global ones, there are many potential root elements.

Step 1 define element for fields
→  Improve visibility of field structure in table

Step 2 general datatype for reuse
→ Improve datatype visibility of field

Step 3 <substitutionGroup>

Evaluation

XML schema and instance documents