XML Configuration file

The XML configuration file is responsible for representation of a P28 output file. The XML configuration file specifies how the EXPRESS Schema is represented in a XML schema and how instances are rendered into the XML elements. EDM will use default values if no XML configuration file is available. The configuration file consists of different part, which are as follow:

option:

Option nameDescription
inheritance Boolean

The inheritance attribute controls the use of XML "inheritance" in the derived XML schema. The value is true or false. The default value is false. Inheritance can only occur on an option element and applies to the   entire context schema.

exp-type The exp-type attribute controls the use of by-reference and by-value instance elements for the specified defined data type
exp-attributeThe exp-attribute configuration option determines how an EXPRESS attribute is represented in XML. The option shall have one the following values: double-tag, attribute-tag, type-tag, no-tag,unspecified, or attribute-content. The default value is attribute-tag, unless the datatype of the attribute is a SELECT datatype, or an entity datatype, in which case the default is double-tag.
flatten

The flatten option is used to replace nested aggregates with a single-dimensional collection.  The value is true, false or a  positive integer.  If it is true, then all of the nested aggregates are flattened.  If it is a number, then that number is interpreted as the  number of dimensions of nesting to flatten.

sparseThe sparse option indicates an aggregate is represented in a sparse form.  If it is sparse, then missing elements are indicated by the use of the pos attributes in the instance data, otherwise xsi:nil is used to indicate unset values.  This option may be specified on the attribute or aggregate configuration elements.
taglessThe tagless option is used to specify that aggregate elements are, where possible, to be represented without tags for the individual elements.
naming-conventionThe naming-convention attribute declares the default naming convention to be used to represent an EXPRESS identifier. This option may have the values initial-upper, camel-case or preserve-case. The default value is initial-upper.


Currently EDM does not support the name, aggregate-content, use-id, keep and content.

 

type:

This is the mapping part. it allows EXPRESS types to be mapped to a XML type. from the standard:

 

"This option may be used on a type element that configures an EXPRESS BINARY, INTEGER, NUMBER, REAL, or STRING data type, or a defined data type whose fundamental type is one of these. In this  case, the option specifies the representation for all values of that EXPRESS data type wherever they occur. The map option shall not be used for any other EXPRESS data type. This option may be used on an attribute element that configures an EXPRESS attribute whose data type is any of BINARY, INTEGER, NUMBER, REAL, or STRING, or a defined data type whose fundamental type is one of these. In this case, the option specifies the representation for all values of that EXPRESS attribute. The map option shall not be used for an EXPRESS attribute whose data type is not one of the above."

 

Mapped types for EXPRESS BINARY

For any EXPRESS data type whose fundamental type is BINARY, the following XML Schema data types are permitted as values of the map directive:

  • hexBinary
  • base64Binary

Mapped types for EXPRESS INTEGER

For any EXPRESS data type whose fundamental type is INTEGER, the following XML Schema data types are permitted as values of the map directive:

  • integer
  • decimal
  • long
  • int
  • short
  • byte
  • unsignedLong
  • nonNegativeInteger
  • nonPositiveInteger
  • positiveInteger
  • negativeInteger
  • year

NOTE Except for year, this assignment affects the value space, but not the encoding. Choosing year also affects the encoding.

 

Mapped types for EXPRESS NUMBER or REAL

For any EXPRESS data type whose fundamental type is NUMBER or REAL, the following XML Schema data types are permitted as values of the map directive:

  • double
  • decimal
  • float

 

NOTE This assignment affects the value space and the encoding.

 

EXAMPLE:

The following example causes the EXPRESS REAL type to be represented by an xs:decimal value, and the positive_length_measure type (a defined type, whose ultimate underlying type is REAL) by an xs:double XML type.

<type select="real" map="xs:decimal"/>
<type select="positive_length_measure" map="xs:double"/>

 

Mapped types for EXPRESS STRING

For an EXPRESS data type whose fundamental type is STRING, the following XML Schema data types are permissible as values of the map directive:

  • string
  • language
  • Name
  • QName
  • NMTOKEN
  • anyURI
  • NOTATION

 

NOTE This assignment affects the value space, but not the encoding of the value. It may also affect the encoding of ARRAY/BAG/LIST/SET OF the data type.

 

 

Â