W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2008

RE: Validating application-specific XHTML

From: Michael Kay <mike@saxonica.com>
Date: Wed, 26 Nov 2008 21:48:58 -0000
To: "'Michael Ludwig'" <mlu@as-guides.com>, <xmlschema-dev@w3.org>
Message-ID: <582450114D134CD2B2ADF441D65977D0@Sealion>

Sounds like you need to use schema-aware XSLT. If you use that to the full,
it can spot many cases of generating invalid output at stylesheet compile
time, and the rest at run-time. But it's not entirely clear to me from your
post what constraints you are trying to validate against and whether they
can all be expressed in a schema.

Michael Kay

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Michael Ludwig
> Sent: 26 November 2008 17:57
> To: xmlschema-dev@w3.org
> Subject: 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:49:40 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:48 UTC