In section 7.6.2 ("Parameter Entities") of the FDP (https://www.freebsd.org/doc/en_US.ISO8859-1/books/fdp-primer/xml-primer-entities.html#xml-primer-parameter-entities) the example given is wrong. The XML standard doesn't allow references to parameter entities within markup declarations in an internal subset of the DTD (see http://www.w3.org/TR/2006/REC-xml11-20060816/#wfc-PEinInternalSubset). Thus, the line 5 in the example (<!ENTITY % param.new "%param.some more %param.text">) is not well-formed XML. (The delimiting semicolons are also missing in both references.) I suggest to replace that example with a more realistic one like <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" [ <!ENTITY % entity "<!ENTITY version '1.0'>"> <!-- use the parameter entity --> %entity; ]> (The attached patch also fixes a typo and adds a sentence about the usefulness of parameter entities.)
Created attachment 163647 [details] Replace example for defining parameter entities
A commit references this bug: Author: sevan Date: Sat Aug 11 15:52:26 UTC 2018 New revision: 52103 URL: https://svnweb.freebsd.org/changeset/doc/52103 Log: Example snippet uses invalid syntax which creates errors when used in a doc. Fix spelling mistake while here. PR: 204893 Submitted by: Andreas Perstinger <andipersti at gmail> Approved by: bcr (mentor) rene Differential Revision: https://reviews.freebsd.org/D16680 Changes: head/en_US.ISO8859-1/books/fdp-primer/xml-primer/chapter.xml
Greeting from Essen Hackathon! Thank you for the patch & appologies it took so long to get it into the tree.