Re: Convert one XML format to another and verify the conversion … how to “verify the conversion”?

Norm Tovey-Walsh <[email protected]> Sat, 29 Jun 2024 17:16:15 +0100
Newsgroups gmane.text.xml.devel
Message-ID <[email protected]>
--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

> 1. What does it mean to =E2=80=9Cverify the conversion=E2=80=9D? Does XSD=
 validation constitute verifying the conversion?

At some level, what it means to verify the conversion is a business rule, s=
omething to be negotiated with the person or organization contracting you t=
o do the work. If they don=E2=80=99t know what it means, then it can probab=
ly mean anything you like it to mean.

I think schema validation of the output is part of the story. If they don=
=E2=80=99t have a schema for the old format, beware that it probably contai=
ns markup errors and you probably don=E2=80=99t want to take on the respons=
ibility for fixing those.

If they do have a schema for the old format, validate the old files!

> My sense is no. My sense is that each action taken during the conversion =
must be verified. Do you agree with that?

That might be a good approach, but it=E2=80=99s not one that seems obviousl=
y useful to me. If you generate a bunch of metadata describing each action =
then use some mechanical process to validate that the metadata describes a =
valid transformation, be careful not to implement mechanical validation tha=
t is a direct translation of the original transformation.

What I mean is, if the stylesheet generates a Y for an X and metadata that =
says that Y was generated from X, if you mechanically check that each X tra=
nsformed into a Y is associated with metadata that says the Y was generated=
 from the X, I think there=E2=80=99s some risk that your metadata validatio=
n process is vacuous.

Are there 10 elements in the old/new formats, or 100, or 1000, or 10,000? D=
oes the format include mixed content?

I think I=E2=80=99d be tempted to say that a schema validation of the outpu=
t and a substantial collection of XSpec tests validating that each part of =
the transformation does what=E2=80=99s expected for a representative select=
ion of input values is sufficient. As a starting point for the negotiation,=
 anyway.

                                        Be seeing you,
                                          norm

=2D-
Norm Tovey-Walsh <[email protected]>
https://norm.tovey-walsh.com/

> One of my most productive days was throwing away 1000 lines of
> code.--Ken Thompson

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iHUEARYKAB0WIQSEJUqRvjpp8yLt8uKDEiZHbwv9OwUCZoAzTwAKCRCDEiZHbwv9
O6eDAP4jvNfHC2JiwpAjPIz0aW+WacoxMM03NnnrojniWsk7KgD9F9nXwe/0OUuN
sbWt1fHiPUVAXFxQLgYk1X+MxRZjHwo=
=A2C1
-----END PGP SIGNATURE-----
--=-=-=--