do not generate " for " outside of attributes this changes the output

* entities.c: do not generate " for " outside of attributes
* result//*: this changes the output of some tests
Daniel
diff --git a/result/valid/xhtml1.xhtml b/result/valid/xhtml1.xhtml
index 58d20da..907209b 100644
--- a/result/valid/xhtml1.xhtml
+++ b/result/valid/xhtml1.xhtml
@@ -145,8 +145,8 @@
 <p>Publication as a Proposed Recommendation does not imply endorsement
 by the W3C membership.  This is still a draft document and may be
 updated, replaced or obsoleted by other documents at any time. It is
-inappropriate to cite W3C Proposed Recommendation as other than &quot;work
-in progress.&quot;</p>
+inappropriate to cite W3C Proposed Recommendation as other than "work
+in progress."</p>
 
 <p>This document has been produced as part of the <a href="http://www.w3.org/MarkUp/">W3C HTML Activity</a>. The goals of
 the <a href="http://www.w3.org/MarkUp/Group/">HTML Working
@@ -372,18 +372,18 @@
 
 <dt>May</dt>
 
-<dd>With respect to implementations, the word &quot;may&quot; is to be
+<dd>With respect to implementations, the word "may" is to be
 interpreted as an optional feature that is not required in this
-specification but can be provided. With respect to <a href="#docconf">Document Conformance</a>, the word &quot;may&quot; means that
-the optional feature must not be used. The term &quot;optional&quot; has
-the same definition as &quot;may&quot;.</dd>
+specification but can be provided. With respect to <a href="#docconf">Document Conformance</a>, the word "may" means that
+the optional feature must not be used. The term "optional" has
+the same definition as "may".</dd>
 
 <dt>Must</dt>
 
-<dd>In this specification, the word &quot;must&quot; is to be interpreted
+<dd>In this specification, the word "must" is to be interpreted
 as a mandatory requirement on the implementation or on Strictly
 Conforming XHTML Documents, depending upon the context. The term
-&quot;shall&quot; has the same definition as &quot;must&quot;.</dd>
+"shall" has the same definition as "must".</dd>
 
 <dt>Reserved</dt>
 
@@ -393,9 +393,9 @@
 
 <dt>Should</dt>
 
-<dd>With respect to implementations, the word &quot;should&quot; is to be
+<dd>With respect to implementations, the word "should" is to be
 interpreted as an implementation recommendation, but not a
-requirement. With respect to documents, the word &quot;should&quot; is to
+requirement. With respect to documents, the word "should" is to
 be interpreted as recommended programming practice for documents
 and a requirement for Strictly Conforming XHTML Documents.</dd>
 
@@ -549,16 +549,16 @@
 
 <pre>
 &lt;!DOCTYPE html 
-     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
-     &quot;http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd&gt;
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd&gt;
 
 &lt;!DOCTYPE html 
-     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
-     &quot;http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-transitional.dtd&gt;
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-transitional.dtd&gt;
 
 &lt;!DOCTYPE html 
-     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Frameset//EN&quot;
-     &quot;http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-frameset.dtd&gt;
+     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+     "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-frameset.dtd&gt;
 </pre>
 </li>
 </ol>
@@ -567,16 +567,16 @@
 
 <div class="good">
 <pre>
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
 &lt;!DOCTYPE html 
-     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
-    &quot;http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd&quot;&gt;
-&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
+     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/1999/PR-xhtml1-19991210/DTD/xhtml1-strict.dtd"&gt;
+&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
   &lt;head&gt;
     &lt;title&gt;Virtual Library&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
-    &lt;p&gt;Moved to &lt;a href=&quot;http://vlib.org/&quot;&gt;vlib.org&lt;/a&gt;.&lt;/p&gt;
+    &lt;p&gt;Moved to &lt;a href="http://vlib.org/"&gt;vlib.org&lt;/a&gt;.&lt;/p&gt;
   &lt;/body&gt;
 &lt;/html&gt;</pre>
 </div>
@@ -601,13 +601,13 @@
 
 <div class="good">
 <pre>
-&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
+&lt;html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"&gt;
   &lt;head&gt;
     &lt;title&gt;A Math Example&lt;/title&gt;
   &lt;/head&gt;
   &lt;body&gt;
     &lt;p&gt;The following is MathML markup:&lt;/p&gt;
-    &lt;math xmlns=&quot;http://www.w3.org/1998/Math/MathML&quot;&gt;
+    &lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;
       &lt;apply&gt; &lt;log/&gt;
         &lt;logbase&gt;
           &lt;cn&gt; 3 &lt;/cn&gt;
@@ -625,16 +625,16 @@
 
 <div class="good">
 <pre>
-&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
-&lt;!-- initially, the default namespace is &quot;books&quot; --&gt;
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!-- initially, the default namespace is "books" --&gt;
 &lt;book xmlns='urn:loc.gov:books'
-    xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
+    xmlns:isbn='urn:ISBN:0-395-36341-6' xml:lang="en" lang="en"&gt;
   &lt;title&gt;Cheaper by the Dozen&lt;/title&gt;
   &lt;isbn:number&gt;1568491379&lt;/isbn:number&gt;
   &lt;notes&gt;
     &lt;!-- make HTML the default namespace for a hypertext commentary --&gt;
     &lt;p xmlns='http://www.w3.org/1999/xhtml'&gt;
-        This is also available &lt;a href=&quot;http://www.w3.org/&quot;&gt;online&lt;/a&gt;.
+        This is also available &lt;a href="http://www.w3.org/"&gt;online&lt;/a&gt;.
     &lt;/p&gt;
   &lt;/notes&gt;
 &lt;/book&gt;
@@ -829,7 +829,7 @@
 <div class="good">
 <p><strong><em>CORRECT: quoted attribute values</em></strong></p>
 
-<p>&lt;table rows=&quot;3&quot;&gt;</p>
+<p>&lt;table rows="3"&gt;</p>
 </div>
 
 <div class="bad">
@@ -849,7 +849,7 @@
 <div class="good">
 <p><strong><em>CORRECT: unminimized attributes</em></strong></p>
 
-<p>&lt;dl compact=&quot;compact&quot;&gt;</p>
+<p>&lt;dl compact="compact"&gt;</p>
 </div>
 
 <div class="bad">
@@ -921,7 +921,7 @@
 
 <p>SGML gives the writer of a DTD the ability to exclude specific
 elements from being contained within an element. Such
-prohibitions (called &quot;exclusions&quot;) are not possible in XML.</p>
+prohibitions (called "exclusions") are not possible in XML.</p>
 
 <p>For example, the HTML 4.0 Strict DTD forbids the nesting of an
 '<code>a</code>' element within another '<code>a</code>' element
@@ -972,8 +972,8 @@
 has yet to be resolved.</p>
 
 <p>However, XHTML Documents which follow the guidelines set forth
-in <a href="#guidelines">Appendix C</a>, &quot;HTML Compatibility Guidelines&quot; may be
-labeled with the Internet Media Type &quot;text/html&quot;, as they
+in <a href="#guidelines">Appendix C</a>, "HTML Compatibility Guidelines" may be
+labeled with the Internet Media Type "text/html", as they
 are compatible with most HTML browsers. This document
 makes no recommendation about MIME labeling of other
 XHTML documents.</p>
@@ -1153,7 +1153,7 @@
 &gt;</code> of empty elements, e.g. <code class="greenmono">
 &lt;br&#xA0;/&gt;</code>, <code class="greenmono">
 &lt;hr&#xA0;/&gt;</code> and <code class="greenmono">&lt;img
-src=&quot;karen.jpg&quot; alt=&quot;Karen&quot;&#xA0;/&gt;</code>. Also, use the
+src="karen.jpg" alt="Karen"&#xA0;/&gt;</code>. Also, use the
 minimized tag syntax for empty elements, e.g. <code class="greenmono">&lt;br /&gt;</code>, as the alternative syntax <code class="greenmono">&lt;br&gt;&lt;/br&gt;</code> allowed by XML
 gives uncertain results in many existing user agents.</p>
 
@@ -1170,7 +1170,7 @@
 external scripts if your script uses <code>&lt;</code> or <code>
 &amp;</code> or <code>]]&gt;</code> or <code>--</code>. Note that XML parsers
 are permitted to silently remove the contents of comments. Therefore, the historical
-practice of &quot;hiding&quot; scripts and style sheets within comments to make the
+practice of "hiding" scripts and style sheets within comments to make the
 documents backward compatible is likely to not work as expected in XML-based
 implementations.</p>
 
@@ -1191,13 +1191,13 @@
 
 <h2>C.8 Fragment Identifiers</h2>
 <p>In XML, <abbr title="Uniform Resource Identifiers">URIs</abbr> [<a href="#ref-rfc2396">RFC2396</a>] that end with fragment identifiers of the form
-<code>&quot;#foo&quot;</code> do not refer to elements with an attribute
-<code>name=&quot;foo&quot;</code>; rather, they refer to elements with an
+<code>"#foo"</code> do not refer to elements with an attribute
+<code>name="foo"</code>; rather, they refer to elements with an
 attribute defined to be of type <code>ID</code>, e.g., the <code>
 id</code> attribute in HTML 4.0. Many existing HTML clients don't
 support the use of <code>ID</code>-type attributes in this way,
 so identical values may be supplied for both of these attributes to ensure
-maximum forward and backward compatibility (e.g., <code class="greenmono">&lt;a id=&quot;foo&quot; name=&quot;foo&quot;&gt;...&lt;/a&gt;</code>).</p>
+maximum forward and backward compatibility (e.g., <code class="greenmono">&lt;a id="foo" name="foo"&gt;...&lt;/a&gt;</code>).</p>
 
 <p>Further, since the set of
 legal values for attributes of type <code>ID</code> is much smaller than
@@ -1220,10 +1220,10 @@
 <h2>C.9 Character Encoding</h2>
 <p>To specify a character encoding in the document, use both the
 encoding attribute specification on the xml declaration (e.g.
-<code class="greenmono">&lt;?xml version=&quot;1.0&quot;
-encoding=&quot;EUC-JP&quot;?&gt;</code>) and a meta http-equiv statement
-(e.g. <code class="greenmono">&lt;meta http-equiv=&quot;Content-type&quot;
-content='text/html; charset=&quot;EUC-JP&quot;'&#xA0;/&gt;</code>). The
+<code class="greenmono">&lt;?xml version="1.0"
+encoding="EUC-JP"?&gt;</code>) and a meta http-equiv statement
+(e.g. <code class="greenmono">&lt;meta http-equiv="Content-type"
+content='text/html; charset="EUC-JP"'&#xA0;/&gt;</code>). The
 value of the encoding attribute of the xml processing instruction
 takes precedence.</p>
 
@@ -1274,7 +1274,7 @@
 <p>
 When an attribute value contains an ampersand, it must be expressed as a character
 entity reference
-(e.g. &quot;<code>&amp;amp;</code>&quot;). For example, when the
+(e.g. "<code>&amp;amp;</code>"). For example, when the
 <code>href</code> attribute
 of the <code>a</code> element refers to a
 CGI script that takes parameters, it must be expressed as
@@ -1304,14 +1304,14 @@
 in a CSS selector.</li>
 
 <li>Within the XHTML name space, user agents are expected to
-recognize the &quot;id&quot; attribute as an attribute of type ID.
+recognize the "id" attribute as an attribute of type ID.
 Therefore, style sheets should be able to continue using the
-shorthand &quot;#&quot; selector syntax even if the user agent does not read
+shorthand "#" selector syntax even if the user agent does not read
 the DTD.</li>
 
 <li>Within the XHTML name space, user agents are expected to
-recognize the &quot;class&quot; attribute. Therefore, style sheets should be
-able to continue using the shorthand &quot;.&quot; selector syntax.</li>
+recognize the "class" attribute. Therefore, style sheets should be
+able to continue using the shorthand "." selector syntax.</li>
 
 <li>
 CSS defines different conformance rules for HTML and XML documents;
@@ -1363,37 +1363,37 @@
 
 <dt><a name="ref-css2" id="ref-css2"><b>[CSS2]</b></a></dt>
 
-<dd><a href="http://www.w3.org/TR/REC-CSS2">&quot;Cascading Style Sheets, level 2 (CSS2) Specification&quot;</a>, B.
+<dd><a href="http://www.w3.org/TR/REC-CSS2">"Cascading Style Sheets, level 2 (CSS2) Specification"</a>, B.
 Bos, H. W. Lie, C. Lilley, I. Jacobs, 12 May 1998.<br />
 Available at: <a href="http://www.w3.org/TR/REC-CSS2">
 http://www.w3.org/TR/REC-CSS2</a></dd>
 
 <dt><a name="ref-dom" id="ref-dom"><b>[DOM]</b></a></dt>
 
-<dd><a href="http://www.w3.org/TR/REC-DOM-Level-1">&quot;Document Object Model (DOM) Level 1 Specification&quot;</a>, Lauren
+<dd><a href="http://www.w3.org/TR/REC-DOM-Level-1">"Document Object Model (DOM) Level 1 Specification"</a>, Lauren
 Wood <i>et al.</i>, 1 October 1998.<br />
 Available at: <a href="http://www.w3.org/TR/REC-DOM-Level-1">
 http://www.w3.org/TR/REC-DOM-Level-1</a></dd>
 
 <dt><a name="ref-html4" id="ref-html4"><b>[HTML]</b></a></dt>
 
-<dd><a href="http://www.w3.org/TR/1999/PR-html40-19990824">&quot;HTML 4.01 Specification&quot;</a>, D. Raggett, A. Le&#xA0;Hors, I.
+<dd><a href="http://www.w3.org/TR/1999/PR-html40-19990824">"HTML 4.01 Specification"</a>, D. Raggett, A. Le&#xA0;Hors, I.
 Jacobs, 24 August 1999.<br />
 Available at: <a href="http://www.w3.org/TR/1999/PR-html40-19990824">
 http://www.w3.org/TR/1999/PR-html40-19990824</a></dd>
 
 <dt><a name="ref-posix" id="ref-posix"><b>[POSIX.1]</b></a></dt>
 
-<dd>&quot;ISO/IEC 9945-1:1990 Information Technology - Portable
+<dd>"ISO/IEC 9945-1:1990 Information Technology - Portable
 Operating System Interface (POSIX) - Part 1: System Application
-Program Interface (API) [C Language]&quot;, Institute of Electrical
+Program Interface (API) [C Language]", Institute of Electrical
 and Electronics Engineers, Inc, 1990.</dd>
 
 <dt><a name="ref-rfc2046" id="ref-rfc2046"><b>
 [RFC2046]</b></a></dt>
 
-<dd><a href="http://www.ietf.org/rfc/rfc2046.txt">&quot;RFC2046: Multipurpose Internet Mail Extensions (MIME) Part
-Two: Media Types&quot;</a>, N. Freed and N. Borenstein, November
+<dd><a href="http://www.ietf.org/rfc/rfc2046.txt">"RFC2046: Multipurpose Internet Mail Extensions (MIME) Part
+Two: Media Types"</a>, N. Freed and N. Borenstein, November
 1996.<br />
 Available at <a href="http://www.ietf.org/rfc/rfc2046.txt">
 http://www.ietf.org/rfc/rfc2046.txt</a>. Note that this RFC
@@ -1402,15 +1402,15 @@
 <dt><a name="ref-rfc2119" id="ref-rfc2119"><b>
 [RFC2119]</b></a></dt>
 
-<dd><a href="http://www.ietf.org/rfc/rfc2119.txt">&quot;RFC2119: Key words for use in RFCs to Indicate Requirement
-Levels&quot;</a>, S. Bradner, March 1997.<br />
+<dd><a href="http://www.ietf.org/rfc/rfc2119.txt">"RFC2119: Key words for use in RFCs to Indicate Requirement
+Levels"</a>, S. Bradner, March 1997.<br />
 Available at: <a href="http://www.ietf.org/rfc/rfc2119.txt">
 http://www.ietf.org/rfc/rfc2119.txt</a></dd>
 
 <dt><a name="ref-rfc2376" id="ref-rfc2376"><b>
 [RFC2376]</b></a></dt>
 
-<dd><a href="http://www.ietf.org/rfc/rfc2376.txt">&quot;RFC2376: XML Media Types&quot;</a>, E. Whitehead, M. Murata, July
+<dd><a href="http://www.ietf.org/rfc/rfc2376.txt">"RFC2376: XML Media Types"</a>, E. Whitehead, M. Murata, July
 1998.<br />
 Available at: <a href="http://www.ietf.org/rfc/rfc2376.txt">
 http://www.ietf.org/rfc/rfc2376.txt</a></dd>
@@ -1418,8 +1418,8 @@
 <dt><a name="ref-rfc2396" id="ref-rfc2396"><b>
 [RFC2396]</b></a></dt>
 
-<dd><a href="http://www.ietf.org/rfc/rfc2396.txt">&quot;RFC2396: Uniform Resource Identifiers (URI): Generic
-Syntax&quot;</a>, T. Berners-Lee, R. Fielding, L. Masinter, August
+<dd><a href="http://www.ietf.org/rfc/rfc2396.txt">"RFC2396: Uniform Resource Identifiers (URI): Generic
+Syntax"</a>, T. Berners-Lee, R. Fielding, L. Masinter, August
 1998.<br />
 This document updates RFC1738 and RFC1808.<br />
 Available at: <a href="http://www.ietf.org/rfc/rfc2396.txt">
@@ -1427,14 +1427,14 @@
 
 <dt><a name="ref-xml" id="ref-xml"><b>[XML]</b></a></dt>
 
-<dd><a href="http://www.w3.org/TR/REC-xml">&quot;Extensible Markup Language (XML) 1.0 Specification&quot;</a>, T.
+<dd><a href="http://www.w3.org/TR/REC-xml">"Extensible Markup Language (XML) 1.0 Specification"</a>, T.
 Bray, J. Paoli, C. M. Sperberg-McQueen, 10 February 1998.<br />
 Available at: <a href="http://www.w3.org/TR/REC-xml">
 http://www.w3.org/TR/REC-xml</a></dd>
 
 <dt><a name="ref-xmlns" id="ref-xmlns"><b>[XMLNAMES]</b></a></dt>
 
-<dd><a href="http://www.w3.org/TR/REC-xml-names">&quot;Namespaces in XML&quot;</a>, T. Bray, D. Hollander, A. Layman, 14
+<dd><a href="http://www.w3.org/TR/REC-xml-names">"Namespaces in XML"</a>, T. Bray, D. Hollander, A. Layman, 14
 January 1999.<br />
 XML namespaces provide a simple method for qualifying names used
 in XML documents by associating them with namespaces identified