Changeset 85
- Timestamp:
- Thu Jul 28 07:36:58 2005
- Files:
-
- trunk/transolution/filters/sgml2xliff.py (modified) (diff)
- trunk/transolution/filters/filter_settings/rest_xml.ini (modified) (diff)
- trunk/transolution/tmx/__init__.py (modified) (diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
trunk/transolution/filters/sgml2xliff.py
r57 r85 492 492 keep_whitespace = filterconfig['keep_whitespace'] 493 493 494 datatypes = {'.html':'html','.htm':'html','.xml':'xml'} 494 datatypes = {'.html':'html','.htm':'html','.xml':'xml','.sgml':'html','.sgm':'html'} 494 494 495 495 encoding = options.encoding -
trunk/transolution/filters/filter_settings/rest_xml.ini
r84 r85 1 1 [Tags] 2 definition_list_item=External 3 definition=External 4 term=External 5 note=External 6 version=External 2 document=External 3 title=External 4 subtitle=External 5 docinfo=External 6 info=External 7 7 author=External 8 bullet_list=External,Other Attributes:bullet 9 image=External,Other Attributes:alt,uri 8 authors=External 9 organization=External 10 address=External 11 contact=External 12 version=External 13 revision=External 14 status=External 15 date=External 16 copyright=External 17 ; Decoration Elements 18 decoration=External 19 header=External 20 ; Structural Elements 21 section=External 22 topic=External 23 sidebar=External 24 transition=External 25 ; Body Elements 26 paragraph=External 27 compound=External 28 bullet_list=External 29 enumerated_list=External 10 30 list_item=External 11 31 definition_list=External 12 title_reference=Internal 13 docinfo=External 14 topic=External,Other Attributes:classes,ids,names 15 paragraph=External 16 date=External 17 title=External,Other Attributes:refid 18 document=External,Other Attributes:source,names,ids,title 19 section=External,Other Attributes:ids,names 20 substitution_definition=External,Other Attributes:names 32 definition_list_item=External 33 term=External 34 classifier=External 35 definition=External 36 field_list=External 37 field=External 38 field_name=External 39 field_body=External 40 option_list=External 41 option_list_item=External 42 option_group=External 43 option=External 44 option_string=External 45 option_argument=External 46 description=External 47 literal_block=External 48 line_block=External 49 line=External 50 block_quote=External 51 attribution=External 52 doctest_block=External 53 attention=External 54 caution=External 55 danger=External 56 error=External 57 hint=External 58 important=External 59 note=External 60 tip=External 61 warning=External 62 admonition=External 63 footnote=External 64 citation=External 65 label=External 66 rubric=External 67 target=External 68 substitution_definition=External 69 comment=External 70 pending=External 71 figure=External 72 ; Also an inline element. 73 image=Internal,Translatable Attributes:alt 74 caption=External 75 legend=External 76 ;Table elements: table, tgroup, colspec, thead, tbody, row, entry. 77 system_message=External 78 ; Inline Elements 21 79 emphasis=Internal 22 80 strong=Internal 23 reference=Internal,Other Attributes:ids,name,refid 24 DefaultTagStyle=Internal 81 literal=Internal 82 reference=Internal 83 footnote_reference=Internal 84 citation_reference=Internal 85 substitution_reference=Internal 86 title_reference=Internal 87 abbreviation=Internal 88 acronym=Internal 89 superscript=Internal 90 subscript=Internal 91 inline=Internal 92 problematic=Internal 93 generated=Internal 94 25 95 26 96 [Symbols] … … 32 102 33 103 [General] 34 DescriptiveName= ReSTXML104 DescriptiveName=Docutils_ReST_XML 34 104 -
trunk/transolution/tmx/__init__.py
r73 r85 17 17 if doc.nodeName == u'note': 18 18 doc.normalize() 19 self.lang = doc.getAttributeNS(XML_NAMESPACE,' xml:lang')19 self.lang = doc.getAttributeNS(XML_NAMESPACE,'lang') or doc.getAttributeNS(EMPTY_NAMESPACE,'lang') 19 19 self.oencoding = doc.getAttributeNS(EMPTY_NAMESPACE,'o-encoding') 20 20 for str in doc.childNodes: … … 34 34 if doc.nodeName == u'prop': 35 35 doc.normalize() 36 self.lang = doc.getAttributeNS(XML_NAMESPACE,' xml:lang')36 self.lang = doc.getAttributeNS(XML_NAMESPACE,'lang') or doc.getAttributeNS(EMPTY_NAMESPACE,'lang') 36 36 self.oencoding = doc.getAttributeNS(EMPTY_NAMESPACE,'o-encoding') 37 37 self.type = doc.getAttributeNS(EMPTY_NAMESPACE,'type') … … 167 167 else: 168 168 raise Exception, "Invalid TMX Syntax, uexpected element in tuv\n" 169 if not doc.hasAttributeNS(XML_NAMESPACE,'lang'): 170 self.lang = None 171 else: 169 170 if doc.hasAttributeNS(XML_NAMESPACE,'lang'): 172 171 self.lang = doc.getAttributeNS(XML_NAMESPACE,'lang') 172 elif doc.hasAttributeNS(EMPTY_NAMESPACE,'lang'): 173 self.lang = doc.getAttributeNS(EMPTY_NAMESPACE,'lang') 174 else: 175 self.lang = None 173 176 self.oencoding = doc.getAttributeNS(EMPTY_NAMESPACE,'o-encoding') 174 177 else:
