This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 13311 - SVG foreignObject error reporting broken
Summary: SVG foreignObject error reporting broken
Status: RESOLVED FIXED
Alias: None
Product: Validator
Classification: Unclassified
Component: Types Registry (show other bugs)
Version: 1.2
Hardware: All All
: P2 normal
Target Milestone: 1.3
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 15:51 UTC by j.chetwynd
Modified: 2011-10-26 18:47 UTC (History)
1 user (show)

See Also:


Attachments

Description j.chetwynd 2011-07-20 15:51:27 UTC
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.)



<?xml version="1.0" encoding="utf-8" standalone="no"?> 
<svg xmlns="http://www.w3.org/2000/svg"
   xmlns:xhtml="http://www.w3.org/1999/xhtml"
   width="100"
   height="100"
> 
	<title>foreignObject</title> 
<foreignObject width="25" height="25" x="70" y="15" />
</svg>
Comment 1 Michael[tm] Smith 2011-10-25 08:54:38 UTC
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 "switch" 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&charset=%28detect+automatically%29&doctype=SVG+1.1&group=0&ss=1
Comment 2 j.chetwynd 2011-10-25 09:16:27 UTC
Mike,

please provide evidence for your assertion,

reading the SVG 1.1 spec says:
'Usually, a 
Comment 3 Michael[tm] Smith 2011-10-26 07:05:27 UTC
(In reply to comment #2)
> 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&charset=%28detect+automatically%29&doctype=SVG+1.1&group=0&ss=1

You will get this error:

[[
 Line 222, Column 62: document type does not allow element "foreignObject" here; assuming missing "switch" 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'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.

> reading the SVG 1.1 spec says:
> 'Usually, a 
Comment 4 j.chetwynd 2011-10-26 07:40:23 UTC
moved to SVG errata:
http://www.w3.org/Bugs/Public/show_bug.cgi?id=14566
Comment 5 Robert Longson 2011-10-26 12:47:43 UTC
(In reply to comment #1)
> 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 "switch" element as its
> parent.
> 

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
Comment 6 Ville Skyttä 2011-10-26 18:47:09 UTC
(In reply to comment #5)

> 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.