W3C XML Schema Definition (XSD) 1.0 Reverse Engineering - Import
Bridge Requirements
This bridge:is only supported on Microsoft Windows.
Bridge Specifications
Vendor | World Wide Web Consortium |
Tool Name | XML Schema Definition (XSD) |
Tool Version | 1.0 |
Tool Web Site | http://www.w3.org/XML/Schema |
Supported Methodology | [XML Modeling] Data Store (Physical Data Model) via XML XSD File |
Data Profiling | |
Incremental Harvesting | |
Multi-Model Harvesting | |
Remote Repository Browsing for Model Selection |
SPECIFICATIONS
Tool: World Wide Web Consortium / XML Schema Definition (XSD) version 1.0 via XML XSD File
See http://www.w3.org/XML/Schema
Metadata: [XML Modeling] Data Store (Physical Data Model)
Component: W3cXmlXsd version 11.2.0
OVERVIEW
REQUIREMENTS
n/a
FREQUENTLY ASKED QUESTIONS
Q: What schema version does this bridge support?
A: This bridge supports the W3C XML Schema 1.0 recommendation from May 2nd 2001 as defined by the following namespace in most implementations: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">. If your XSD file defines a different namespace not recognized by this bridge, you could try to change it to the namespace above.
This bridge supports the Microsoft XML Data Reduced (XDR) schema, as defined by the following namespace: <Schema xmlns="urn:schemas-microsoft-com:xml-data"
Q:What schema concepts are supported by this bridge?
A: Most concepts of the W3C XML Schema 1.0 (XSD) specification such as: schema, element, attribute, simpleType, complexType, group, attributeGroup, restriction, extension, simpleContent, complexContent.
Most concepts of the Microsoft XML Data-Reduced Schema (XDR) specification, such as: Schema, ElementType, AttributeType, element, attribute, group.
Q: What are the current restrictions of this bridge?
A: The schema must not be embedded in an instance XML document, it must be located in a separate schema file.
No support yet for the W3C XML Document Content Description (DCD) standard.
Restrictions in the W3C XML Schema 1.0 (XSD) specification include:
- key and keyref which involve complex XPath syntax are not supported,
- key and keyref which fields refer to XSD attributes are supported, those referring to XSD elements are also supported provided that you set the bridge parameter 'Collapse level' to 'Single Attribute' value or higher.
- the import mechanism is only partially supported. Imported elements are just added to the current model, generally without regards to the XML namespace.
- other unsupported concepts include unique, appInfo, redefine
LIMITATIONS
Refer to the current general known limitations at MIMB Known Limitations or bundled in Documentation/ReadMe/MIMBKnownLimitations.html
SUPPORT
Provide a troubleshooting package with debug log. Debug log can be set in the UI or in conf/conf.properties with MIR_LOG_LEVEL=6
Bridge Parameters
Parameter Name | Description | Type | Values | Default | Scope | |||||
File | The bridge uses the XML Schema file as input. | FILE |
|
Mandatory | ||||||
Elements content name | XML elements can carry some textual data, in addition to carrying named attributes and sub-elements. The XML DTD specification refers to this mixed content data as #PCDATA. The standard bridge behavior is as follows: - convert XSD elements into relational Entity/Table objects, - convert XSD attributes into relational Attribute/Column objects, - for XSD elements that contain text directly, create an extra attribute/column to carry this text, and have its name customizable with this parameter. More advanced behaviors involve collapsing algorithms, for example to treat an XSD element as a relational attribute/column when it is used by another XSD element. |
STRING | #PCDATA | Mandatory | ||||||
Collapse level | By default, the bridge creates a Class for every XSD element (or XDR ElementType). To reduce the number of objects you can collapse multiple Classes together. This option allows you to specify when to collapse a Class: 'None' No collapsing, every XSD Element becomes a class and every XSD Attribute becomes an attribute. 'Empty' Only empty Classes (i.e. without Attributes) should be collapsed into their parent classes. 'Single Attribute' Only XSD elements with a single attribute and no children should be collapsed into their parent class. 'No Children' Any XSD element that has no child element will be collapsed into its parent class. 'All' All XSD elements for which it is possible will be collapsed into their parent class. |
ENUMERATED |
|
None | ||||||
Collapse star | Determines whether XML elements with an incoming '*' link should be collapsed into their parent class. 'True' Collapse into their parent class. 'False' Do not collapse into their parent class. |
BOOLEAN | False | |||||||
Class type | This parameter defines how relationships between XSD elements should be interpreted. If you are converting the XSD into a UML object model, you may use this option to determine whether a Class type (UML concept) should be created when collapsing an Element into its parent Element. 'True' Create UML ClassTypes whenever possible. You can set this value when converting to a UML object modeling tool. 'False' Insert the Attributes of the Element about to be collapsed into its parent's Element. Set this value when converting to a relational data modeling tool. |
BOOLEAN | False | |||||||
Any | Determines whether to create a Class/Entity for the 'xs:any' pseudo-element. 'True' Represent 'xs:any' by creating a Class/Entity. 'False' Ignore 'xs:any' altogether. For example, in the following XSD fragment: <xs:sequence> <xs:element name='tag' type='xs:string'/> <xs:any minOccurs='0'/> </xs:sequence> the xs:any content can be represented or skipped entirely. |
BOOLEAN | True | |||||||
Generate IDs | Determines whether additional attributes should be generated to create Primary and Foreign Keys. 'True' Generate an Artificial Attribute for each XSD element to represent this primary key - Foreign key relationship. 'False' The model will not contain keys. |
BOOLEAN | False | |||||||
Import substitutionGroup as | Allows one to specify if inheritance is represented as a generalization or if inherited attributes are duplicated (rolled down) in the subclass. 'Generalization' Represent inheritance as generalization. 'Roll down' Roll down the attributes of the parent complexType to the child complexType. |
ENUMERATED |
|
Generalization | ||||||
Include path | Allows one to specify a path to a directory containing included schema files. This option may be useful when importing a schema composed of several included XSD files. This directory path must be locally accessible on the machine running this bridge. If the bridge is running locally, it will always search the directory that the File parameter points to. If the bridge is running on a remote server, this path must be a path accessible directly from the server. |
DIRECTORY | ||||||||
UDP namespace | Full name of the namespace that contains attributes to be imported as user defined properties (UDP). | STRING |
Bridge Mapping
Meta Integration Repository (MIR) Metamodel (based on the OMG CWM standard) |
"W3C XML Schema Definition (XSD) 1.0 Reverse Engineering" Metamodel W3cXmlXsd |
Mapping Comments |
Association | Element Content | Represent the links between an element and the elements it contains. |
Aggregation | True unless the element is used in several complexTypes | |
Description | annotation, documentation | |
AssociationRole | Element Content | |
Description | annotation, documentation | |
Multiplicity | minOccurs, maxOccurs | |
Name | The source role is named after the child element of the association | |
Position | Position of sub-element in element content | |
Source | based on Elements hierarchy | |
Attribute | Attribute, Element | A particular #PCDATA attribute is created to represent the mixed content of an Element. Elements imported as a class type are also mapped as attributes |
Description | annotation, documentation | |
InitialValue | default, fixed | |
Name | name | |
Position | Order in the file | |
BaseType | BaseTypes are created to serve as parents for the simpleTypes defined in the file. | |
CandidateKey | Key | Also a primary key is created if artificial attributes are generated. |
Description | annotation, documentation | |
Name | name | |
UniqueKey | Always set to true | |
Class | Element, ComplexType, Group, AtributeGroup | Group, attributeGroup and complexType definitions are expanded to the element's definitions |
CppClassType | Set to ENTITY | |
CppConcurrency | Set to True | |
Description | annotation, documentation | |
Name | name | |
ClassDiagram | No equivalent in XML. A main class diagram "Main" will be created to contain all elements. | |
ClassType | Element | when the Element is imported as an Attribute of its parent (depends on the bridge options). |
Description | annotation, documentation | |
Name | Element Name | Element Name |
DerivedType | SimpleType | In case of an Union, only the first item is used |
DataType | See datatype conversion array | |
Description | annotation, documentation | |
Length | length, totalDigits, maxLength, minLength | |
LowerBound | maxExclusive, maxInclusive | |
Name | name | either explicitely in the file, or computed based on its usage |
Scale | fractionDigits | |
UpperBound | maxExclusive, maxInclusive | |
UserDefined | True for simpleTypes defined in the file, False for those defined in the Schema specification | |
DesignPackage | No equivalent in XML. A main package "Logical View" will be created to contain all elements. | |
ForeignKey | Keyref | Foreign keys are created based on associations if artificial attributes are generated. |
Description | annotation, documentation | |
Name | name | |
Grouping | Sequence, Choice, All | |
Description | annotation, documentation | |
GroupingType | GROUPING_TYPE_SEQUENCE for Sequence and All, GROUPING_TYPE_OR for Choice | |
Multiplicity | minOccurs, maxOccurs | |
Position | Position of sub-element in element content | |
Index | An index is created for each generated key. | |
IndexMember | An index member is created for each key attribute. | |
StoreModel | Schema | The model is built using the elements contained in the file. |
Name | Computed from the file name. | |
TypeValue | Enumeration | |
Description | annotation, documentation | |
Name | value | |
Position | Order in the file | |
Value | value |