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 19:32:51 +0000
To: www-xml-schema-comments@w3.org
Message-Id: <E1RImjz-0003KS-D3@jessica.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=13935

--- Comment #9 from Pete Cordell <petexmldev@codalogic.com> 2011-10-25 19:32:50 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.

I have _some_ sympathy for this, although I don't feel schema validation is the
only way to achieve this result if it's important to you(/one).

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

I have very little sympathy for this.  People who attempt this sort of thing
should suffer all they deserve!  Further, the flip side of acknowledging that
you can prevent comments that contain covert data, is that you're implicitly
opening up the can of worms that says you can validate that your comments have
valid covert data!

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

Sounds reasonable to me.  But how you formulate that in suitable words for the
spec, or test cases I don't know.

-- 
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 19:32:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 25 October 2011 19:32:54 GMT