[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
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|