W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2009

RE: comments and PIs in XML Schema

From: Michael Kay <mike@saxonica.com>
Date: Sat, 25 Apr 2009 10:02:00 +0100
To: "'Mukul Gandhi'" <gandhi.mukul@gmail.com>, <xmlschema-dev@w3.org>
Message-ID: <B7DC7C9012604A16A50DBFC569C3F99D@Sealion>

I think one way of looking at this is that if you want formal constraints on
where comments and PIs appear, then you shouldn't be using comments and PIs,
you should be using elements.

It's true, of course, that comments and PIs are open to abuse. I've been
known to put data in PIs because the schema wouldn't let me put it anywhere
else. But I think one of the reasons XML works well is that it allows you to
use dirty tricks when you're stuck - systems need to have a bit of
flexibility built in.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: xmlschema-dev-request@w3.org 
> [mailto:xmlschema-dev-request@w3.org] On Behalf Of Mukul Gandhi
> Sent: 25 April 2009 03:41
> To: xmlschema-dev@w3.org
> Subject: comments and PIs in XML Schema
> 
> Hi all,
>   I couldn't see provisions in the XML Schema languages (both 1.0 and
> 1.1) to have XML "comments" and "processing instructions" as 
> part of the validation requirements.
> 
> Why are "comments" and PIs not considered XML Schema 
> validation primitives?
> 
> Please pardon me, if I am missing something.
> 
> --
> Regards,
> Mukul Gandhi
> 
Received on Saturday, 25 April 2009 09:02:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:15:11 GMT