Hello,
as the title already implies, I'm trying to merge XML formatted text ("insert") into a similarly ISO19115-1 formatted root template ("template"- see attachments) in a XML Templater feature.
The insert (see attachment) is put together in a String concatenator feature from a set of values extracted from a database in a previous stage of the workflow and stored in an attribute named "SCIENTIST_INFORMATION". AFAIK I have two options to achieve what I want:
*Option 1 - plain 'fme:get-attribute()' *:
If I use a simple {fme:get-attribute("SCIENTIST_INFORMATION")} the templater replaces XML special chars with their respective protected counterpart (e.g. < with <), rendering the text insert into something I do not intend. Note that I cannot reverse these transformation with a string replacer after the templater, as this also replaces non-XML specific special characters making the resulting XML files invalid.
*Option 2 - 'fme:get-xml-attribute(…)'*:
When I try to apply the insert via this feature, the Templater complains about invalid or missing namespace declarations. Introducing declarations to the insert (see second attachment) following a hint of @Takashi Iijima in one of the other issues, the templater no longer complains about namespaces, but gives a rather cryptic "parsing error: Extra content at the end of the document" (see attached log excerpt …error-log.txt for more details) omitting the insert entirely.
Any hint or idea would be highly appreciated. Thank you!
lmoeller