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 25143 - SVG 1.1 validation: Don't foreignObject tag contents
Summary: SVG 1.1 validation: Don't foreignObject tag contents
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: Parser (show other bugs)
Version: HEAD
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2014-03-24 22:23 UTC by trlkly
Modified: 2014-03-24 23:10 UTC (History)
0 users

See Also:


Description trlkly 2014-03-24 22:23:51 UTC

Per, the contents of a foreignObject element are "assumed to be from a different namespace." They thus should not be checked against the SVG DTD. Yet, if you attempt to validate a file of the following structure, every tag inside the foreignObject returns errors, one for the tag itself and one for each included attribute.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "">
<svg xmlns="" height="1" width="1" version="1.1">
  <foreignObject width="0" height="0">
    <newtag1 options="options">
      <newtag2 options="options" />

Four errors.

No errors. Anything inside a foreignObject block should only be tested for being valid XML, if at all. 


I tried to put this on the mailing list before filing a bug, to make sure I'm not misunderstanding something, but it kept saying it was coming from my private personal email address instead of this public one.
Comment 1 trlkly 2014-03-24 23:10:23 UTC
Changing the structure to use switch statements as follows does not help, although it does limit the errors to one, refusing to continue parsing after encountering the newtag1 branch.

<svg xmlns="" height="1" width="1" version="1.1">
  <foreignObject width="0" height="0"
    <newtag1 options="options">
      <newtag2 options="options" />