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

[ANN] xchecker

Subject: [ANN] xchecker
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Tue, 5 Jun 2007 12:03:02 +0100
 [ANN] xchecker
As it's quiet today it seems like a good time to announce a little
utility I've been working on  recently that I've called "xchecker" (I
don't really like the name and I came up with it! at least its
slightly better than the original of 'CheckXML'...)

xchecker allows you to:

- test XML (or the XML result of a transform) using XPath, XSLT, XSD,
XQuery, Relax NG in combination.
- embed XPath 2.0 checks (and others) in XML Schema

It can be downloaded from here:

http://xchecker.sf.net/

The relevant topic for this list is to use xchecker as a test
framework for XSLT. To do that you create a Check Config with a
transform subject:

<xchecker xmlns="http://xchecker.sf.net/">

 <transform xml="xml/books.xml" xslt="xslt/books.xslt"
result="result/output.html">
   <check>/html/head/title = 'Books by publisher'</check>
   <check>exists(/html/head/meta)</check>
 </transform>

</xchecker>

xchecker will apply the transform (using Saxon) and then evaluate each
<check> on the result.  In order for a check to pass, xchecker looks
for the following:

- For XML Schema / Relax NG the document should validate
- For XSLT / XQuery checks a single 'true' should be the result
- For XPath a sequence of items can be returned with each one being 'true'

Any non-'true' values are returned as the failure message, so you can
re-write your tests to be a little more informative in the event of a
failure:

<check>if (/html/head/title = 'Books by publisher') then 'true'
             else concat('Unexpected title:', /html/head/title)</check>

...or some other inventive use of XPath.

There's more info on the xchecker home page at http://xchecker.sf.net/

cheers
andrew

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.