0

The Eclipse IDE validators complain about fontawesome-webfont.svg - which is part of the project http://fortawesome.github.io/

The content of element type "font-face" is incomplete, it must match "((font-face-src,(desc|title|metadata))|((desc|title|metadata)+,font-face-src,((desc|title|metadata))?))".

(EDIT: clarifying question)

  1. Is the XML schema really being violated?
  2. Is there an error in fontawesome-webfont.svg? How could you fix fontawesome-webfont.svg?
  3. Is there an issue with with the Eclipse validator?

fontawesome-webfont.svg:

<?xml version="1.0" standalone="no"?>
<!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">
<metadata></metadata>
<defs>
<font id="fontawesomeregular" horiz-adv-x="1536" >
<font-face units-per-em="1792" ascent="1536" descent="-256" />
<missing-glyph horiz-adv-x="448" />
<glyph unicode=" "  horiz-adv-x="448" />

 ...

<glyph unicode="&#xf500;" horiz-adv-x="1792" />
</font>
</defs></svg> 
Tom Carchrae
  • 6,398
  • 2
  • 37
  • 36

2 Answers2

1

This is the validator telling you your file is invalid. The message means that the contents of your font-face element have to match the sequence it relates. It can not be EMPTY. Try letting Eclipse generate a new XML file from the same DTD and you'll see what it needs to look like.

nitind
  • 19,089
  • 4
  • 34
  • 43
  • thanks - it is not my file in particular, it is from the font-awesome project: https://github.com/FortAwesome/Font-Awesome/blob/fc72d6388997a2ac14ce9335567fe0f3b4120123/src/assets/font-awesome/font/fontawesome-webfont.svg – Tom Carchrae Jul 15 '13 at 23:48
  • the question is still open though - which is wrong, the DTD definition or font-awesome? http://www.w3.org/TR/SVG/fonts.html – Tom Carchrae Jul 16 '13 at 00:13
0

This is a problem related with the validator I guess, since the definition is right, if you check the definition of defs Element it allows an font element.

Also from mozilla sources:

Permitted content:

Any number of the following elements, in any order:

  • Animation elements
  • Descriptive elements
  • Shape elements
  • Structural elements
  • Gradient elements

and

<a>, <altglyphdef>, <clippath>, <color-profile>, <cursor>, <filter>, <font>, <font-face>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view>

Normative document SVG 1.1 (2nd Edition)

So you can add to ignore in eclipse validator, please check this topic: How to exclude specific folders or files from validation in Eclipse?

Community
  • 1
  • 1
Paulo Fidalgo
  • 21,709
  • 7
  • 99
  • 115