[
Lists Home |
Date Index |
Thread Index
]
> I agree that regexes are not enough, but
supplemented with ranges and precision
> for suitable types, they do almost the
whole job. Integrity checks are important,
> but I haven't seen anything yet that is
really satisfying in this respect except
> full Schematron processing.
>
>
whenever I think about what kind of types
xml requires I think first of tree
descriptions, which is what xpath provides,
and then regex for strings where xpath is
weak.
I don't think of it necessarily as document
validation but like is possible with
Schematron partial validation relative to
the instances of a type.
let us suppose that one had a Schematron-
like language with assertions etc. that have
ids.
one declares a type date with a list of
regexes for allowable date values.
one declares a type MeetingDate which is an
element name "Date" that inherits from date
for its text content and has two required
xpaths, a parent element Meeting, and a
following sibling | preceding sibling Time.
the idea behind having ids for assertions is
that one could have a syntax for removing
assertions from an inheriting type and
replacing them with others.
With a regex extension function for xslt I
think this would be reasonably easy to
implement in the same way that skeleton1-
5.xsl is used to do a sample Schematron
implementation. There would undoubtedly turn
out to be a lot of other things needed
later, but I sort of think its nicer to find
out what people want instead of second
guessing them. Although it seems that a lot
of people are supposedly clamoring for the
xsdl integration in xpath 2.0, xslt 2.0 that
everyone here is groaning over... I would
just like to find some of these xsd
integration proponents (not sitting on a W3C
working group) but out in the xml wilds.
Anyway I just figured I'd remark on this
idea that's been kicking around in my head
for a while, mainly cause you mentioned
Schematron.
|