[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: 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@l...
  • Date: Wed, 03 Jul 2024 16:41:22 -0400

Re:  defining correctness for an XML transformation - how?
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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.