我正在尝试使用Java和Java Thymeleaf模板引擎实现基于Polymer的材料设计。我开始通过这个tutorial学习并得到了这个例外:
Caused by: org.xml.sax.SAXParseException; Attribute name "unresolved" associated with an element type "body" must be followed by the ' = ' character.
据我所知,Thymeleaf默认不能处理Web组件/自定义组件。是否可以在Thymeleaf模板引擎的上下文中使用Polymer?
答案 0 :(得分:4)
如果你有类似的话:
<body unresolved touch-action="auto">
它不能与Thymeleaf一起使用,因为Thymeleaf希望标记是有效的XHTML,而unresolved
本身就是无效的XHTML标记。但是,以下情况应该有效:
<body unresolved="" touch-action="auto">
<body unresolved="unresolved" touch-action="auto">
答案 1 :(得分:2)
即将推出的Thymeleaf 3.0版本将能够比Thymeleaf 2.1更好地处理非XHTML标记。
看看
http://forum.thymeleaf.org/Thymeleaf-3-0-status-td4029243.html