/usr/lib/python2.6/site-packages/tablib/packages/odf3
NameSizeModeActions
anim.py18720644editdlrm
anim.pyc27240644editdlrm
attrconverters.py682100644editdlrm
attrconverters.pyc573550644editdlrm
chart.py26360644editdlrm
chart.pyc46240644editdlrm
config.py14200644editdlrm
config.pyc13910644editdlrm
dc.py22250644editdlrm
dc.pyc14640644editdlrm
dr3d.py14480644editdlrm
dr3d.pyc15240644editdlrm
draw.py55900644editdlrm
draw.pyc103430644editdlrm
easyliststyle.py37730644editdlrm
easyliststyle.pyc23120644editdlrm
element.py204730755editdlrm
element.pyc222500644editdlrm
elementtypes.py99330755editdlrm
elementtypes.pyc87290644editdlrm
form.py32700644editdlrm
form.pyc63900644editdlrm
grammar.py1933880644editdlrm
grammar.pyc1064580644editdlrm
load.py39630755editdlrm
load.pyc34090644editdlrm
manifest.py13890755editdlrm
manifest.pyc13440644editdlrm
math.py10680644editdlrm
math.pyc4590644editdlrm
meta.py21380644editdlrm
meta.pyc32430644editdlrm
namespaces.py39430644editdlrm
namespaces.pyc33140644editdlrm
number.py31370644editdlrm
number.pyc57430644editdlrm
odf2moinmoin.py181920644editdlrm
odf2moinmoin.pyc187740644editdlrm
odf2xhtml.py650580755editdlrm
odf2xhtml.pyc646200644editdlrm
odfmanifest.py35700755editdlrm
odfmanifest.pyc40720644editdlrm
office.py33460644editdlrm
office.pyc58950644editdlrm
opendocument.py259070644editdlrm
opendocument.pyc255300644editdlrm
presentation.py27160644editdlrm
presentation.pyc45550644editdlrm
script.py11060644editdlrm
script.pyc4840644editdlrm
style.py46720644editdlrm
style.pyc90620644editdlrm
svg.py17900644editdlrm
svg.pyc24060644editdlrm
table.py94080644editdlrm
table.pyc205930644editdlrm
teletype.py51810644editdlrm
teletype.pyc44600644editdlrm
text.py172150644editdlrm
text.pyc391260644editdlrm
thumbnail.py317360755editdlrm
thumbnail.pyc318640644editdlrm
userfield.py53940755editdlrm
userfield.pyc51590644editdlrm
xforms.py12330644editdlrm
xforms.pyc8730644editdlrm
__init__.py00644editdlrm
__init__.pyc1480644editdlrm
Edit: /usr/lib/python2.6/site-packages/tablib/packages/odf3/element.pyc (22250B)
Ñò }DVc @sIddkZddkTddkladdklZddklZhd„Z hd„Z d „Z d „Z d e fd „ƒYZd e fd„ƒYZdeiifd„ƒYZeedddƒeedddƒd„Zdefd„ƒYZdeefd„ƒYZdeefd„ƒYZdefd„ƒYZdS(iÿÿÿÿN(t*i(tnsdict(tgrammar(tAttrConverterscCsžy|idƒ}Wnttfj onX|iddƒ}|iddƒ}|iddƒ}x2t|iƒƒD]\}}|i||ƒ}qxW|S(s  Escape &, <, and > in a string of data. You can escape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. sutf-8t&s&ts>(tdecodet TypeErrortAttributeErrortreplacetlisttitems(tdatatentitiestcharstentity((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt_escape"s cCssd|d in a string of data, then quote it for use as an attribute value. The " character will be escaped as well, if necessary. You can escape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. s s s s t"t's"%s"s"s'%s'(RR (R R((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt _quoteattr6s     cCs<|iddƒ}t|ƒdjo|Sd|dfSdS(s= Split a qualified name into namespace part and local part. t:iiiN(tsplittlentNone(t qualifiedNametfields((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt_nssplitMscCs ti|dtttƒƒƒS(Ntns(Rt setdefaulttstrR(t namespace((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt _nsassignUst IllegalChildcBseZdZRS(sE Complains if you add an element to a parent where it is not allowed (t__name__t __module__t__doc__(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR!Yst IllegalTextcBseZdZRS(sJ Complains if you add text or cdata to an element where it is not allowed (R"R#R$(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR%[stNodecBsqeZdZd Zd Zd Zd„Zd„Zd„Z d„Z d„Z d„Z d„Z d„Zd „ZRS( s% super class for more specific nodes cCs|iotStSdS(se Tells whether this element has any children; text nodes, subelements, whatever. N(t childNodestTruetFalse(tself((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt hasChildNodesds cCs|iS(N(R'(R*((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt_get_childNodesmscCs|io |idSdS(Ni(R'(R*((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt_get_firstChildps cCs|io |idSdS(Niÿÿÿÿ(R'(R*((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt_get_lastChildts cCs|i|ijo td|i|ifƒ‚n|idj o|ii|ƒn|djo|i|ƒn¡y|ii |ƒ}Wn"t j ot i i ƒ‚nX|ii||ƒ||_||_|o'|i|d}||_||_n d|_||_|S(s¡ Inserts the node newChild before the existing child node refChild. If refChild is null, insert newChild at the end of the list of children. s%s cannot be child of %siN(tnodeTypet_child_node_typesR!ttagNamet parentNodeRt removeChildt appendChildR'tindext ValueErrortxmltdomt NotFoundErrtinsertt nextSiblingtpreviousSibling(R*tnewChildtrefChildR5tnode((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt insertBeforexs(        cCs°|i|ijo,x$t|iƒD]}|i|ƒq#W|S|i|ijo td|i|ifƒ‚n|idj o|ii |ƒnt ||ƒd|_ |S(sš Adds the node newChild to the end of the list of children of this node. If the newChild is already in the tree, it is first removed. s<%s> is not allowed in %sN( R/tDOCUMENT_FRAGMENT_NODEttupleR'R4R0R!R1R2RR3t _append_childR;(R*R=tc((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR4“s   cCs·y|ii|ƒWn"tj otiiƒ‚nX|idj o|i|i_n|idj o|i|i_nd|_|_|i o|i i ƒnd|_ |S(sa Removes the child node indicated by oldChild from the list of children, and returns it. N( R'tremoveR6R7R8R9R;RR<t ownerDocumentt clear_cachesR2(R*toldChild((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR3¤s  cCs:g}x$|iD]}|it|ƒƒqWdi|ƒS(Nt(R'tappendRtjoin(R*tvalRD((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt__str__¶s  cCs:g}x$|iD]}|it|ƒƒqWdi|ƒS(NRI(R'RJRRK(R*RLRD((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt __unicode__¼s  N(R"R#R$RR2R;R<R+R,R-R.R@R4R3RMRN(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR&^s       t firstChildtdocsFirst child node, or None.t lastChildsLast child node, or None.cCsV|i}|o(|d}||id<||id((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR@çs cCstii|idƒ‚dS(s Raises an error s nodes do not have childrenN(R7R8R9R1(R*RH((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR3ìs cCstii|idƒ‚dS(s Raises an error s nodes do not have childrenN(R7R8RUR1(R*R=RH((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt replaceChildñs N(R"R#R$Rt attributest EmptyNodeListR'RORQR-R.R4R+R@R3RV(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRTÏs       tTextcBs;eZeiZdZd„Zd„Zd„Zd„Z RS(RYcCs ||_dS(N(R (R*R ((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt__init__úscCs |iiƒS(N(R tencode(R*((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRMýscCs|iS(N(R (R*((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRNscCs7|io)|itt|iƒidƒƒƒndS(s Write XML in UTF-8 sutf-8N(R twriteRRR[(R*tleveltf((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyttoXmls ( R"R#R&t TEXT_NODER/R1RZRMRNR_(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRYös     t CDATASectioncBseZeiZd„ZRS(cCs2|io$|id|iiddƒƒndS(sÔ Generate XML output of the node. If the text contains "]]>", then escape it by going out of CDATA mode (]]>), then write the string and then go into CDATA mode again. (s]]>s]]>]]>(RRdthasattrtAssertionErrorRFR'Rtallowed_childrentgett get_nsprefixR1taddTexttaddCDATAtallowed_attributestlowerR RWR R t setAttributet setAttrNStkeystrequired_attributest getAttrNSR (R*RWttexttcdataRdt qattributest check_grammartargstprefixt allowed_attrst_[1]tat allowed_argstattrtvaluetargtrequiredtr((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRZ%sN        ;   # !cCs9x2ttiƒƒD]\}}||jo|SqWdS(s• Odfpy maintains a list of known namespaces. In some cases a prefix is used, and we need to know which namespace it resolves to. N(R RR R(R*RyRtp((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt get_knownnsOs   cCsH|djo d}nt|ƒ}||ijo||i| is not allowed in <%s>N( RhRRdR!R1R4R†RFtrebuild_caches(R*R‡Rw((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt addElementjs$   cCsY|o*|itijotd|iƒ‚n%|djo|it|ƒƒndS(sd Adds text to an element Setting check_grammar=False turns off grammar checking s$The <%s> element does not allow textRIN(RdRt allows_textR%R1R4RY(R*RtRw((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRkws cCsH|o*|itijotd|iƒ‚n|it|ƒƒdS(se Adds CDATA to an element Setting check_grammar=False turns off grammar checking s$The <%s> element does not allow textN(RdRR‹R%R1R4Ra(R*RuRw((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRlsc Csý|iƒ}|djoIt|ƒtdƒjo |\}}|i||ƒqùtdƒ‚n˜g}|D]#}||diƒiddƒqm~}|o*||jotd||ifƒ‚n|i|ƒ} |i|| d|| dƒdS( s Removes an attribute by name. s;Unable to add simple attribute - use (namespace, localpart)iReRIs#Attribute %s is not allowed in <%s>iN(( RmRttypet removeAttrNSR RnR R1R5( R*R~RwRzRyt localnameR{R|R}ti((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pytremoveAttributeŠs   7c Cs|iƒ}|djoLt|ƒtdƒjo#|\}}|i|||ƒqÿtdƒ‚n›g}|D]#}||diƒiddƒqp~} |o*|| jotd||ifƒ‚n| i|ƒ} |i|| d|| d|ƒdS( sƒ Add an attribute to the element This is sort of a convenience method. All attributes in ODF have namespaces. The library knows what attributes are legal and then allows the user to provide the attribute as a keyword argument and the library will add the correct namespace. Must overwrite, If attribute already exists. s;Unable to add simple attribute - use (namespace, localpart)iReRIs#Attribute %s is not allowed in <%s>iN(( RmRRŒRpR RnR R1R5( R*R~RRwRzRyRŽR{R|R}R((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRo›s   7cCsP|iƒ}|i|ƒ}tƒ}|i||f||ƒ|i||fN(R\R1R R…R RRRWRqRjRR[R'R_(R*R]R^RRyRdR‡((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR_äs   1Q   cCse|i|ijo|i|ƒnx:|iD]/}|itijo|i||ƒ}q.q.W|S(N(RdRJR'R/R&t ELEMENT_NODEt_getElementsByObj(R*tobjt accumulatorte((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyR™õs cCs|dtƒ}|i|gƒS(sO Gets elements based on the type, which is function from text.py, draw.py etc. Rw(R)R™(R*R‡Rš((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pytgetElementsByTypeýscCs|dtƒ}|i|ijS(s? This is a check to see if the object is an instance of a type Rw(R)Rd(R*R‡Rš((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyt isInstanceOfsN(#R"R#R$R&R˜R/R…tPROCESSING_INSTRUCTION_NODEt COMMENT_NODER`RbtENTITY_REFERENCE_NODER0RR(RZR„RjRmR†RŠRkRlRRoRpRsRR“R–R—R_R™RRž(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyRcs:  *            (txml.domR7txml.dom.minicompatR…RRIRtattrconvertersRRRRR t ExceptionR!R%R8R&t defpropertyRCtobjectRTRYRaRc(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/odf3/element.pyts$      d '