<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>12558</bug_id>
          
          <creation_ts>2011-04-26 14:58:51 +0000</creation_ts>
          <short_desc>Support HTML&apos;s full set of character entities in SVG</short_desc>
          <delta_ts>2012-01-10 23:27:29 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>SVG</product>
          <component>DTD</component>
          <version>SVG 2.0</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Test Suite</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Payman Delshad">payman</reporter>
          <assigned_to name="Doug Schepers">schepers</assigned_to>
          <cc>cam</cc>
    
    <cc>chris</cc>
          
          <qa_contact name="SVG Public List">www-svg</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47706</commentid>
    <comment_count>0</comment_count>
    <who name="Payman Delshad">payman</who>
    <bug_when>2011-04-26 14:58:51 +0000</bug_when>
    <thetext>Currently SVG supports only the XML&apos;s predefined entities listed in http://www.w3.org/TR/REC-xml/#sec-predefined-ent

So if one needs to use an entity other than the aforementioned (e.g. &amp;minus;), the solutions are:
1. Using the relevant random mess of hex wrapped in punctuators.
2. Fetching the actual character from a character map (not all entities are readily available using a standard keyboard layout) and specifying encoding=&quot;utf-8&quot;.

I think it makes sense to extend the spec and support HTML&apos;s full set of character entities in SVG.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47757</commentid>
    <comment_count>1</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2011-04-28 03:56:57 +0000</bug_when>
    <thetext>Note that some people replied to the bugmail on www-svg:
http://lists.w3.org/Archives/Public/www-svg/2011Apr/0067.html

One more solution is to have a DTD that defines these entities, and to reference this from your document.

  &lt;!DOCTYPE svg PUBLIC &quot;blahblah&quot; &quot;http://www.w3.org/somewhere/whatever.dtd&quot;&gt;
  &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
    &lt;text y=&quot;20&quot;&gt;a &amp;minus; b&lt;/text&gt;
  &lt;/svg&gt;

It&apos;s not a great long term solution, since we are moving away from DTDs.  If processors don&apos;t recognise the public ID, then the XML processors will have to be operating in validating mode to download the DTD, which many won&apos;t.

If we want to allow documents like

  &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
    &lt;text y=&quot;20&quot;&gt;a &amp;minus; b&lt;/text&gt;
  &lt;/svg&gt;

without the DOCTYPE declaration, then this would require a change at the XML layer level.  Some people think this is the right way to solve this problem, too.

Remember that with SVG in text/html, all of HTML&apos;s entities will work already:

  &lt;!DOCTYPE html&gt;
  &lt;title&gt;hello&lt;/title&gt; 
  &lt;svg&gt;
    &lt;text y=&quot;20&quot;&gt;a &amp;minus; b&lt;/text&gt;
  &lt;/svg&gt;

http://livedom.validator.nu/?%3C!DOCTYPE%20html%3E%0A%3Ctitle%3Ehello%3C%2Ftitle%3E%20%0A%3Csvg%3E%0A%20%20%3Ctext%20y%3D%2220%22%3Ea%20%26minus%3B%20b%3C%2Ftext%3E%0A%3C%2Fsvg%3E</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>62520</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Lilley">chris</who>
    <bug_when>2012-01-10 23:27:29 +0000</bug_when>
    <thetext>Discussed at SVG f2f Manly, Jan 2012. Scope is greater than SVG; we don&apos;t want an SVG specific XML parsing mode or to break existing XML workflows. The HTML entity set is fairly small, with poor Unicode coverage; in general people will need to type the characters needed. 

For specific entities,the internal DTD subset is always available (and may be quite useful for nbsp, znj,zwnj and suchlike non-visible characters).

It is possible that later work (such as XML5) will solve this and if so, SVG could benefit from that in the future.

http://www.w3.org/2012/01/10-svg-irc#T23-26-38</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>