;ò à¼Cc@sÃdZdZdZdklZydklZlZlZWn,e j o dk lZlZlZnXy dk Z Wn e j odk l Z nXydk lZWn#dfd „ƒYZeƒZnXdkZd Zd d d ddddddddddddgZdddgZd„Zed„Zd„Zed „Zeid!ƒZd"„Zd d#„Zd d$„Zd%„Zd&efd'„ƒYZd(efd)„ƒYZd*efd+„ƒYZ defd,„ƒYZ!d efd-„ƒYZ"d efd.„ƒYZ#d efd/„ƒYZ$de$fd0„ƒYZ%de$fd1„ƒYZ&de$fd2„ƒYZ'de$fd3„ƒYZ(defd4„ƒYZ)defd5„ƒYZ*de*fd6„ƒYZ+defd7„ƒYZ,d8efd9„ƒYZ-d:e-fd;„ƒYZ.d<efd=„ƒYZ/d>e/fd?„ƒYZ0d@efdA„ƒYZ1dBefdC„ƒYZ2dDefdE„ƒYZ3dFefdG„ƒYZ4defdH„ƒYZ5dIefdJ„ƒYZ6defdK„ƒYZ7defdL„ƒYZ8dMefdN„ƒYZ9defdO„ƒYZ:dPefdQ„ƒYZ;defdR„ƒYZ<defdS„ƒYZ=dTefdU„ƒYZ>dVefdW„ƒYZ?dXefdY„ƒYZ@dZefd[„ƒYZAd\„ZBeCd]jo eBƒndS(^s& module for conversion from current kupu - (cvs version) to silva (1.2) This transformation tries to stay close to how silva maps its xml to html. There are tests for this transformation in Silva/tests/test_kuputransformation.py please make sure to run them if you change anything here. the notation used for the transformation roughly follows the ideas used with XIST (but has a simpler implementation). Note that we can't use XIST itself as long as silva is running on a Zope version that doesn't allow python2.2 sholger krekel s$Revision: 1.35 $(sNotFound(sElementsTextsFragN(ssilva(sPathsPathcBstZd„ZRS(NcCs|SdS(N(spath2(sselfspath1spath2((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pys__call__.s(s__name__s __module__s__call__(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysPath-sish1sh2sh3sh4sh5sh6sh7spsprestablesimgsulsolsdlsdivsbodystdslicCs<t|dƒ o t|_nt|dƒo |i}n |i}|iƒdjoVt}t|idƒo|ii|_q t|idƒo|ii|_q n_|iƒdjo0t|dƒo|it _ q |it _ n|iƒdjodSnx!|i ƒD]}t ||ƒqW||_dS(s®finds all links and sees if they contain an image if an image inside a link is found the link attr of the image will be set to the href of the link shrefs silva_hrefsasimgsTextN(shasattrscontextsNoneshrefs silva_hrefsoldhrefselsnamesattrsimgslinksfindschildsfix_image_links(selscontextshrefschildsoldhref((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysfix_image_links:s,    cCsé|iƒdjogSn|tjo g}n|}x¦|iƒD]˜}|iƒdjpI|iƒdjo6|idtƒp#|idtƒp|idtƒo#|i|i |ƒƒd|_ nt |||ƒqEW|SdS( s4get all tables and move them to the current positionsTextstablesdivs is_citations toc_depths source_idiN( selsnamestablessNones foundtablessfindschildsgetattrsappendsconvertscontextsshould_be_removedsfix_tables_and_divs(selscontextstabless foundtablesschild((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysfix_tables_and_divsWs   _ cCs|iƒdjoti|i|ƒƒSn_|iƒtjo|i|ƒSn;|iƒtjo|i|ƒSnti|i|ƒƒSdS(s+place p's around elements that require thatsTextN(selsnamessilvaspsconvertscontexts CONTAINERSsTOPLEVEL(selscontext((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pys fix_topleveloscCss|iƒdjp=|iƒtjp*t|dƒo |iƒp t|dƒogSn|tjo g}n|}|iƒ}xä|D]Ü}t|dƒoq‹n|iƒddgjo|iƒddgjoq‹nt |||ƒ|iƒt jo#|iƒdjo|iƒdjo#|i|i|ƒƒd|_q‹|iƒtjoq‹q‹q‹W|SdS( NsTextsdo_not_fix_contentsshould_be_removedsolsulstablesdivi(selsnames CONTAINERSshasattrsdo_not_fix_contentselssNonesfoundelssfindschildrenschildsfind_and_convert_toplevelscontextsTOPLEVELsappendsconvertsshould_be_removed(selscontextselssfoundelsschildschildren((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysfind_and_convert_toplevel|s&S   29  s^([ ]|]*>)*$cCs]t|ƒ}|i|ƒidƒiƒ}ti |ƒ ot i |d|ƒSntƒSdS(s«given a list of elements this either returns a p element if the list contains non-ignorable elements or it will return an empty fragment if it doesn't sUTF-8stypeN( sFragstextbufsfragsconvertscontextsasBytessstrips converteds reg_ignorablessearchssilvaspsptype(stextbufscontextsptypesfrags converted((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pys get_textbuf”s  c Csªg}g}d}xc|D][}|iƒdjo|o,t|iddƒƒ}|ddgjo d}nxÆ|i ƒD]¸} t | |ƒ}t||ƒ}| iƒtjo| iƒtjo|i| i|ƒƒnA|o#|it|||ƒƒg}n|it| |ƒƒ||7}||7}q{W|o#|it|||ƒƒg}qtq|iƒdjo9t|iddƒƒ}|ddgjo d}q±ng}|ot ||ƒ}nt||ƒ}|iƒtjo|iƒtjo|i|i|ƒƒnA|o#|it|||ƒƒg}n|it||ƒƒ||7}||7}qW|o#|it|||ƒƒg}n|SdS(sÏwalk through all inputels recursively if the current element is a container, place p's around all non-toplevel elements, if it's not, move all toplevel elements to the nearest container snormalspsclasssleadN(s fixedreststextbufsptypesinputelsselsnames allowtablessstrsgetattrsfindschildsfix_tables_and_divsscontexts foundtablessfind_and_convert_toplevels foundtoplevels CONTAINERSsTOPLEVELsappendsconverts get_textbufs fix_toplevel( sinputelsscontexts allowtabless foundtablesselsptypestextbufs foundtoplevels fixedrestschild((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pys fix_structureŸsZ  &  &   cCsÚg}xÉ|iƒD]»}|iƒdjo|itdƒƒq|o$|iƒdjo|idt ƒ o|i|i |ƒƒq|iƒdjo|t |||ƒ7}q|i|i |ƒƒqW|SdS(s#extract all text content from a tagsbru sashrefsTextN( sressitemsfindsisnamesappendsTexts allow_indexessgetattrsNonesconvertscontexts extract_texts(sitemscontexts allow_indexessisres((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pys extract_textsÖs .cCspg}x_|D]W}|iƒdddgttjo|t||ƒ7}q |i|i |ƒƒq W|SdS(s*remove all but allowed markup from headerssbsstrongsbrN( s fixedrestsitemssitemsnamesTOPLEVELs CONTAINERSs extract_textsscontextsappendsconvert(sitemsscontextsitems fixedrest((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysfix_allowed_items_in_headingäs$shtmlcBstZd„ZRS(NcCs-d|_|idƒd}|i|ƒSdS(s! forward to the body element ... ssbodyiN(scontextstitlesselfsfindsbodytagsconvert(sselfscontextsbodytag((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertïs (s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pyshtmlîssheadcBstZd„ZRS(NcCs tƒSdS(s ignore N(sFrag(sselfscontext((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertös(s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysheadõssscriptcBstZd„ZRS(NcCs tƒSdS(signoreN(sFrag(sselfscontext((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertûs(s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysscriptúscBstZdZd„ZRS(shtml-body elementcCs£|idtƒ}| o|iƒ}|i}n,|d}|iƒ}|id|iƒ}t ||ƒt ||dƒ}t i t i|ƒt i|ƒƒSdS(sâ contruct a silva_document with id and title either from information found in the html-nodes or from the context (where silva should have filled in title and id as key/value pairs) stagisignoreiN(sselfsfindsh2sh2_tagsrestscontextstitles extract_texts__eq__sfix_image_linkss fix_structures fixedrestssilvassilva_documentsdoc(sselfscontextstitlesh2_tagsrests fixedrest((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconverts     (s__name__s __module__s__doc__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysbodyÿs cBstZd„ZRS(NcCsWt|dƒo|io tƒSnt|iƒ|ƒ}ti |ddƒ}|SdS(Nsshould_be_removedstypesnormal( shasattrsselfsshould_be_removedsFragsfix_allowed_items_in_headingsfindscontexts fixedcontentssilvasheadingsresult(sselfscontextsresults fixedcontent((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvert s    (s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysh1scBstZd„ZRS(NcCsWt|dƒo|io tƒSnt|iƒ|ƒ}ti |ddƒ}|SdS(Nsshould_be_removedstypesnormal( shasattrsselfsshould_be_removedsFragsfix_allowed_items_in_headingsfindscontexts fixedcontentssilvasheadingsresult(sselfscontextsresults fixedcontent((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvert+s    (s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysh2*scBs tZdZd„Zd„ZRS(scCsct|dƒo|io tƒSnt|iƒ|ƒ}ti |ddƒ}|i ||ƒSdS(Nsshould_be_removedstypesnormal( shasattrsselfsshould_be_removedsFragsfix_allowed_items_in_headingsfindscontexts fixedcontentssilvasheadingsresultsprocess_result(sselfscontextsresults fixedcontent((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvert7s    cCs,t|dƒo|ii|ƒn|SdS(Nstoplist_result(shasattrscontextstoplist_resultsappendsresult(sselfsresultscontext((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysprocess_resultBs(s__name__s __module__s__doc__sconvertsprocess_result(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysh35s  cBstZdZd„ZRS(scCsct|dƒo|io tƒSnt|iƒ|ƒ}ti |ddƒ}|i ||ƒSdS(Nsshould_be_removedstypessub( shasattrsselfsshould_be_removedsFragsfix_allowed_items_in_headingsfindscontexts fixedcontentssilvasheadingsresultsprocess_result(sselfscontextsresults fixedcontent((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertJs    (s__name__s __module__s__doc__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysh4Hs cBstZdZd„ZRS(s List heading cCsct|dƒo|io tƒSnt|iƒ|ƒ}ti |ddƒ}|i ||ƒSdS(sú return a normal heading. note that the h5-to-title conversion is done by the html list-tags themselves. Thus h5.convert is only called if there is no list context and therefore converted to a subheading. sshould_be_removedstypessubsubN( shasattrsselfsshould_be_removedsFragsfix_allowed_items_in_headingsfindscontexts fixedcontentssilvasheadingsresultsprocess_result(sselfscontextsresults fixedcontent((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertVs   (s__name__s __module__s__doc__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysh5Ts cBstZd„ZRS(NcCs©t|dƒo|io tƒSnt|iƒ|ƒ}d}t|dƒo#t|i dƒo|i i djo d}nt i |d|ƒ}|i||ƒSdS( sX this only gets called if the user erroronaously used h6 somewhere sshould_be_removeds paragraphsattrs silva_typessubs subparagraphstypeN(shasattrsselfsshould_be_removedsFragsfix_allowed_items_in_headingsfindscontexts fixedcontentseltypesattrs silva_typessilvasheadingsresultsprocess_result(sselfscontextseltypesresults fixedcontent((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertfs 6   (s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysh6escBstZd„ZRS(NcCsct|dƒo|io tƒSnt|iƒ|ƒ}ti |ddƒ}|i ||ƒSdS(sX this only gets called if the user erroronaously used h6 somewhere sshould_be_removedstypes subparagraphN( shasattrsselfsshould_be_removedsFragsfix_allowed_items_in_headingsfindscontexts fixedcontentssilvasheadingsresultsprocess_result(sselfscontextsresults fixedcontent((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertxs   (s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysh7wscBstZdZd„ZRS(sX the html p element can contain nodes which are "standalone" in silva-xml. cCs¬t|dƒo|io tƒSnxy|iƒD]k}|iƒdjoR|iddƒ}|ddgjo d}nt i |i i |ƒd|ƒSq2q2WtƒSdS(Nsshould_be_removedsbrs silva_typesnormalsleadstype(shasattrsselfsshould_be_removedsFragsfindschildsnamesgetattrstypessilvaspscontentsconvertscontext(sselfscontextschildstype((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvert‰s   (s__name__s __module__s__doc__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysp…s cBsStZdZddddfZdZd„Zd„Zd„Zd„Zd „Z RS( s… difficult list conversions. note that the html list constructs are heavily overloaded with respect to their silva source nodes. they may come from nlist,list, their title may be outside the ul/ol tag, there are lots of different types and the silva and html type names are different. this implementation currently is a bit hackish. sdiscscirclessquaresnonecCst|dƒo|io tƒSnt|dƒ}| o|id|_n|i|ƒoNt |dt ƒ}d|_ |i |ƒ}|t j o ||_ qø|` nKt |dt ƒ}d|_ |i|ƒ}|t j o ||_ n|` | o |`n|SdS(Nsshould_be_removedstoplist_resultiÿÿÿÿslisttypesnlistslist(shasattrsselfsshould_be_removedsFragscontextshadctxs resultstackstoplist_resultsis_nlistsgetattrsNones curlisttypeslisttypes convert_nlistsresults convert_list(sselfscontexts curlisttypeshadctxsresult((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvert¦s*         cCs«x8|iiƒD]'}|iƒddgjodSqqW|idƒpM|idƒp=|idƒp-|idƒp|idƒp |id ƒodSnd SdS( Nsolsulis**/imgs**/ps**/tables**/uls**/ols**/prei(sselfscontentscompactsisnamesquery(sselfscontextsi((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysis_nlistÁs `cCsp|iƒ}g}xD|iƒD]6}|iƒdjo|i|i|dƒƒqqWt i |d|ƒSdS(Nsliistype( sselfsget_typestypeslissfindselsnamesappendsconvertscontextssilvaslist(sselfscontextselslisstype((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pys convert_listÏs  ! cCsÝ|iƒ}g}x±|iƒD]£}|iƒdjo|i|i|dƒƒq|iƒddgjoT|o*t i |di |i|ƒƒ|d|D]2}t|idƒƒ}|| jo |} q`q`Wng}x!|D]} | idƒ} t| ƒo÷xà| D]Ø}d}t|dƒo)|iit|idƒƒpd }nd }t|dƒoft|id tƒ}|o!t|ƒd iƒpd }nd }| p |d jo d }q‘n|id||fƒqÐWdi|ƒ}Pq§q§Wtgi} |idƒD]}| |i|dƒƒqÞ~ Œ}ti|dt| ƒd|d|iddƒƒSdS(Nsshould_be_removedistristdsleftsattrsalignsLs1swidthiÿÿÿÿs0s%s:%ss scolumnss column_infostypesclasssplain(shasattrsselfsshould_be_removedsFragscontentsfindsrowsshighestslensrscolsscolinfosrowscellsscellsaligns alignmappingsgetsgetattrsattrswidthsNonesstrsstripsappendsjoins_[1]sconvertscontextssilvastable( sselfscontextscolinfosrowsswidthscolsscellsalignsrs_[1]shighestscellssrow((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertÈsJ    )! B  (s__name__s __module__s alignmappingsconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pystableÄs!strcBstZdd„ZRS(NicCs| o tƒSn|iidƒ}| oMgi}|idƒD]}||i |dƒƒqD~}t i |ƒSnt||dƒ}t i|ƒSdS(Nsthstdi(s parentistablesFragsselfscontentsfinds tableheadingssappends_[1]sesconvertscontextscellsssilvasrows extract_textsstextss row_heading(sselfscontexts parentistables tableheadingss_[1]stextssescells((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertòs <(s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pystrñscBstZdd„ZRS(NicCs?| o tƒSn|iƒ}t||ƒ}ti |ƒSdS(N( s parentisrowsFragsselfsfindsrests fix_structurescontexts fixedrestssilvasfield(sselfscontexts parentisrowsrests fixedrest((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconverts   (s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pystdssthcBstZdd„ZRS(NicCs td‚dS(Ns7 elements should be extracted by the containing row(s ValueError(sselfscontexts parentisrow((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconverts(s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysth scBstZd„Zd„ZRS(NcCsÍt|dƒo|io tƒSnd|_|iioGtt|iiƒƒ}|djo|d8}nti d|ƒSnH|i dt ƒoPt |i |ƒ}titi|iiƒti|iiƒt|ƒgƒSnå|iioÁg}x‰|iiiƒD]u\}}|djo |djoO|i }t|ƒtjot|dƒ}n|iti|d |ƒƒq q Wtit|ƒd |iid |iiƒSntt |i |ƒƒSdS( Nsshould_be_removediis toc_depths is_citations source_idsclasssUTF-8skeysidsclass_(shasattrsselfsshould_be_removedsFragsattrs toc_depthsintsstrssilvastocsgetattrsNones fix_structurescontentscontextscitesauthorssources source_ids__dict__sitemsskeysvaluestypesunicodesappends parametersclass_(sselfscontextskeys toc_depthsvaluescontent((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconverts0    >   $ cCsdSdS(Ni((sself((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysdo_not_fix_content4s(s__name__s __module__sconvertsdo_not_fix_content(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysdivs "cBstZd„ZRS(NcCst|dƒo|io tƒSng}t}x|iƒD]}|i ƒdjol|tj o|i ƒdjo |i t i t dƒƒƒn|i t i|ii|ƒƒƒ|}q>|i ƒdjol|tj o|i ƒdjo |i t it dƒƒƒn|i t i |ii|ƒƒƒ|}q>q>W|tj o|i ƒdjo |i t i t dƒƒƒnt it|ƒƒSdS(Nsshould_be_removedsdts sdd(shasattrsselfsshould_be_removedsFragschildrensNones lastchildsfindschildsnamesappendssilvasddsTextsdtscontentsconvertscontextsdlist(sselfscontextschilds lastchildschildren((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvert8s&    "   "  (s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysdl7ssdtcBstZd„ZRS(NcCsti|ii|ƒƒSdS(N(ssilvasdtsselfscontentsconvertscontext(sselfscontext((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertNs(s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysdtMssddcBstZd„ZRS(NcCsti|ii|ƒƒSdS(N(ssilvasddsselfscontentsconvertscontext(sselfscontext((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertRs(s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysddQssabbrcBstZd„ZRS(NcCs)ti|ii|ƒd|iiƒSdS(Nstitle(ssilvasabbrsselfscontentsconvertscontextsattrstitle(sselfscontext((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvertVs(s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysabbrUssacronymcBstZd„ZRS(NcCs)ti|ii|ƒd|iiƒSdS(Nstitle(ssilvasacronymsselfscontentsconvertscontextsattrstitle(sselfscontext((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysconvert]s(s__name__s __module__sconvert(((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pysacronym\scCs{dkl}dkl}d}d}|ddƒ}|ddƒ}|id |d |ƒd }|i d d ƒ}|GHdS(N(sEditorTransformer(sContextsjFoo

  1. foo
    1. bar

Whatever

foo

  1. dfsfd
  2. sdfdfs
    1. dsklfsdfjsfldk
  3. fsdsdf
surlshttp://debris.demon.nl/foo.htmlseditorskupus targetobjscontextisencodingsUTF-8( stransform.TransformersEditorTransformerstransform.basesContextsdatasctxs transformers to_sourcesnodesasBytessoutput(snodes transformersctxsContextsoutputsdatasEditorTransformer((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pys debug_hookms  s__main__(Ds__doc__s __author__s __version__s zExceptionssNotFoundstransform.basesElementsTextsFrags ImportErrors%Products.SilvaDocument.transform.basessilvastransform.kupusProducts.Silva.manglesPathsresDEBUGsTOPLEVELs CONTAINERSsfix_image_linkssNonesfix_tables_and_divss fix_toplevelsfind_and_convert_toplevelscompiles reg_ignorables get_textbufs fix_structures extract_textssfix_allowed_items_in_headingshtmlsheadsscriptsbodysh1sh2sh3sh4sh5sh6sh7spsulsolslisstrongsbsemsisussupssubsasimgsbrsprestablestrstdsthsdivsdlsdtsddsabbrsacronyms debug_hooks__name__(:semspresh7s fix_structuresh3sh1sh6sfind_and_convert_toplevelsh4s extract_textssTOPLEVELstablesFragssilvasstrongssubsimgsscripts get_textbufstrslisresfix_allowed_items_in_headingshtmlsfix_image_linksssupsPathstds __version__s reg_ignorablesbodysthsfix_tables_and_divssacronymsdds debug_hooksElementsbsabbrsbrsDEBUGs fix_toplevelsdts __author__sasNotFoundsolsdlsisTextsh2sh5spsusdivsheads CONTAINERSsul((sK/mnt/gmirror/ports/www/zope-silva/work/SilvaDocument/transform/kupu/html.pys?sŠ    3    7      cB4 - &