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

Re: How do you ensure that data is not altered/corrupt

Subject: Re: How do you ensure that data is not altered/corrupted in a transformation?
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 May 2023 14:58:53 -0000
Re:  How do you ensure that data is not altered/corrupt
> On 19 May 2023, at 15:46, Eliot Kimber eliot.kimber@xxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> Another option is to simply not use XSLT, which has a higher risk of
unintended side effects that are hard to detect by code inspection.
>
> Which XQuery is less convenient for writing transforms, its procedural
nature makes it much easier to write code that can be more completely
inspected for correctness. Dito Python, Javascript, etc.
>


I'm rather baffled by those remarks. The more declarative a language is,
surely, the more amenable it is to static analysis?

It's true that the rule-based paradigm for XSLT makes the code difficult to
analyse using data-flow approaches that are increasingly used on procedural
languages. However, if you know the schema for the input and output documents,
you can make a lot of inferences about whether the stylesheet will produce a
valid instance of the output schema given a valid instance of the input
schema.

But of course that doesn't prove you're producing correct output. That can
only be done by testing.

Michael Kay
Saxonica

Current Thread

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
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.