diff --git a/en_US.ISO8859-1/books/fdp-primer/sgml-primer/chapter.sgml b/en_US.ISO8859-1/books/fdp-primer/sgml-primer/chapter.sgml index b126788a0b..01bd6cd622 100644 --- a/en_US.ISO8859-1/books/fdp-primer/sgml-primer/chapter.sgml +++ b/en_US.ISO8859-1/books/fdp-primer/sgml-primer/chapter.sgml @@ -946,14 +946,18 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished document. You can also use general entities to enter characters that you - could not otherwise include in an SGML document. For example, < - and & cannot normally appear in an SGML document. When the SGML - parser sees the < symbol it assumes that a tag (either a start tag - or an end tag) is about to appear, and when it sees the & symbol + could not otherwise include in an SGML document. For example, + < and & cannot + normally appear in an SGML document. When the SGML + parser sees the < + symbol it assumes that a tag (either a start tag + or an end tag) is about to appear, and when it sees the + & symbol it assumes the next text will be the name of an entity. - Fortunately, you can use the two general entities &lt; and - &amp; whenever you need to include one or other of these. + Fortunately, you can use the two general entities + &lt; and &amp; + whenever you need to include one or other of these. A general entity can only be defined within an SGML context. Typically, this is done immediately after the DOCTYPE @@ -1369,22 +1373,28 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished CDATA is for Character Data. If the parser is in this content model then it is expecting to see - characters, and characters only. In this model the < and & + characters, and characters only. In this model the + < and & symbols lose their special status, and will be treated as ordinary characters. RCDATA is for Entity references and character data If the parser is in this content model then it is expecting to see characters and entities. - < loses its special status, but & will still be treated as + < loses its special status, but + & will still be treated as starting the beginning of a general entity. This is particularly useful if you are including some verbatim - text that contains lots of < and & characters. While you - could go through the text ensuring that every < is converted to a - &lt; and every & is converted to a &amp;, it can be + text that contains lots of < and + & characters. While you + could go through the text ensuring that every + < is converted to a + &lt; and every & + is converted to a &amp;, it can be easier to mark the section as only containing CDATA. When the SGML - parser encounters this it will ignore the < and & symbols + parser encounters this it will ignore the + < and & symbols embedded in the content. @@ -1402,7 +1412,8 @@ nsgmls:example.sgml:6:8:E: end tag for "HEAD" which is not finished Using a CDATA marked section <para>Here is an example of how you would include some text - that contained many &lt; and &amp; symbols. The sample + that contained many <literal>&lt;</literal> + and <literal>&amp;</literal> symbols. The sample text is a fragment of HTML. The surrounding text (<para> and <programlisting>) are from DocBook.</para>