This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
DESCRIPTION: Per http://www.w3.org/TR/SVG11/extend.html, 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" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg xmlns="http://www.w3.org/2000/svg" height="1" width="1" version="1.1"> <foreignObject width="0" height="0"> <newtag1 options="options"> <newtag2 options="options" /> </newtag1> </foreignObject> </svg> CURRENT BEHAVIOR: Four errors. DESIRED BEHAVIOR: No errors. Anything inside a foreignObject block should only be tested for being valid XML, if at all. ADDITIONAL INFORMATION: 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.
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="http://www.w3.org/2000/svg" height="1" width="1" version="1.1"> <switch> <foreignObject width="0" height="0" requiredExtensions="http://www.google.com"> <newtag1 options="options"> <newtag2 options="options" /> </newtag1> </foreignObject> </switch> </svg>