[xsl] How do you prove that your XSLT programs are correct?

Subject: [xsl] How do you prove that your XSLT programs are correct?
From: "Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Apr 2022 16:08:14 -0000
Hi Folks,

Scenario: You write an XSLT program that takes some input and outputs XML. You
want to be sure that your XSLT program is correct.

As I see it, there are two ways to help ensure the correctness of an XSLT
program :

1. Pepper the XSLT program with assert statements, using xsl:assert.

2. Create a second XSLT program that queries the XML that was generated by the
first XSLT program. This second XSLT program contains a series of XPath
expressions to check various parts of the XML.

Which of those do you use? Or do you use both? Or do you use something else?

How do you ensure the correctness of your XSLT programs?

/Roger

Current Thread