Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: comments and PIs in XML Schema

From: "G. Ken Holman" <gkholman@----------------.--->
To: xmlschema-dev@--.---
Date: 4/24/2009 9:04:00 PM
At 2009-04-25 08:10 +0530, Mukul Gandhi wrote:
>   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?

I call these two constructs "XML annotations" though that is not an 
official term for them, only a convenient pigeon hole or label for them.

Schema languages constrain XML vocabularies and their 
content.  Comments and processing instructions are not part of an XML 
vocabulary, only elements and attributes and their content.

Annotations can be placed anywhere they are allowed in an XML 
document without violating the constraints on an XML vocabulary.

You won't see constraints on comments and PIs in DTD, W3C Schema, 
RELAX-NG or NVDL semantics.  I doubt any of the prototypical or 
bespoke XML vocabulary validation languages would constrain these 
either.  I suppose someone could dream up some validation semantics 
to constrain them, and implement them with something like 
Schematron.  But that would be more like a "document writing 
constraint" rather than an XML vocabulary constraint.

>Please pardon me, if I am missing something.

http://www.w3.org/TR/xml/#syntax
   - Text consists of intermingled character data and markup

http://www.w3.org/TR/xml/#sec-comments
   - They are not part of the document's character data; an XML
     processor MAY, but need not, make it possible for an application
     to retrieve the text of comments

http://www.w3.org/TR/xml/#sec-pi
   - PIs are not part of the document's character data, but MUST
     be passed through to the application.

I hope this helps.

. . . . . . . . . Ken

--
XQuery/XSLT/XSL-FO hands-on training - Los Angeles, USA 2009-06-08
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@C...
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/x/
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/x/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


From gandhi.mukul@g... Sat Apr 25 05:24:36 2009
Received: from bart.w3.org ([128.30.52.63])
	


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent