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

Re: What does it mean to lexically distinguish significantand

  • From: John Cowan <johnwcowan@gmail.com>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Fri, 15 Sep 2017 18:59:32 -0400

Re:  What does it mean to lexically distinguish significantand

On Wed, Sep 13, 2017 at 7:45 AM, Michael Kay <mike@saxonica.com> wrote:

What I meant by the phrase is that when you see


there is nothing within the document itself to tell you whether the whitespace is significant; you typically need external information (e.g. a schema or DTD, or just outside knowledge) to know.

Well, if xml:space="preserve" is present you know it's significant, and if both non-whitespace children and element children are present, the betting is that it's significant.  Otherwise, you're right, you don't know.

My utility DTDcrunch reduces an external DTD subset to just enough declarations, suitable for use as an internal subset, to provide the infoset effects of the DTD (as opposed to validation information).  Specifically:

1) An internal general entity declaration is preserved.

2) A non-CTEXT attribute declaration is preserved.

3) A CTEXT attribute declaration with a default or fixed value is preserved.

4) An element declaration with element-only content is preserved in the reduced form <!ELEMENT foo (foo)>.

The resulting document has the same infoset as the original when parsed with a non-validating parser.

John Cowan          http://vrici.lojban.org/~cowan        cowan@ccil.org
Man has no body distinct from his soul, for that called body is a portion
of the soul discerned by the five senses, the chief inlets of the soul
in this age.  --William Blake

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


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.
First Name
Last Name
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.