Entity replacement
David Seibert
dseibert at sqwest.bc.ca
Mon Mar 31 19:52:48 BST 1997
1) PEs aren't supposed to be recognized inside comments (nothing is except the
terminal '*-->'), so they aren't supposed to be expanded. This is also true for
entities in cdata.
2) Expansion of comments inside parameter entities shouldn't matter, since
comments can go anywhere that PEs can. The exact treatment could probably
depend on the application handling the document.
David
----------
From: Peter Murray-Rust
Sent: Sunday, March 30, 1997 3:55 AM
To: xml-dev at ic.ac.uk
Subject: Re: Entity replacement
In message <199703300546.VAA18376 at javalab.uoregon.edu> Sean Russell writes:
> I was told this was a hotly debated topic, and I was wondering what the cur
Probably by me :-), so I'll try to answer.
> rent status was. This is regarding section 4.3 of the XML working draft, 1
> 4-Nov-96.
>
> As regards #2, #3, and #6, which claim that internal entities should be pro
> cessed and replaced by their values by the parser before the data is return
> ed to the application, will this requirement be changed?
The problem as I see it is not that anything requires change, but rather
clarification. The main problem seems to be with parameter entities.
The sort of problem that *I* don't know the answer to is whether a
parameter entity in a comment is expanded or whether a comment in a
parameter entity is expanded and in which order. Another is that PEs can
be nested something like:
<!ENTITY % hairy "<!ENTITY % foo 'bar'>">
but I doubt if I have got this right (I've deleted the WG discussion).
I also know from experience that *authoring* PEs can be quite tricky
(I used this at one stage to mimic directory names in resolving entities
and you have to get the quotations just right). It's therefore even more
important to get the parsing right :-)
The Editorial Review Board has promised enlightenment in the nearish future.
If your are really keen on this have a play with a full sgml parser such as
nsgmls and see how PEs are treated there.
P.
>
> --- SER
>
> xml-dev: A list for W3C XML Developers
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
> To unsubscribe, send to majordomo at ic.ac.uk the following message;
> unsubscribe xml-dev
> List coordinator, Henry Rzepa (rzepa at ic.ac.uk)
>
>
--
Peter Murray-Rust, domestic net connection
Virtual School of Molecular Sciences
http://www.vsms.nottingham.ac.uk/
xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)
xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list