Changeset 2983:45b33a90a48c in livinglogic.python.xist for src/ll/xist/scripts/xml2xsc.py

Show
Ignore:
Timestamp:
09/25/07 14:38:20 (12 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
newparser
Message:

For procinst handling in xml2xsc.

ProcInsts? where never added to the xnd module object.

ProcInsts? have a text attribute, so they might appear
in the path: Protect against that.

Files:
1 modified

Legend:

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

    r2982 r2983  
    6565                procinsts[name] = procinst 
    6666                xndnode = procinst 
     67            mod(xndnode) 
    6768        elif "Comment" in type(node).__name__: 
    6869            xndnode = "#comment" 
     
    7374                xndnode = "#text" 
    7475        if len(path) >= 2: 
    75             parententry = elements[getelementname(path[-2])] 
    76             parententry[1].add(xndnode) 
     76            parent = path[-2] 
     77            if "Element" in type(parent).__name__: 
     78                parententry = elements[getelementname(parent)] 
     79                parententry[1].add(xndnode) 
    7780 
    7881    # Put sims info into the element definitions