[Bug 13935] xsd 1.1 assertions testing comment nodes

http://www.w3.org/Bugs/Public/show_bug.cgi?id=13935

--- Comment #8 from Michael Kay <mike@saxonica.com> 2011-10-25 14:13:02 UTC ---
The use case for allowing assertions to examine comments and PIs is that
schemas are often there to protect applications from receiving data that they
can't handle, which might include comments and PIs. For example, an application
checking XML documents before they are put on a public web server might well
want to check that the document does, or does not, contain an xml-stylesheet
processing instruction. Equally, before sending a document to a phototypesetter
you might want to check that it does or does not contain a processing
instruction defining the page size.

Another use case: comments and PIs can be used as a covert channel, or more
likely, as a lazy way of adding information to a data flow without changing the
schema. You might want a validation process to prevent this happening.

So there are definitely cases for allowing it. 

I would say, if you want to strip comments and PIs before validating, that's
fine. But in that case they should not be present either in the validated
document (PSVI) or in the infoset presented for validation. Currently if the
infoset contains comments and PIs, they will still be there in the PSVI, and if
that's the case then I think they should be visible to assertions.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 25 October 2011 14:13:05 UTC