Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Embedded SVG in HTML5 has Validation Warnings
Embedded SVG in HTML5 has Validation Warnings [message #902105] Wed, 15 August 2012 16:56
Sergei G is currently offline Sergei G
Messages: 5
Registered: June 2012
Junior Member
Here is a sample HTML5 with SVG content and it generates validation warnings.
I had to adjust URL's in this post, because I am blocked to use external URLs. I have replaced :// with -##

<!DOCTYPE html>
<html>
<head>
<title>SVG</title>
<meta charset="utf-8" />
</head>
<body>
<h2>HTML5 SVG Circle</h2>
<svg id="svgelem" height="200" xmlns="http-##www.w3.org/2000/svg">
    <circle id="redcircle" cx="50" cy="50" r="50" fill="red" />
</svg>
</body>
</html>


Warnings: Undefined attribute name xmlns. Unknown tag g, polygon.

Compare it with XHTML, which does not generate validation errors:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html 
      PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
      "http-##www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http-##www.w3.org/1999/xhtml" 
      xmlns:svg="http-##www.w3.org/2000/svg"
      xmlns:xlink="http-##www.w3.org/1999/xlink">
  <head>
    <title>SVG embedded inline in XHTML</title>
  </head>
  <body>

    <h1>SVG embedded inline in XHTML</h1>

    <svg:svg version="1.1" baseProfile="full" width="300px" height="200px">
      <svg:circle cx="150px" cy="100px" r="50px" fill="#ff0000" stroke="#000000" stroke-width="5px"/>
    </svg:svg>

  </body>
</html>
Previous Topic:Adding XSD to Catalog, key type difference
Next Topic:MultiPageEditor - working with many files, marking MPE as dirty throw exception
Goto Forum:
  


Current Time: Tue Jul 29 19:06:11 EDT 2014

Powered by FUDForum. Page generated in 0.01522 seconds