Validating application-specific XHTML

I'm using XSLT to produce XHTML, or at least XML that approaches XHTML.

I'd like a way to guarantee the correctness of this markup.

It's not correctness in terms of "-//W3C//DTD XHTML 1.0 Strict//EN" that
I have in mind here. That can be done using the DTD.

It's correctness in terms of the markup specific to my application. To
give an example, it always has a menu that can be modelled in terms of
XSD. And an entry in a search result list always is a <div> containing
certain attributes, certain elements, etc.

In my schema, I'd have, say, a "MenuType", and a "ListType", and an
"ItemType", and so on. The page will be decomposed in terms of types,
as can be done using XML Schema.

The main purpose of this validation to counter-check my hacking away at
the XSLT and to ensure the result doesn't fall out of sync with the CSS.
A sort of regression test.

This may then be used in conjunction with HttpUnit (a Java library to
test web applications) to serve as a quality assurance robot.

As I'm far from being a seasoned XML Schema user, I'd like to hear
any feedback the members of this list might have on the feasability,
shortcomings, blind spots or other aspects of this attempt.

Do you know of any useful libraries or technologies that might support
me in my endeavour?

And probably someone has done this before?

Thank you very much.

Michael Ludwig

Received on Wednesday, 26 November 2008 21:25:30 UTC