Built-in GlyphData.xml doesn’t pass DTD validation

As of both the latest stable, 2.6.4 (1286), and cutting edge, 2.6.5 (1306):

lxml.etree.XMLSyntaxError: No declaration for attribute sortNameOld of element glyph, line 7205, column 456

This undefined sortNameOld seems to be the only offender.

Test code:

from lxml import etree
parser = etree.XMLParser(dtd_validation=True)
built_in_glyph_data = etree.parse(

I can remove this. Thanks.
Have you tried the file in https://github.com/schriftgestalt/GlyphsInfo?

Uh, I thought the schriftgestalt/GlyphsInfo project is only meant to provide a stripped down version of the built-in GlyphData.xml? Doesn’t seem relevant to what I’m doing… I’m generating a customized GlyphData.xml from an in-house glyph database, and just want to read the DTD from the latest built-in GlyphData.xml to get the latest format.

I have fixed this. The cocoa xml parser doesn’t seem to care about the DTD so I early check the conformance. For now, make a bare bone file manually.

1 Like