[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: The XML 1.1 Candidate Recommendation is published

  • To: xml-dev@l...
  • Subject: Re: The XML 1.1 Candidate Recommendation is published
  • From: Richard Tobin <richard@c...>
  • Date: Wed, 16 Oct 2002 17:37:26 +0100 (BST)
  • Cc:
  • In-reply-to: <200210161336.JAA05996@m...>
  • Organization: HCRC, University of Edinburgh

doctype xml 1.1
>(Richard Tobin, can you give an example of the trick in question?)

Ok:

 <!DOCTYPE foo [
 <!ENTITY a '<a&#xD;b="c"/>'>
 ]>
 <foo>&a;</foo>

This is well-formed XML 1.0 because the S production includes CR
(#xD).  The replacement text of the entity a contains a CR character,
and it gets parsed as whitespace.  This is of course the exception:
real CR characters in the document are translated on input and are
never matched against the productions.

The natural analogy would be to do the same for NEL (#x85), but this
would complicate life for (at least some) parsers greatly - they would
need a check in many places in order to tokenize differently depending
on the document version.  Since there are no existing well-formed
documents that rely on NEL being in S, and no good use cases for
examples like the one above, we decided it was not worth adding it.

So this will not be well-formed:

 <?xml version="1.1"?>
 <!DOCTYPE foo [
 <!ENTITY a '<a&#x85;b="c"/>'>
 ]>
 <foo>&a;</foo>

Similarly, we didn't add NEL to the characters normalized to space
in attributes.  And again, this only makes a difference if you use
a character reference.  In XML 1.0, this is valid:

 <!DOCTYPE foo [
 <!ELEMENT foo ANY>
 <!ATTLIST foo att NMTOKENS #IMPLIED>
 <!ENTITY b 'foo&#xD;bar'>
 ]>
 <foo att="&b;"/>

but the corresponding document with &#x85; instead of &#xD; will
be invalid in 1.1.

We did consider the suggestion of removing CR from S in 1.1, but apart
from pointlessly breaking backward compatibility it would again mean
that parsers would have to test the version number when tokenizing.

-- Richard

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.