W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > May 1997

A uestion and possible problem

From: Gavin Nicol <gtn@eps.inso.com>
Date: Thu, 22 May 1997 11:43:42 -0400
Message-Id: <199705221543.LAA03811@nathaniel.ebt>
To: w3c-sgml-wg@w3.org
The prose and productions for parameter entities is such that I think
it might lead to incompatabilities with SGML. What should the
following fragment produce?

  <!DOCTYPE foo [
  <!ENTITY % pe "'">
  <!ENTITY % pe2 "%pe;%pe;">
  <!ENTITY  baz "baz">
  <!ENTITY  bar '%pe;&#39;&baz;%pe2;'>
  <!ELEMENT foo (#PCDATA)>
  ]>
  <foo>&bar;</foo>

if we add the ommittag specifiers, and parse it with nsgmls, I
get:

  <!DOCTYPE foo [
  <!ENTITY % pe "'">
  <!ENTITY % pe2 "%pe;%pe;">
  <!ENTITY  baz "baz">
  <!ENTITY  bar '%pe;&#39;&baz;%pe2;'>
  <!ELEMENT foo - - (#PCDATA)>
  ]>            ~~~~ <---- added these only
  <foo>&bar;</foo>

=>(FOO
  -''baz''
  )FOO
  C

My parser produces the same results as nsgmls....
Received on Thursday, 22 May 1997 11:44:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:26 UTC