Hi Folks, I am writing a program that converts an old XML format to a new XML format. In addition to doing the conversion, I also need
to verify the conversion. I have two questions:
1.
What does it mean to “verify the conversion”? Does XSD validation constitute verifying the conversion? My sense is no. My sense is that each
action taken during the conversion must be verified. Do you agree with that?
2.
As I do the conversion, I simultaneously output (to a separate file) metadata for each conversion action. What metadata should I generate to enable the conversion
to be verified? Allow me to explain … My program converts this old format:
<Airport_Name>Boston Logan Airport</Airport_Name> to this new format:
<name>Boston Logan Airport</name> Old format:
<Airport_Elevation>19</Airport_Elevation> New format:
<elevation>19</elevation> Old:
<Airport_Reference_Point_Latitude>N42214660</Airport_Reference_Point_Latitude> New:
<latitude> Not only am I responsible for converting the old format to the new format, I am also required to
verify the conversion. Truthfully, I am unclear what it means to “verify the conversion.” There is an XML Schema for the new format. I could (and certainly
will) validate the file that is generated by my program. Is XSD-validation verifying the conversion? My sense is no. I think that “verify the conversion” means verify each
action taken during the conversion. Do you agree with that? “… verify each
action taken during the conversion.” Here’s my plan of attack: My program will output -- to another, different file -- metadata that describes the actions that were taken during the conversion.
Once again, I am unclear. What metadata is needed to verify an action? The metadata will be machine processed, so I am thinking
that the metadata had better contain predicates (expressions that evaluate to true or false) since they can be easily evaluated by a machine. Here’s the metadata that I am currently generating when I convert Airport_Name to name:
<mapping> The value of <predicate> is a predicate expression (does the value of Airport_Name equal the value of name). Here’s the metadata that I generate when I convert Airport_Elevation to elevation:
<mapping> Here’s the metadata that I generate when I convert Airport_Reference_Point_Latitude to latitude:
<mapping>
substring(Airport_Reference_Point_Latitude,2,2) = latitude/deg and Is that the metadata I should generate to enable the conversion to be verified? /Roger |