CPAN::Forum
OpenOffice-OODoc - Re: Replaceable tokens
| Posted on Tue May 29 13:29:43 2007 by jmgdoc in response to 5247 (See the whole thread of 3) |
| Re: Replaceable tokens |
|
You could use selectElementByContent() or selectElementsByContent(). These methods allow the application to replace the first occurrence (or all the occurrences) of a given string by a given value. Alternatively, these methods can be uses in order to trigger (as a callback function) an application-provided subroutine each time an element matching a given regular expression in found. The subroutine can do anything on the element, and/or its return value (if defined) is used as a replacement for the matching substring. So the user can put some previously agreed, visible tags in the template document, in order to allowing the program to insert any data in the right places. This approach is an efficient substitute to variable fields. selectElementByContent() and selectElementsByContent() are described in the OpenOffice::OODoc::Text manual page. |
| Direct Responses: 5263 | Write a response |
(4)
]