![]() |
| Previous Top Next |
DTDs and XML Schemas |
An SPS can be based on an XML Schema or DTD or have one or more XML Schemas or DTDs among its schema sources. An XML Schema or DTD can be created as a schema source in one of the following ways:
| • | The XML Schema or DTD is is created as a schema source directly when the SPS is created (File | New | New from XML Schema / DTD). |
| • | The XML Schema or DTD is added to an empty SPS or to an SPS with existing schema sources (in the Design Overview sidebar). |
The respective commands prompt you to browse for the XML Schema or DTD. If the schema is valid, it is created as a schema source in the Schema Sources tree of the Schema Tree sidebar.
The anyType datatype of XML Schema
If an element in the XML Schema has been assigned the anyType datatype of XML Schema or if it has not been assigned any datatype, then the schema tree in the Schema Tree will show this element as having all the global elements of that schema as possible children. For example, if an element called email has not been assigned any datatype, then it will be displayed in the schema tree with all global elements as possible children, such as, for example: person, address, city, tel, etc. To avoid this, assign the email element a datatype of xs:string.
See also:
Schema Tree sidebar, for a description of the Schema Tree sidebar and how to use it.
Multiple Schema Sources, for how multiple DTDs and XML Schemas can be used in combination DB schemas and user-defined schemas.
|