0

It seems XML doesn’t accept values in range from�toinside attributes but allow#x7fto¡. It trigger that kind of error in my parser :

parser error : xmlParseCharRef: invalid xmlChar value 18
<glyph glyph-name="uni00000F" unicode="&#x12;"
                                       ^

I also tried opening the file in several web browsers and got similar error messages for the same lines.
I couldn’t find in the standard the purpose of this behaviour. It seems however that escaped Unicode control characters are allowed.

So does someone know the reason of that design ?
Is there an alternative for defining and using those glyphs outside an svg file ?

user2284570
  • 2,891
  • 3
  • 26
  • 74
  • 1
    Questions that ask why a standard was defined a particular way are usually very difficult to answer, even if you have access to the minutes of the meetings (or indeed, even if you were present at the meetings). For XML, Tim Bray's Annotated XML Specification gives a lot of the rationale: see http://www.xml.com/axml/testaxml.htm. But on a quick reading, I don't find an answer to this one. So any answer you get is probably after the-event rationalisation rather than a true record of what was in the minds of the committee. – Michael Kay Aug 31 '15 at 08:18
  • @MichaelKay : the reason of that design was partially answered elsewhere on this site. The problem is ꜱᴠɢ uses XML which forbid control characters. Of course there is altGlyph elements but there are not usable outside ꜱᴠɢ. So the purpose of this question is more how to find an alternative for avoiding that restriction. I can’t use ꜱꜰɴᴛ based fonts due to several limitations of the ꜱꜰɴᴛ format. – user2284570 Aug 31 '15 at 08:24
  • Sigh. Yes, I should have learnt by now that when people ask "why does the language have this restriction", they don't usually want to know the reason for the restriction, they want to get around the restriction... – Michael Kay Sep 01 '15 at 08:23

0 Answers0