0

I am attempting to build an XML document using Soy and get the following error:

com.google.template.soy.parsepasses.contextautoesc.SoyAutoescapeException: In file C:\Users\jeff\workspaceEMC\PAC\target\classes\templates\XML_template.soy:33:24, template vulcan.xml.body: Failed to compute an output context for raw text `...

I am wondering if the slashes etc. in the XML (this error happens prior to the tags being assigned values) throw off the parser. I am stepping through the Soy code in the debugger but this is very tough for me.

To clarify what I am trying, my .soy template file simply looks like {$bar}...

It does not fail immediately but someplace parsing deep within the template it always gives that exception.

Mooing Duck
  • 64,318
  • 19
  • 100
  • 158
Jeff
  • 1,513
  • 4
  • 18
  • 34

1 Answers1

0

I was able to find the answers in the documentation which is not called anything like Soy. Here is a link: https://developers.google.com/closure/templates/index. My particular problem was solved using {template .body autoescape="deprecated-noautoescape"} as the first line of the template. The difference was the addition of the autoescape option in that line and then the error no longer occurred; not sure exactly what is happening under the covers but glad it works now.

Jeff
  • 1,513
  • 4
  • 18
  • 34