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

Re: Junit-type Framework for XSLT 2 Functions and Tem

Subject: Re: Junit-type Framework for XSLT 2 Functions and Templates?
From: Dave Pawson <dave-list@xxxxxxxxxxxxx>
Date: Mon, 16 May 2005 17:53:13 +0100
junit test type re
On Mon, 2005-05-16 at 09:42 -0500, Eliot Kimber wrote:
> I've started doing work with XSLT 2 and I'm finding that, with the new
> built-in function mechanism in XSLT 2, along with all the new built-in
> functions string processing and what not, that I'm writing more
> XSLT-level functions that I have in the past (in the past I would tend
> to write these functions as Java extension functions).

> I haven't pushed on it, but it would be ideal if there was some way to
> apply the sort of introspection approach that JUnit uses--that is, have
> a transform that processes itself in order to find the test case
> templates and run them, reporting success or failure. But I don't think
> there's any way to do this directly (because there's no evaluate()
> function in standard XSLT.
> 
> Any ideas about how best to proceed?

Definately not 'how best'. Maybe some ideas though.

Given a stylesheet that you import into others,
as a collection of your xslt functions.

Add a template, called if some param = some specific value,
which then proceeds to exercise the functions from that template?

In Python my main is simply there for test purposes.
I can normally do the same in Java for most classes.

Its a case of developing an approach that is generally applicable and
meets your needs?
 How about using a single, given input XML file as the test input data.
  Use that to trigger testing, then its content to exercise the
functions using the test templates? Yes, a little wasteful,
but I like the TDD approach.

regards DaveP. 

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.