Changeset 3866:e5f6b937b7f1 in livinglogic.python.xist for src/ll/xist/scripts/dtd2xsc.py

Show
Ignore:
Timestamp:
10/09/09 16:19:54 (10 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Refactor parsing interface to support iterative parsing.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/scripts/dtd2xsc.py

    r3857 r3866  
    152152    for entname in ents: 
    153153        if entname not in ("quot", "apos", "gt", "lt", "amp"): 
    154             ent = parsers.parsestring(dtd.resolve_ge(entname).value, parser=parsers.SGMLOPParser()) 
     154            ent = parsers.tree(dtd.resolve_ge(entname).value | parsers.Encoder("utf-8"), parser=parsers.SGMLOP, encoding="utf-8") 
    155155            ns.content.append(xnd.CharRef(entname, codepoint=ord(unicode(ent[0])[0]))) 
    156156