[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] defining correctness for an XML transformation - how?
- From: "Liam R. E. Quin" <liam@fromoldbooks.org>
- To: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, xml-dev@lists.xml.org
- Date: Wed, 03 Jul 2024 16:41:22 -0400
On Wed, 2024-07-03 at 07:40 -0600, C. M. Sperberg-McQueen wrote:
>
> What language would one need in order to formulate plausible pre- and
> post-conditions on XML transformations, or more generally on
> functionsor procedures that operate on XDM instances?
XSLT maybe.
Unfortunately there are two difficult aspects here and i am not sure
either has been (or can be?) solved.
First, ensuring that a Turing-complete computation will terminate is of
course the halting problem (unlike the problem of getting Bodin the Dog
to stop pulling during walks, which is the Halter problem). Since a
computation that does not terminate is (1) possible and (2) presumably
not correct, i think we have to abandon the idea of a complete
solution.
> Asking for a friend.
You forgot the photograph of a banana.
An incomplete solution might be useful. Consider Schematron. (no, not
Voltron, Schematron).
A related problem might be Ontology Matching, but this, too, is not
satisfactorily solved.
I wrote that there are two difficult aspects; the second is that the
notion of correctness can often be tied to domain-level interpretation
- that is, to the relationship between the digital and the physical,
the imaginary and the imaged. To make it harder, our transformations
operate in a world of speculation: we specify not what shall be but
what might be:
<xsl:template match="chapter/section/glossary/title">
So we cannot easily mark our input to say, There isn’t a glossary here,
but there might have been. Nor can we easily identify the place in the
output where a transformed glossary does not appear.
For a specific instance we could mark what was and what that became,
and that's a pretty useful thing to do. We could then write (or
generate) Schematron tests, for example to ask whether all of the text
in the input made its way exactly once to the output. Which is not
always what is wanted, of course, which goes back to defining
correctness.
If you can come up with anything better than Schematron, for any
pragmatically useful definition of better :), i’m for sure very
interested. “Validates against a target schema” is at least part-way,
too.
XSpec goes a little further down this road, and might provide a
starting-point? But again it’s in the world of XPath and XSLT.
It’s too hot here today and even Bodin is pooled in a panting heap,
quiescent. I can’t even measure whether he was a good dog while we were
at the dentist - unlike the Corgi, Bodin can get onto the desk and eat
things like chequebooks or phone cards, but if he did, he left behind
no evidence. He’s smart enough to hide the crumbs.
liam
--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/
XSL/XQuery/Web/Text Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations: http://www.fromoldbooks.org
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]