Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[wtp-incubator-dev] XSL Core test plugin created

I've created a test plugin for XSL core with an initial test on the validation.
 
I created an abstract class to help with the testing. It reads an XSL file, runs the validation on it, and then parses the document looking for comment nodes where the comment starts with ERROR or WARN. For each comment node found, it determines whether the validation found a corresponding error or warning at the given comment node parent's line number. It also checks to make sure that no unexpected errors/warnings are found (ones that don't have comment nodes).
 
It means you can write tests just by creating a stylesheet and then putting comments next to elements where you expect and error to occur.
 
Doug.

Back to the top