我正在使用 Apache Velocity,我的一个模板正在触发解析器错误。导致异常的行是:
$slider.animate({height: configMap.extendedHeight})
.attr('title', configMap.extendedTitle);
错误是
Oct 28, 2013 11:34:50 AM org.apache.velocity.runtime.log.CommonsLogLogChute log
SEVERE: ResourceManager.getResource() parse exception
org.apache.velocity.exception.ParseErrorException: Encountered ")\n .attr(\'title\', congifMap.extendedTitle);\n return true;\n } else if(sliderHeight === configMap.extendedHeight) {\n " at vml/Slider.vml[line 45, column 71]
Was expecting one of:
"," ...
")" ...
<WHITESPACE> ...
at org.apache.velocity.Template.process(Template.java:151)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:437)
at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533)
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1514)
at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:373)
...
我是 VTL 语法的新手,在 VTL 参考手册中看不到错误可能是由什么引起的
http://velocity.apache.org/engine/devel/vtl-reference-guide.html
有谁知道这是什么原因以及如何解决它?先感谢您!