Mercurial > hg > documentViewer
comparison MpdlXmlTextServer.py @ 172:11cb88e7f523
characterNormalization
| author | abukhman |
|---|---|
| date | Tue, 24 Aug 2010 16:05:44 +0200 |
| parents | 77d5ff742bb4 |
| children | d1c13a6ba20d |
comparison
equal
deleted
inserted
replaced
| 171:77d5ff742bb4 | 172:11cb88e7f523 |
|---|---|
| 163 for l in links: | 163 for l in links: |
| 164 hrefNode = l.getAttributeNodeNS(None, u"href") | 164 hrefNode = l.getAttributeNodeNS(None, u"href") |
| 165 if hrefNode: | 165 if hrefNode: |
| 166 href= hrefNode.nodeValue | 166 href= hrefNode.nodeValue |
| 167 if href.startswith('#note-'): | 167 if href.startswith('#note-'): |
| 168 hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s&characterNormalization=%s#note-"%(url,viewMode,tocMode,tocPN,pn,characterNormalization)) | 168 hrefNode.nodeValue = href.replace('#note-',"?url=%s&viewMode=%s&tocMode=%s&tocPN=%s&pn=%s#note-"%(url,viewMode,tocMode,tocPN,pn)) |
| 169 return serializeNode(pagenode) | 169 return serializeNode(pagenode) |
| 170 if mode == "xml": | 170 if mode == "xml": |
| 171 # first div contains text | 171 # first div contains text |
| 172 pagedivs = pagedom.xpath("/div") | 172 pagedivs = pagedom.xpath("/div") |
| 173 if len(pagedivs) > 0: | 173 if len(pagedivs) > 0: |
