[
Lists Home |
Date Index |
Thread Index
]
David,
>> What do you see as the benefits of giving users this option -- of
>> validating against a schema but ignoring some of what that tells
>> you -- as well?
>
> It would allow W3C Schema to be used in the same way as relax ng or
> other schema languages that do not pollute the infoset: You might
> want to validate the input for the sake of validation, but want the
> stylesheet to work the same way as other occasions when you directly
> transform the document without validating (because you know it is
> already valid, for example).
That wasn't how I interpreted what Evan was saying. He said that the
schema would still supply the same Infoset as it would if the document
were validated against an equivalent DTD -- including default
attribute values and presumably default element values, given the
definition that he gave. So I don't think that non-pollution was *his*
reason.
I do think that the ability to not have the Infoset "polluted" by
augmentations that affect the structure of the node tree is a good
thing. But if I wanted that, I'd probably do the validation outside
the XSLT process, or not at all, rather than as part of the XSLT
process.
It's an interesting, and separate, I think, question as to whether a
flag that indicates whether a document is valid or not should be
available within the stylesheet. From what I can tell, there's no way
of working that out at the moment -- an element that isn't valid looks
just the same as one that is valid against the xs:anyType type.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
|