![]() |
C H A I M S: Compiling High-level Access Interfaces for Multi-site SoftwareTowards the Science of Component Engineering |
![]() |
| Data manipulation (better term?) versus data transformation
Data transformation takes a set of data values (simple or structured data), and changes them into new values. For instance, two numbers are added together, or given the name, age and adress of a person the horoscope of the person is calculated. Data manipulation does not change values, it just changes to structure of data. For instance, given the three parameters name, age and adress, it might put them together into the one parameter personaldata. Or given several flight-info records, these records might be put into one list. |
In the context of XML we could use parsers and XQL to extract data from one or several XML-documents, and then put them together into one XML document.
1.a) The following XML directly uses the names of data elements
as
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE CHAIMSGentype> <CHAIMSGentype> <DEC param = "PersDat" type="complex" name = "Personal Data"> <DEC type="list" name = "Person's Name"> <DES param="FName" type="string" name="First Name">Dorothea</DES> <DES param ="LName" type="string" name="Last Name">Beringer</DES> <DES type="string" name="Middle Initial">I</DES> <DES type="string" name="Other additional first name">AAAA</DES> <DES type="string" name="Other additional first name">BBBBBB</DES> <DEO name="additional info" type="list" description="my data"> </DEO> </DEC> ........ other data like address </DEC>
</CHAIMSGentype>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE CHAIMSGentype> <CHAIMSGentype> <PersDat type="complex" name = "Personal Data"> <Name type="complex" name = "Person's Name"> <FName type="string" name="First Name">Dorothea</FName> <LName type="string" name="Last Name">Beringer</LName> <IName type="string" name="Middle Initial">I</IName> <AFName type="string" name="Other additional first name">AAAA</AFName> <AFName type="string" name="Other additional first name">BBBBBB</AFName> </Name> ........ other data like address </PersDat> </CHAIMSGentype>
An XML that strictly inforces the separation into different parameters would look like:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE CHAIMSMethodParameters> <CHAIMSMethodParameters> <CHAIMSGentype> <PersDat type="complex" name = "Personal Data"> ....... </PersDat> </CHAIMSGentype> <CHAIMSGentype> <Par2 ....> ...... </Par2> </CHAIMSGentype> <CHAIMSGentype> <Par3 ....> ...... </Par3> </CHAIMSGentype> </CHAIMSMethodParameters>I rather suggest an XML that gets rid of this strict separation:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE CHAIMSMethodParameters> <CHAIMSMethodParameters> <PersDat type="complex" name = "Personal Data"> ....... </PersDat> <Par2 ....> ...... </Par2> <Par3 ....> ...... </Par3> <CHAIMSMethodParameters>In above representation, the only difference between several parameters and on paramater containing the data of all the parameters is a bracketing name-type markup. The following document contains the same data, only this time the method has only one parameter, namely Horoscopedata, instead of the three parameters PersDat, Par2, Par3 as above.
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE CHAIMSMethodParameters> <CHAIMSMethodParameters> <PersDat type="complex" name = "Personal Data"> ....... </PersDat> <Par2 ....> ...... </Par2> <Par3 ....> ...... </Par3> <CHAIMSMethodParameters>
Back
to the CHAIMS homepage