Open ronaldtse opened 3 years ago
Ping @TRThurman the above is based on our last discussion at WG 12, please let me know if this is accurate. Thanks!
There is a missing optional element from the list above. /MAPPING_OF/ which is a predefined template.
See following: The definition and use of mapping templates are not supported in the present version of the application modules. However, use of predefined templates /MAPPING_OF/, /SUBTYPE/, and /SUPERTYPE/ is supported.
The newline character is part of the syntax. However, the use of newline to separate this declaration is not enforced by the XSL scripts.
This: presentation_style_assignment presentation_style_assignment.styles[i] -> presentation_style_select
might also be encoded as: presentation_style_assignment presentation_style_assignment.styles[i] -> presentation_style_select
mim elements are usually repeated in the reference path when an attribute is specified This usually appears ... presentation_style_assignment presentation_style_assignment.styles[i] -> presentation_style_select
This might appear presentation_style_assignment.styles[i] -> presentation_style_select
When PATH appears, any source entry shall be ignored. (A warning could be issued...)
The formal specification for mapping syntax and semantics is SC4N2661. If there are inconsistencies between that document and the above extract of clause 5.1, they need to be brought to the attention of WG12. SC4N2661 Guidelines for the development of mapping specifications.doc.zip
I could not find this document: STONIS, Alfonsas; Mapping syntax extensions, ISO TC 184/SC4/QC N203, 2001-06-11.
I found this document. qcn163.htm.pdf
Thank you @TRThurman !
@TRThurman specifications from SC4N2661 and qcn163.htm.pdf should probably be published as a standard in order to formalise the mapping language.
MIM documents contain "reference path" mappings that relates to the EXPRESS schemas and their items.
Specifically:
For example in ISO 10303-1001 (in the SMRL), it contains:
Is to be understood by these rules:
->
->
symbol, references the entity or select type whose name follows the -> symbol;[i]
[i]
symbol, is an aggregate; any element of that aggregate is referred to;So the element
presentation_style_assignment.styles
is an aggregate, and every item inpresentation_style_assignment.styles[i]
refers to the select typepresentation_style_select
.The challenges are:
presentation_style_select
) referred exist or has changed based on the actual EXPRESS schemas.What we need to do:
The full specification here.
5.1 Mapping specification
In the following, "Application element" designates any entity data type defined in Clause 4, any of its explicit attributes and any subtype constraint. "MIM element" designates any entity data type defined in Clause 5.2 or imported with a USE FROM statement, from another EXPRESS schema, any of its attributes and any subtype constraint defined in Clause 5.2 or imported with a USE FROM statement.
This clause contains the mapping specification that defines how each application element of this part of ISO 10303 (see Clause 4) maps to one or more MIM elements (see Clause 5.2).
The mapping for each application element is specified in a separate subclause below. The mapping specification of an attribute of an ARM entity is a subclause of the clause that contains the mapping specification of this entity. Each mapping specification subclause contains up to five elements.
Title: The clause title contains:
<attribute name>
to<referred type>
, when this attribute refers to a type that is not an entity data type or a SELECT type that contains or may contain entity data types.MIM element: This section contains, depending on the considered application element:
When the mapping of an application element involves more than one MIM element, each of these MIM elements is presented on a separate line in the mapping specification, enclosed between parentheses or brackets.
Source: This section contains:
This section is omitted when the keywords PATH or IDENTICAL MAPPING or NO MAPPING EXTENSION PROVIDED are used in the MIM element section.
Rules: This section contains the name of one or more global rules that apply to the population of the MIM entity data types listed in the MIM element section or in the reference path. When no rule applies, this section is omitted.
A reference to a global rule may be followed by a reference to the subclause in which the rule is defined.
Constraint: This section contains the name of one or more subtype constraints that apply to the population of the MIM entity data types listed in the MIM element section or in the reference path. When no subtype constraint applies, this section is omitted.
A reference to a subtype constraint may be followed by a reference to the subclause in which the subtype constraint is defined.
Reference path: This section contains:
For the expression of reference paths and of the constraints between MIM elements, the following notational conventions apply:
[]
()
{}
<>
\|\|
->
->
symbol, references the entity or select type whose name follows the->
symbol;<-
<-
symbol, is referenced by the entity attribute whose name follows the<-
symbol;[i]
[i]
symbol, is an aggregate; any element of that aggregate is referred to;[n]
[n]
symbol, is an ordered aggregate; member n of that aggregate is referred to;=>
=>
symbol, is a supertype of the entity whose name follows the=>
symbol;<=
<=
symbol, is a subtype of the entity whose name follows the<=
symbol;=
\
*
--
*>
*>
symbol, is extended into the select or enumeration type whose name follows the*>
symbol;<*
<*
symbol, is an extension of the select or enumeration type whose name follows the<*
symbol;!{}
{}
indicates a negative constraint placed on the mapping.