W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2011

[Bug 13935] xsd 1.1 assertions testing comment nodes

From: <bugzilla@jessica.w3.org>
Date: Tue, 25 Oct 2011 14:13:03 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1RIhkV-0007Ul-7K@jessica.w3.org>

--- 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

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:11 UTC