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

Re: [Summary #2] Why is Encoding Metadata (e.g. encoding="UTF-

  • From: "Eric Bréchemier" <eric.brechemier@g...>
  • To: "Costello, Roger L." <costello@m...>
  • Date: Fri, 21 Sep 2007 18:30:48 +0200

Re:  [Summary #2] Why is Encoding Metadata (e.g. encoding="UTF-
"Whitespace may preceed an XML declaration, so an XML parser will
parse through the whitespace bytes until it arrives at the start of
the XML declaration."

This (whitespace before XML declaration) is not allowed by the EBNF
productions defining a well-formed XML Document:
http://www.w3.org/TR/REC-xml/#sec-well-formed

--

"By this point an XML parser will know the endianness and byte-size
being used by the document's encoding. So it can parse the XML
declaration!"

It think there is a fast shortcut here, as shown in examples by
Philippe Poulard and Richard Tobin.

As a side note, you do not mention how the parser figures out whether
there is an XML declaration or not.
--

"Since XML support only a finite set of character encodings the
problem is tractable."
XML _processors_ may support only a finite set of character encodings.

The XML recommendation does not restrict the possible encodings, but
mentions [1] that:
"It is RECOMMENDED that character encodings registered (as charsets)
with the Internet Assigned Numbers Authority [IANA-CHARSETS], other
than those just listed, be referred to using their registered names;
other encodings SHOULD use names starting with an "x-" prefix."
and
"processors are, of course, not required to support all
IANA-registered encodings."

[1] http://www.w3.org/TR/REC-xml/#charencoding
[2] [IANA-CHARSETS] http://www.iana.org/assignments/character-sets


--
some typos
"may preceed an XML declaration"
"may be found in the XML 1.0 Recomendation"

Regards,

Eric Bréchemier


On 9/21/07, Costello, Roger L. <costello@m...> wrote:
> Hi Folks,
>
> Excellent discussion!  Thank you!
>
> Here is the updated document, based on my understanding of all your
> comments:
>
> http://www.xfront.com/specifying-encoding/
>
> As always, please let me know of any errors or unclear parts.
>
> /Roger
>
> _______________________________________________________________________
>
> XML-DEV is a publicly archived, unmoderated list hosted by OASIS
> to support XML implementation and development. To minimize
> spam in the archives, you must subscribe before posting.
>
> [Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
> Or unsubscribe: xml-dev-unsubscribe@l...
> subscribe: xml-dev-subscribe@l...
> List archive: http://lists.xml.org/archives/xml-dev/
> List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
>
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.