Subject: Re: Crazy idea
From: Francis Norton <francis@xxxxxxxxxxx>
Date: Thu, 09 Sep 1999 08:09:16 +0100
|
Oren Ben-Kiki wrote:
>
> Mulling over the namespace/XSchema issue, I came up with the following
> notion. I wonder if it has ever been suggested, and what its chances are.
>
I've been thinking alog the same lines, following a suggestion by Rick
Jelliffe (see http://www.redrice.com/ci/generatingXslValidators.html for
my note and http://www.ascc.net/xml/en/utf-8/XSLvalidation.html for
his).
>
> Objections:
>
[I largely agree with your list of objections and counter arguments]
...
>
> - People would abuse it.
>
> That is, people would create "schema" sheets which would transform the
> document to something completely different then what you started with. There
> are several answers to this, ranging from "so what? anything good can be
> abused" to "define a strict subset of XSLT which can't be abused". My
> suggested compromise is to require that a "Schema" XSLT stylesheet should
> only emit "fixpoint" documents - that is, applying it a second time must be
> a no-op. This is trivially testable and satisfies most objections as to the
> difference between "validation/completion" and "transformation".
>
Are you thinking of [1] a standard schema-validation stylesheet, an
engine operating on documents and 'xslt-schemas', or [2] that people
will provide "self-processing" schemas which don't require any engine
except an XSLT processor?
If [1] then the standard schema-validation stylesheet can be defined to
return nothing but a status. If [2] then it all depends, I guess, on how
the 'xslt-validator' gets called.
I would add another objection - I'm not sure that XSLT is powerful
enough to do the data-validation (as opposed to the structure
validation) unless/until it gets regular expressions.
On a less fundamental note, I'd also like the ability to define XSLT
functions in XSLT, which would make programs very
much more concise and legible.
>
> How about it?
>
Well I'm up for it.
I'm working (hacking actually - paying the penalty for not having
designed my algorithm correctly in the first place) on a structure
validator that can be called from any XSLT stylesheet with two
arguments, a content pattern and some element data.
Francis.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|