Skip to main content

I have an issue where I have text that contains braces that are inputted into an XMLTemplater through a SubTemplate (and also through ROOT). Since I don't want the XMLTemplater to parse the text, it is referenced as @Value(text) and not {fme:get-attribute("text")}. Still I get an issue as if FME expects a function. The log tells me: 

"context item": undeclared variable

For this issue I prefer not to escape the braces in my text, which of course would be a workaround. 

Hi @Lars de Vries​,

To insert an attribute value without parsing, please try using the get-xml-attribute function in the XMLTemplater.


@daveatsafe​ Thanks for your response. Your solution kind of helped, but this raises a new issue. The XML-fragments contain namespaces which are declared at the root level of the XML, but not in the SubTemplater. What happens is that the SubTemplater doesn't accept the fragments (even though Validation is turned off), because of the namespace in the fragment.


Reply