| Cost-Effective EDI Using XML? | Table of contents | Indexes | Preparing intelligent graphics for interactive catalogs | |||
Strategies for implementing SGML/XML as a glue layer in engineering processes |
|
Bernhard Weichel |
| Robert Bosch GmbH K3/EES4 Postfach 30 02 40 Stuttgart Germany 70442 Email: bernhard.weichel@pcm.bosch.de |
Biographical notice: |
Bernhard Weichel |
ABSTRACT: |
Engineering processes for engine management systems |
|
Motronic ME7 |
![]() |
Phases in the engineering process |
![]() |
| embedded software |
Now I would like to focus on the engineering process for the software which is built into the ECU (Electronic Control Unit) of an engine management system. Every car manufacturer produces various engine types (different volumes, number of valves, turbo etc.). In addition to this, there are many variants of vehicles which impact the amount of variants for the control system. Worldwide we have different laws. All this leads to hundreds of different MOTRONIC programs. |
| process step |
These systems are based on platforms, configured by using generic functions, customer and project specific functions. The systems are applied to the individual engines by adjusting thousands of parameters. In conclusion, we see the following major areas in this process: |
| system design system simulator |
Development of systems with complete programs built of functions from an existing library as well as new functions which are defined as specification for the function development. In addition to this, system development covers areas others than software (but which may influence software). |
Function development in ASCET simulator |
![]() |
A flexible document architecture |
|
document ![]() |
While dealing with such complex engineering processes, it is often unclear what a document really is. The three layer architecture in can help in this respect: |
Document layer architecture |
![]() |
HTML, Hypertext Markup Language ![]() presentation view rendition ![]() selection |
This is the daily experience with a document. It is a piece of paper with a certain amount of information which is presented using various fonts, layouts and graphical elements. Progressive people use this document in electronic form. |
| data management engineering tool |
The engineering base is the set of engineering data in the original formats of the tools used in the process. These data files are usually stored in an EDMS (engineering data management system) which has no access to the content of the administrated data. |
If views are required which reflect information from more than one engineering tool, then either some connection of the tools is required, or the documents must be assembled manually. |
Obviously there is a gap between the presentation view and the engineering base. |
archive ![]() document instance |
The existing gap between the two layers mentioned above can be closed by introducing a middle layer, the document base. This layer must be built upon a standard data format which can be used to generate all the required outputs (document views) in the presentation layer while still having the power to keep the semantics of the engineering base at least to some extent. |
This layer is the domain of SGML/XML, which is easy to create, able to define powerful data structures and not too hard to read by humans as well as by machines. |
The document base as a glue layer |
|
archive ![]() data format integration ![]() |
The role of the DTD in the document base |
DTD, Document Type Definition ![]() |
The document base can be setup with all the flexibility and benefits provided by SGML. But it is obvious, that the design of the DTDs determines the usability of the document base. In principle, as I see it, there are three classes of DTDs |
rendition ![]() |
The focus of this DTD style is rendition, therefore the capabilities are mostly oriented to publishing tools. This kind of DTD cannot be used for data exchange between tools. This DTD style is not even appropriate to build the document base. |
DOCBOOK.DTD MSRREP.DTD ![]() presentation ![]() structure ![]() |
The focus of this DTD style is the structure of the presentation layer but not rendering. So such DTDs allow to support various layouts on many different media. An example for this class of DTDs is DOCBOOK.DTD or MSRREP.DTD ( ). This sort of DTD is well suited for the document base if the required presentations reflect layout and global rearrangement. It is not really possible to extract information based on the content of the document, since the semantic of the DTD is oriented on the structure of a presentation rather than on the a data model of the presented subjects. |
data model ![]() data scheme database ![]() |
This class of DTDs is essential if data exchange is performed via the document base. The focus of such DTDs is a data model reflecting the reality of the objects in the process. This means, that the semantic of the DTDs reflect the details of the presented subjects. For example we have |
Building a database oriented DTD |
|
| data analysis |
When building a database oriented DTD it appears that all the methods of data analysis can be used. But if you do this, you might end up in a relational data model which does not necessarily reflect the real world of engineering objects. An SGML DTD is much more like an object oriented database scheme with all its power than a relational one. |
Relational models |
|
| entitiy relationship relational data model |
The relational data model is defining records of data which are related to each other. The tables are identified using an entity relationship analysis which identifies the relationships between the table rows. In order to store data without redundancy in relational tables, the data model must be normalized. It is obvious that this paradigm can very easy be implemented using SGML/XML. This makes it easy to use SGML/XML as an archive as well as an exchange format for relational database applications. I will illustrate this in the following figure ( ). |
relational data model |
<company>
<emps>
<emp emp-no="4321"
name="Bernhard Weichel"
adress="stuttgart"/>
<emp emp-no="12345"
name="Helmut Gengenbach"
adress="schwieberdingen"/>
</emps>
<depts>
<dept name="K3/EES4" mgr="4321"/>
<dept name="FV/PLI" mgr="0815"/>
</dept>
</company> |
Object oriented models |
|
| object oriented data model |
SGML/XML has the power to define very complex data models. The major reason for this is the fact that it represents a tree structure which is one of the most intuitive data models for the real world. I am using the term "object oriented" rather in the sense that the data model is oriented towards the structure of the described objects than in the traditional sense of object oriented programming. |
Example of an object oriented DTD |
![]() |
The following illustrates, how this structure is filled in the instance. It is one of the characteristics to calibrate an engine management system. The example (related to the one in ) is a curve with individual set points. |
Instance for calibration parameter |
<sw-param>
<long-name>Lambda Wirkungsgrad</long-name>
<short-name>etalam</short-name>
<sw-param-class>curve_individual</sw-param-class>
<desc>
Abbildung Basis-Lambda
auf den Lambda-Wirkungsgrad ohne Eingriff
bezogen auf optimales Moment bei Lambda=1
</desc>
<sw-param-array-x>
<sw-param-axis-x>
<sw-axis-individual>
<sw-variable-ref>lambas</sw-variable-ref>
<max-count>10</max-count>
</sw-axis-individual>
</sw-param-axis-x>
<sw-param-axis-values>
<sw-compu-method-ref>rel_ub_b127b5</sw-compu-method-ref>
</sw-param-axis-values>
<sw-addressing-method-ref>NearRomByte</sw-addressing-method-ref>
<sw-param-record-layout-ref>KlAUbSstUbWUb</sw-param-record-layout-ref>
<sw-code-syntax-ref>KlNearAUbSstUbUb</sw-code-syntax-ref>
</sw-param> |
Using a database oriented DTD |
|
First I want to talk about how a database oriented DTD can support the entire life cycle. This is important for an understanding of the use cases for such a DTD presented later. |
Supporting the entire life cycle |
|
engineering process ![]() life cycle prcess phase |
If the DTDs are bound to support all the phases of an engineering process ( ), a new set of problems must be solved: |
HyTime ![]() ID/IDREF ![]() MSRSW.DTD ![]() SGML/XML editor ![]() XLL ![]() data model ![]() occurence schema ![]() |
In the first place it appears to make sense to have a sub-DTD for each process phase or even one per tool. This would allow to define the data set per process phase by this DTD. On the other hand, this approach requires specific SGML applications for each process phase. The knowledge about the data structures would also be process phase specific. |
One DTD for different process phases |
![]() |
| Well formed XML filter formatter |
Following this approach, there is only one DTD used in all process phases which supports a complete data model. This leads to the fact that in this DTD everything missed in one process phase should be optional. Practically speaking, any element must be optional. The DTD is still worthy because it defines a limited set of access paths to the data. The instances can still be handled as retrievable databases. |
General approaches for readers |
|
transformation ![]() |
When dealing with database oriented SGML/XML instances all known methods of transformation respectively retrieval apply. |
Source driven approach |
|
| source driven |
In the source driven approach, the sequence and selection of the retrieved data is determined by the existence of the data in the instance. As explained in this is highly dependant on the process phase and the generator tool. For this reasons, a source driven approach is useful only if standardizes tasks (like adjusting the different link models etc.) are to be performed. |
Therefore the source driven approach is not adequate in most of the cases. |
Target driven approach |
|
| target driven |
In the target driven approach, in any process step, the desired data structures are built on demand. This provides further independence of the capabilities of other tools in the process as long as they deliver the required information. So the use models for the SGML/XML instances are very flexible: |
DOM, Document Object Model ![]() migration ![]() |
Query language |
query language ![]() |
When using a database oriented DTD, a powerful query language is essential to leverage all the power of this. Especially the following features are required. |
| MetaMorphosis |
The following examples use the query language of MetaMorphosis ( http://www.ovidius.com
) to illustrate how these features are used. The first example (
) shows concatenated queries with nested conditions (the related instance is shown in
. The result of the query is a list of |
Finding invalid parameters |
descendant // consider all descendants [ // for which is true: @f-id-class=="PRM" & // Attribute f-id-class is "PRM" AND child // has a child [ // for which is true: ?prm-char & // GID is "PRM-CHAR" and child[?min].data // child with GID "MIN" > // is greater than one of // the children with GID "TYP" or "MAX" child[?typ | ?max].data ] ] . // for each of those child[?short-name] // use children with GID "SHORT-NAME" . data // for each of those return PCDATA |
Merging Data |
source("sim.sgm", "impl.sgm") // two sources "sim.sgm" as well as "impl.sgm"
.( // for each of those
root, // use root
// as well as path to ...
path("sw-function-spec/sw-function/sw-function-variants/sw-function-variant") ) . // for each of those
// path down to sw-data-dictionary
path("sw-data-dictionary-spec/sw-datadictionaries/sw-data-dictionary") .contents // for each of those return the contents
|
MSR-Instance for parameter set |
<PRMS> <PRM> <LONG-NAME>Long-name</LONG-NAME> <SHORT-NAME>sn</SHORT-NAME> <DESC>Das ist die Beschreibung des Parameters sn</DESC> <PRM-CHAR> <COND><P>Bedingung 1</P></COND> <MIN>min-1</MIN> <TYP>typ-1</TYP> <MAX>max-1</MAX> <REMARK><P>Das ist der Hinweis zur Bedingung 1</P></REMARK> </PRM-CHAR> <PRM-CHAR> <COND><P>Bedingung 2</P></COND> <MIN>min 2</MIN> <TYP>typ-2</TYP> <MAX>max-2</MAX> <UNIT>unit</UNIT> </PRM-CHAR> </PRM> <PRM> <LONG-NAME>Abs-tol-Parameter</LONG-NAME> <SHORT-NAME>atsn</SHORT-NAME> <DESC>Das ist ein abs-tol-parameter</DESC> <PRM-CHAR> <ABS>abs</ABS> <TOL>tol</TOL> <UNIT>unit</UNIT> <REMARK><P>Das ist die Anmerkung zu abstol</P></REMARK> </PRM-CHAR> </PRM> <PRM> <LONG-NAME>Textparameter</LONG-NAME> <SHORT-NAME>txt</SHORT-NAME> <PRM-CHAR> <TEXT>Das ist der text des Parameters</TEXT> </PRM-CHAR> </PRM> </PRMS> |
The desired result is as follows: |
| Bezeichnung | Kürzel | Min | Typ | Max | Abs | Tol | Einh. | Hinw. | |
| Long-name | |||||||||
| - Bedingung 1 | sn | min-1 | typ-1 | max-1 | unit | 1. | |||
| Long-name | |||||||||
| - Bedingung 2 | sn | min-2 | typ-2 | max-2 | unit | ||||
| Abs-tol-Parameter | atsn | abs | tol | ||||||
| Textparameter | txt | Das ist der text des Parameters | |||||||
Query to retrieve a parameter set as a table |
<|st.table|>(*hook:=this) // create the table
// keep hook in variable
{ <|st.title|>node{*hook._GID | *hook.GID}, // make Title
<|st.cols|>node // define columns
{ <|st.col, @width:="4cm"|>node, <|st.col, @width:="2cm"|>node, <|st.col, @width:="1.5cm"|>node, <|st.col, @width:="1.5cm"|>node, <|st.col, @width:="1.5cm"|>node, <|st.col, @width:="1.5cm"|>node, <|st.col, @width:="1.5cm"|>node, <|st.col, @width:="2cm"|>node, <|st.col, @width:="1.5cm"|>node }, <|st.thead|>node // Table head
{ <|st.row|>node { <|st.entry|>node{"Bezeichnung"}, <|st.entry|>node{"Kürzel"}, <|st.entry|>node{"Min."}, <|st.entry|>node{"Typ."}, <|st.entry|>node{"Max."}, <|st.entry|>node{"Abs."}, <|st.entry|>node{"Tol."}, <|st.entry|>node{"Einheit"}, <|st.entry|>node{"Hinw."} } }, <|st.tbody|>*hook // Table body, hooked to parameter-table
{ <|st.row|>child .child[?prm-char] // a table row for each <prm-char>
{(*curent:=this).null // save actual prm-char in variable
<|st.entry, // an entry for title
@hjust:="l"|>node { (*current.parent .child[?long-name] .contents // use cousin <long-name>
| // or
*current.parent.gid), // or GID of table element
<|q.pb|>that.child[?cond] .contents // add <cond>
{" - ",contents} }, <|st.entry|>node {*current.left[?short-name] .contents}, // an entry for <short-name>
(<|st.entry, // spanned entry for <text>
@w:="9cm",@hjust:="l", @hspan:=6|>child[?text]{contents} | // or individual entries for
(<|st.entry|>node{that.child[?min].contents}, // <min>
<|st.entry|>node{that.child[?typ].contents}, // <typ>
<|st.entry|>node{that.child[?max].contents}, // <max>
<|st.entry|>node{that.child[?abs].contents}, // <abs>
<|st.entry|>node{that.child[?tol].contents}, // <tol>
<|st.entry|>node{that.child[?unit].contents} // <unit>
) ), <|st.entry|>node // entry for remark
{ that.child[?remark] .(count(parent.parent // number counter for remark
.left.child[?prm-char] // count grand cousins
.child[?remark] //
, parent .left[?prm-char] // and cousins
.child[?remark] )+1||"." ) |null // leave cell blank if
// there is no remark
} } } } |
Authoring in SGML/XML directly |
|
SGML/XML editor ![]() authoring ![]() |
Obviously it is highly recommended that instances for database oriented DTDs are generated automatically by tools rather than edited manually. But in some circumstances it is required to do manual authoring (e.g. if no generator is available, for debug purposes etc.). If some basic funtionality is available in the SGML editor, direct authoring becomes practicable (but still not ideal). |
Link manager |
|
Link manager |
![]() |
Templates |
|
template ![]() |
Database oriented DTDs tend to be very complex. There are a lot of elements with well defined semantics. On the other hand there are object classes as shown in . To support capturing such complex strictures, a template strategy can be used with the following features. |
An Example of such a link manager is shown in the following figure ( ). |
Inserting and defining templates |
![]() |
Further experience with database oriented DTDs |
|
data model ![]() data type file size ![]() schema ![]() semantics ![]() |
The document base in the MSR consortium |
MSR automotive ![]() |
In the German automotive industry, there is a consortium of car manufacturers and automotive equipment suppliers made up of the companies BMW AG, Daimler Benz AG, Porsche AG, Volkswagen AG, Robert Bosch GmbH, Hella KG Hueck & Co. and Siemens AG. |
![]() |
MSR supports the joint development of car manufacturers and their electronic control system suppliers by enabling process synchronization and proper management of information exchange. |
Within the work of MSR a whole set of related DTDs are developed and used in projects: |
| MSRSYS.DTD |
This database oriented DTD is used to describe an to specify entire control systems with all its mechanical and electrical components. This DTD provides detailed structures for project data, architectures, signals, connections, electrical, properties, mechanical properties. This DTD was successfully used in multiple projects within a big automotive manufacturer and his suppliers. |
| CAN MSRNET.DTD |
This highly database oriented DTD is used to transport information about networks in the vehicle. It allows to specify the information transported on the network, how this information is packed into messages, the network topology etc. This DTD is implemented as import/export facility in the CAN tools from Vector Informatik ( http://www.vector-informatik.de
). This DTD is actually used by another automotive manufacturer to support databases for the next generation of automotive networks. |
ASCET MSRSW.DTD ![]() |
This highly database oriented DTD is used to specify the software forECU s. The examples in this presentation were taken from applications with MSRSW.DTD. This DTD is successfully used in projects across companies as well as across different business units in one company while each partner uses different engineering tools and SGML/XML tools. This DTD is supported in the system design tools ASCET ( http://www.etas.de
) |
| FMEA MSRFMEA.DTD |
This DTD is no yet published since it is in a very experimental status. Its design is totally database oriented. The data model behind it was directly derived from the data model of an existing tool for FMEA (Failure mode and effect analysis) . This data model was generalized to eliminate the tool specifics. |
MSRREP.DTD ![]() |
This presentation oriented DTD is used to write reports and specifications not yet covered by the other DTDs. All the MSR documentation is done using MSRREP.DTD. |
These MSR DTDs while implementing specific data models for their domain have the same basic principles: |
subclassing ![]() |
Natural addressing in MSR |
Natural adressing in MSR |
<companies> <company> <short-name>bosch</short-name> ... <team-members> <team-member> <short-name>wl</short-name> <long-name>Bernhard Weichel</long-name> ... <company> <short-name>foo</short-name> ... <team-members> <team-member> <short-name>wl</short-name> <long-name>Gerhard Walter</long-name> </companies> <modifications> <modifcation> <team-member-ref>bosch/wl</team-member-ref> |
Desires for SGML/XML |
|
While using SGML/XML in applications described above some desires came up which would make things easier: |
context link ![]() namespace ![]() schema ![]() |
Conclusion |
This style of DTDs is possible but not yet in the mainstream focus of SGML/XML which is oriented towards traditional documents. But this situation is going to change. |
It is my intention to contribute to this process and to encourage others to using the potential provided by SGML/XML. |
| Cost-Effective EDI Using XML? | Table of contents | Indexes | Preparing intelligent graphics for interactive catalogs | |||