Re: [xsl] How do you ensure that data is not altered/corrupted in a transformation?

Subject: Re: [xsl] How do you ensure that data is not altered/corrupted in a transformation?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 May 2023 09:31:32 -0000
On 5/19/2023 10:37 AM, Roger L Costello costello@xxxxxxxxx wrote:
In certain domains loss of life may occur if data is altered/corrupted in
any way.

Suppose you write an XSLT program which transforms this:


<alt>12000 feet</alt>

to this:

<altitude>12000 feet</altitude>

How do you ensure that the data -- 12000 feet -- was not altered/corrupted
in the transformation?


What does altered refer to? If you make sure the XSLT copies the `alt` element's content to the result `altitude` element you can do that with e.g.

<xsl:template match="alt">

B <altitude>{.}</altitude>

</xsl:template>


What does "corrupted" refer to? That file IO fails to properly create the transformation result? Do you expect to catch such errors with XSLT?

For (processing/validation) pipelines (outside the system failure scope)
you can use XProc or XSpec, I would think, to test the value in some
result (step) is the same as the value in (some/the) input step.

Current Thread