Changeset 2632:b4d90755e4ae in livinglogic.python.xist

Show
Ignore:
Timestamp:
01/31/07 11:57:19 (13 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Use the pool specified in the constructor instead of the currently active one from
the stack.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/ll/xist/parsers.py

    r2631 r2632  
    607607        self.saxparser = saxparser 
    608608 
     609        self.pool = (pool if pool is not None else xsc.getpoolstack()[-1]) 
     610 
    609611        # the currently active prefix mapping (will be replaced once xmlns attributes are encountered) 
    610612        if prefixes is None: 
    611613            # make all currently known namespaces available without prefix 
    612614            # (if there are elements with colliding namespace, which one will be used is random (based on dict iteration order) 
    613             self.prefixes = {None: list(set(xsc.nsname(c.xmlns) for c in xsc.getpoolstack()[-1].element_values()))} 
     615            self.prefixes = {None: list(set(xsc.nsname(c.xmlns) for c in self.pool.element_values()))} 
    614616        else: 
    615617            self.prefixes = {} 
     
    625627        self.validate = validate 
    626628        self.encoding = encoding 
    627         self.pool = (pool if pool is not None else xsc.getpoolstack()[-1]) 
    628629 
    629630    def _parseHTML(self, stream, base, sysid, encoding):