mò `eØGc@s…dZdZdZdZdklZlZdkTdkTdee e fd„ƒYZ de fd „ƒYZ d e fd „ƒYZd S( s2$Id: content.py 988 2008-03-12 18:22:48Z sa3ruby $sOSam Ruby and Mark Pilgrim s$Revision: 988 $s,Copyright (c) 2002 Sam Ruby and Mark Pilgrim(s validatorBases namespaces(t*t textConstructcBsftZdklZdkZd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z RS( N(smime_recCs ddgS(Nutypeusrc(Nutype(Nusrc(tNone(tself((t@/web/script/rubys/feedvalidator.org/src/feedvalidator/content.pytgetExpectedAttrNamesscCsdS(N((R((RtnormalizeWhitespacescCsd|iidƒdjoG|ithd|ii<d|i<dd<d|i<ƒƒndS(Nt/iÿÿÿÿtparenttelementtattrttypetvalue(RR tfindtlogtInvalidTextTypeRtname(R((Rtmaptypesc CsÂti|ƒ|iidƒo d|_nPd|_|iƒtjo3|i djo#|i t hd|i <ƒƒn|iidƒo^|ii dƒ|_|ip;|i t hd|ii <d|i <dd<ƒƒqín|iƒ|iidƒo¢|iitƒ|ii dƒ|_ti|d td hdd<ƒd|_|iidƒp;|i thd|ii <d|i <dd<ƒƒq¬n|idd d gjo|iidƒ on¬|io^|ii|iƒ oG|i thd|ii <d|i <dd<d |i<ƒƒnD|i thd|ii <d|i <dd<d |i<ƒƒ|ip,|i thd|i <dd<ƒƒndS(Ntsrctttextt atom_summaryR R RR t errorClasst extraParamsthtmltxhtmlR sxml:lang(Nssrc(Nstype(Nstype(Nssrc(Nssrc(Nstype(Nssrc(tnonhtmltstartRtattrsthas_keyRR t getFeedTypet TYPE_RSS2RRtDuplicateDescriptionSemanticstgetValuet AttrNotBlankRRtchildrentappendtTrueR trfc2396tvalidatetInvalidURIAttributetMissingTypeAttrtmime_retmatchtInvalidMIMETypetValidMIMEAttributetxmlLangtMissingDCLanguage(R((Rt prevalidates2   ## ? " ?-!GC cCsk|iddgjo8|idjoti|tƒqti|tƒn³|iidƒdjoÄ|iidƒp#|iidƒp|iidƒ oŠdk }y9|i |i ƒ|_ |iidƒo d |_nWq+|i t hd |ii<d |i<d |i <ƒƒq+Xn|id jp|iidƒo¢|i|i ƒ|iidƒo{|i id ƒdjo^|iidƒ oJ|i thd |ii<d |i<d |i <d|i<ƒƒqìqnti|tƒ|i o\t|iƒdjoF|iidƒ o2|i thd |ii<d |i<ƒƒndS(NRRRiÿÿÿÿs+xmls/xmlstext/s/htmlRRR R ss(S B#-R5cCs|ioti|ƒndS(N(RR#t validatorBasettextOK(R((RR=[s cCsõx~|D]v}dt|ƒjo djnp |djo?dkl}|i|hd|ii<d|i<ƒƒqqW|i djoP|i ƒoC|i i ƒ o2|it hd|ii<d|i<ƒƒnt i||ƒdS(Ni€iŸu�(s BadCharactersRR R(tstringtctordt validatorst BadCharactersRRRRR tstripR tMissingXhtmlDivR<t characters(RR>R?RB((RRE^s1 6.2cCs“|idjoS|iidƒp|iidƒ o,|ithd|i<d|<ƒƒn|idjo¨|djoC|iiƒ o2|ithd|i i<d|i<ƒƒq|dgjoD|it hd|i i<d|i<dd <d |<ƒƒqn|id jo¯|d joJ|it hd|i i<d|i<d |i<d |i<ƒƒqÚ|dgjoD|it hd|i i<d|i<dd <d |<ƒƒqÚn|i idƒoO|i idƒdjo2|ithd|i i<d|i<ƒƒq<n|djo|djo tƒ}n tƒ}|ii|ƒ|i|||ƒdS(NRs+xmls/xmlRR tdivshttp://www.w3.org/1999/xhtmltmessagesunexpected namespaceR sapplication/xhtml+xmlRR tmodetescaped(Nsmode(Nsmode(RR R3RtUndefinedElementRR RCRDRtqnametNotHtmlR9RRRR!t NotEscapedtdiveaterthandlerteaterR#R$tpush(RRRKRRO((RtstartElementNSgs(7,2H JH6  ( t__name__t __module__RAR*treRRRR0R'R=RERR(((RR s      #   RNcBs5tZd„Zd„Zd„Zd„Zd„ZRS(NcCsti|ƒt|_dS(N(RPt__init__RtFalsetmixed(R((RRV…s cCsdS(N((R((RR=ˆscCsti||ƒdS(N(R<RERR>(RR>((RREŠscCs |p)|ithdd<d|<ƒƒnÎ|djo|tijo)|ithdd<d|<ƒƒn1|tijo |it hd|<ƒƒnxT|i ƒD] \}}| oŒ|tijo||d joOxht|i||fƒƒD]+}|ithd |<d|<ƒƒqWqS|ithd |<ƒƒq³q³Wn£|d jo‰|tijo |it hd|<ƒƒnxb|i ƒD]D\}}| o0|tijo |ithd |<ƒƒq¥q¥Wn |d jo‰|tijo |it hd|<ƒƒnxÌ|i ƒD]D\}}| o0|tijo |ithd |<ƒƒq;q;Wnwti|ƒof|id jo8|ithd|i<dt|d|<ƒƒn|itƒ||ƒdSnt|_ti||||ƒdS(NRs xhtml:divR shttp://www.w3.org/1999/xhtmlRGsNon-XHTML elementR ttagtstyleR shttp://www.w3.org/2000/svgs"http://www.w3.org/1998/Math/MathMLtmetadatat:( RKRRtMissingNamespaceRt HTMLValidatorthtmltagsRLtacceptable_elementst SecurityRiskRtgetNamestnsR tacceptable_attributest checkStyletgetR tDangerousStyleAttrtSecurityRiskAttrt svg_elementstsvg_attributestmathml_elementstmathml_attributest namespacesRRJRQRPR%RXRR(RRRKRRcR R ((RRRŒsH) )   -(   (   (8 cCs'|ip|ii|i7_ndS(N(RRXRR (R((RR'¯s (RSRTRVR=RERRR'(((RRN„s     #tcontentcBstZd„ZRS(NcCs[|idjoG|ithd|ii<d|i<dd<d|i<ƒƒndS(Nsmultipart/alternativeRR R R R (RR RR,RR(R((RR³s(RSRTR(((RRn²sN(t__doc__t __author__t __version__t __copyright__tbaseR<RmRAtloggingR&RRRPRNRn(RrRRpRnRNRmRqR<((Rt?sw.