<?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>13311</bug_id>
          
          <creation_ts>2011-07-20 15:51:27 +0000</creation_ts>
          <short_desc>SVG foreignObject error reporting broken</short_desc>
          <delta_ts>2011-10-26 18:47:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>Types Registry</component>
          <version>1.2</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="j.chetwynd">jay</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>schepers</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>51328</commentid>
    <comment_count>0</comment_count>
    <who name="j.chetwynd">jay</who>
    <bug_when>2011-07-20 15:51:27 +0000</bug_when>
    <thetext>http://www.peepo.com/index.svgz

also reduced testcase [1]
transient: http://www.peepo.com/dev.svg
mime-type: image/svg+xml

both pass with direct input

but fail by URI with 1 error:
Line 8, Column 54: SVG element foreignObject not allowed as child of SVG element svg in this context. (Suppressing further errors from this subtree.)



&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; standalone=&quot;no&quot;?&gt; 
&lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot;
   xmlns:xhtml=&quot;http://www.w3.org/1999/xhtml&quot;
   width=&quot;100&quot;
   height=&quot;100&quot;
&gt; 
	&lt;title&gt;foreignObject&lt;/title&gt; 
&lt;foreignObject width=&quot;25&quot; height=&quot;25&quot; x=&quot;70&quot; y=&quot;15&quot; /&gt;
&lt;/svg&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58898</commentid>
    <comment_count>1</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-10-25 08:54:38 +0000</bug_when>
    <thetext>As far I can tell, the SVG 1.1 spec does not allow foreignObject as a direct child of the svg element -- I think it has to have a &quot;switch&quot; element as its parent.

To see, try running your doc the the SVG facet of the W3C validator:

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.peepo.com%2Findex.svgz&amp;charset=%28detect+automatically%29&amp;doctype=SVG+1.1&amp;group=0&amp;ss=1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58903</commentid>
    <comment_count>2</comment_count>
    <who name="j.chetwynd">jay</who>
    <bug_when>2011-10-25 09:16:27 +0000</bug_when>
    <thetext>Mike,

please provide evidence for your assertion,

reading the SVG 1.1 spec says:
&apos;Usually, a </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58976</commentid>
    <comment_count>3</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-10-26 07:05:27 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; please provide evidence for your assertion,

Run it through the SVG validator like I suggested:

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.peepo.com%2Findex.svgz&amp;charset=%28detect+automatically%29&amp;doctype=SVG+1.1&amp;group=0&amp;ss=1

You will get this error:

[[
 Line 222, Column 62: document type does not allow element &quot;foreignObject&quot; here; assuming missing &quot;switch&quot; start-tag
]]

I did not write that validator. It is a completely separate application from the validator.nu backend. And as far as I understand it, it&apos;s using a DTD provided by the SVG working group.

Also, examine that SVG 1.1 relaxng schema provided by the SVG working group. It enforces that same constraint. That is the schema which the validator.nu backend uses. We have not invented or added any additional constraint about this to it in the copy we use for the validator.nu backend.

&gt; reading the SVG 1.1 spec says:
&gt; &apos;Usually, a </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58980</commentid>
    <comment_count>4</comment_count>
    <who name="j.chetwynd">jay</who>
    <bug_when>2011-10-26 07:40:23 +0000</bug_when>
    <thetext>moved to SVG errata:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14566</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58994</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Longson">longsonr</who>
    <bug_when>2011-10-26 12:47:43 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; As far I can tell, the SVG 1.1 spec does not allow foreignObject as a direct
&gt; child of the svg element -- I think it has to have a &quot;switch&quot; element as its
&gt; parent.
&gt; 

This used to be true but the restriction was removed in SVG 1.1 2nd Edition.

http://www.w3.org/TR/2010/WD-SVG11-20100622/changes.html#WholeDocument</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59000</commentid>
    <comment_count>6</comment_count>
    <who name="Ville Skyttä">ville.skytta</who>
    <bug_when>2011-10-26 18:47:09 +0000</bug_when>
    <thetext>(In reply to comment #5)

&gt; This used to be true but the restriction was removed in SVG 1.1 2nd Edition.

validator.w3.org is currently using the original SVG 1.1 DTDs.  They have been already updated to 2nd edition in the development version (available for testing at http://qa-dev.w3.org/wmvs/HEAD/) and will be included in the next validator.w3.org update.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>