A uestion and possible problem

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