Total Knowledge Projects Jobs Clientele Contact

Text Handling

Personal tools
From Total Knowledge
(Difference between revisions)
Jump to: navigation, search
(Add implementation details about rendering of rich text in UU)
Current revision (19:55, 19 May 2011) (view source)
(Implementation: Add a note on media UMOs)
 
* Only allowed XHTML tags are used
* Only allowed XHTML tags are used
* All media references are valid
* All media references are valid
-
* All formulas are compileable
+
* All formulae are compileable
Sets of allowed tags and MM objects will depend on kind of text
Sets of allowed tags and MM objects will depend on kind of text
* get root element of the text to render (does not have to be complete document)
* get root element of the text to render (does not have to be complete document)
* call <code>uu::util::parseText()</code>, pass in the root and the renderer
* call <code>uu::util::parseText()</code>, pass in the root and the renderer
-
* <code>parseText</code> will go through all tags, applying the renderer as needed
+
* <code>parseText</code> will go through all tags, applying the renderer as needed and will throw an exception if invalid tag is encountered.
-
and will throw an exception if invalid tag is encountered.
+
* <code>parseText</code> will serialize resulting XML tree into a string and return it.
* <code>parseText</code> will serialize resulting XML tree into a string and return it.
 +
 +
Embedded media objects (images, flash, etc.) are stored as separate UMOs, and thus must be linked to the UMO being rendered, in order to be used. These objects are referenced in the text through base ID of the embedded UMO. When UMO is published, umo_to_parent_umo ID is supplemented in the text. This way all the normal rules for versioning and relations between UMO versions apply, and at the same time the need to keep track of media UMOs is reduced and the procedure is simplified.

Current revision