Fixing whitespaces for the docbook address.
authorFredrik Unger <fred@tree.se>
Wed, 16 May 2012 10:06:53 +0000 (12:06 +0200)
committerFredrik Unger <fred@tree.se>
Wed, 16 May 2012 10:06:53 +0000 (12:06 +0200)
This is just to properly format the information in the html display.
Could probably be solved elsewhere.

xinclude/contact.py

index 379a33607fff3e10a1da373c831600ab1474f5c8..74d97008c9f993d584073fa2dec02a34e4cad9b9 100755 (executable)
@@ -78,25 +78,25 @@ if 'n' in found.contents.keys():
   if not empty:
     pn += '<personname>'
     if n.prefix != '':
-      pn += '<honorific>'+n.prefix+'</honorific>'
+      pn += '<honorific>'+n.prefix+'</honorific> '
     if n.given != '':
-      pn += '<firstname>'+n.given+'</firstname>'
+      pn += '<firstname>'+n.given+'</firstname> '
     if n.additional != '':
-      pn += '<othername>'+n.additional+'</othername>'
+      pn += '<othername>'+n.additional+'</othername> '
     if n.family != '':
-      pn += '<surname>'+n.family+'</surname>'
+      pn += '<surname>'+n.family+'</surname> '
     if n.suffix != '':
-      pn += '<lineage>'+n.suffix+'</lineage>'
+      pn += '<lineage>'+n.suffix+'</lineage> '
     pn += '</personname>'
 
 ad = ''
 if 'adr' in found.contents.keys():
   for a, t in zip(found.contents['adr'],found.contents['tel']):
-    ad += '\n<address type="'+a.type_param+'">'
+    ad += '\n<address type="'+a.type_param+'"> '
     if a.value.street != '':
       ad += '<street>'+a.value.street+'</street>'
     if a.value.code != '':
-      ad += '<postcode>'+a.value.code+'</postcode>'
+      ad += '<postcode>'+a.value.code+'</postcode> '
     if a.value.city != '':
       ad += '<city>'+a.value.city+'</city>'
     if a.value.country != '':
@@ -120,7 +120,8 @@ if 'org' in found.contents.keys():
 
 url = ''
 if 'url' in found.contents.keys():
-  url += '<uri type="website"><link xlink:href="'+found.url.value+'"/></uri>'
+  url += '<uri type="website"><link xlink:href="'+found.url.value+'"/></uri> '
+
 geo = ''
 #if 'geo' in found.contents.keys():
 #  (lat,lon) = found.geo.value.split(';')