[
Lists Home |
Date Index |
Thread Index
]
"Brett Kail" <junkaddr@hotmail.com> wrote:
| I'm generally unfamiliar with SGML, and I was unable to find a spec
| online.
Sadly, ISO copyright is in the way. There is this:
http://crism.maden.org/consulting/pub/sgmldefs.html
but it's missing the text of the standard.
| Where can I find one that discusses the PE rules of SGML?
Offhand I don't know of any, sorry. You could try the search facility in
the Cover Pages.
|>| <!ENEITY %pe " ">
|>| <!ELEMENT%pe;e ANY>
|>
|> Permissible in SGML - maintains integral character of relevant parameters.
|> Probably okay in XML.
|
| This one (and others you mark as "probably ok") make sense to me as well,
| but is there anywhere we can go to get an authoritative answer?
I'd go with Section 4.4.8 "Included as PE" in the XML spec, especially
this:
: [...] the intent is to constrain the replacement text of parameter
: entities to contain an integral number of grammatical tokens in the DTD
and argue that zero is also an "integral number" :-)
Basically, PEs are a text substitution mechanism, so anything that doesn't
result in invalid text in the appropriate parsing context should be okay.
|> Note that the integral token restriction doesn't apply when using PErefs
|> to paste together the content of replacement text in what is effectively a
|> single parameter in a PE declaration. (In fact, that is how you might
|> "construct" tokens if needed.)
|
| Do you mean like so?
|
| <!ENTITY % begin '<!ENTITY % value "str'>
| <!ENTITY % end 'ing">'>
| <!ENTITY % all '%begin;%end;'>
| %all;
Yes. This "works". As Bob Foster points out, %begin;%end; doesn't.
|