NSStringFromClass(self), domBuilder);
}
+- (void)dealloc {
+ [(id)self->domDocument release];
+ [super dealloc];
+}
+
+/* maintain caches */
+
+- (void)resetPathCaches {
+ [super resetPathCaches];
+ [(id)self->domDocument release]; self->domDocument = nil;
+}
+
+/* getting a DOM representation */
+
- (id<DOMDocument>)domDocument {
/*
Note: this ignores the charset MIME header and will rely on proper
encoding header in the XML.
*/
- return [domBuilder buildFromSource:[self decodedFlatContent]
- systemId:@"Kolab Mail Object"];
+
+ if (self->domDocument != nil)
+ return [(id)self->domDocument isNotNull] ? self->domDocument : nil;
+
+ self->domDocument =
+ [[domBuilder buildFromSource:[self decodedFlatContent]
+ systemId:@"Kolab Mail Object"] retain];
+ return self->domDocument;
}
@end /* UIxKolabPartViewer */
</legend>
<div class="linked_attachment_meta" style="background-color: white;">
+ <!-- TODO: add some reasonable sorting .. -->
<table border="0" class="linked_attachment_meta">
<tr>
<td><var:string label:value="Name"/>:</td>
<td><var:string label:value="Job Title"/>:</td>
<td><var:string value="domDocument./job-title.textValue" /></td>
</tr>
+ <tr>
+ <td><var:string label:value="Nickname"/>:</td>
+ <td><var:string value="domDocument./nick-name.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Spouse"/>:</td>
+ <td><var:string value="domDocument./spouse-name.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Birthday"/>:</td>
+ <td><var:string value="domDocument./birthday.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Anniversary"/>:</td>
+ <td><var:string value="domDocument./anniversary.textValue" /></td>
+ </tr>
+ <tr>
+ <td><var:string label:value="Geo"/>:</td>
+ <td>
+ <!-- use gmaps: http://maps.google.com/maps?q=52.5+13.366 -->
+ <var:string label:value="Latitude"/>
+ <var:string value="domDocument./latitude.textValue" />
+ /
+ <var:string label:value="Longitude"/>
+ <var:string value="domDocument./longitude.textValue" />
+ </td>
+ </tr>
+ </table>
<!--
creation-date
last-modification-date
-nick-name
-spouse-name
-birthday
-anniversary
+
picture
x-logo
+
phone [ type, number]
email [ display-name, smtp-address ]
+
address [ type, street, locality, region, postal-code, country ]
preferred-address (type: home)
-latitude
-longitude
+
x-custom [ @value, @app, @name ]
-->
- </table>
</div>
<!--