在 Netbeans 中使用 Lift XHTML/HTML

发布于 2024-12-18 15:18:19 字数 794 浏览 0 评论 0原文

我正在使用 Netbeans 开发 Lift 应用程序,除了 lift xhtml 之外,我的所有功能都正常工作,它以 html 扩展名存储,在 netbeans 中创建许多警告和错误,例如:

<lift:surround with="default" at="content">
      <div class="lift:HomePage">
            <h2>Summary</h2>
      </div>
</lift:surround>

给我错误

> Element "lift:surround" not allowed as child of element "body" in this context. (Suppressing further errors from this subtree.)
Content model for element 'body':
Flow content.
From line 1, column 1; to line 1, column 43
(Rule Category: Elements structure)

Element name "lift:surround" cannot be represented as XML 1.0.
From line 1, column 1; to line 1, column 43
(Rule Category: All Other)
----

有没有办法配置 Netbeans那么当这是有效的 Lift 编码时它不会出现这些错误?

I am developing a Lift application using Netbeans and I have everything working apart from the lift xhtml, which is stored with an html extension, creates a number of warning and errors in netbeans for example:

<lift:surround with="default" at="content">
      <div class="lift:HomePage">
            <h2>Summary</h2>
      </div>
</lift:surround>

Gives me the errors

> Element "lift:surround" not allowed as child of element "body" in this context. (Suppressing further errors from this subtree.)
Content model for element 'body':
Flow content.
From line 1, column 1; to line 1, column 43
(Rule Category: Elements structure)

Element name "lift:surround" cannot be represented as XML 1.0.
From line 1, column 1; to line 1, column 43
(Rule Category: All Other)
----

Is there a way to configure Netbeans so it does not present these errors when this is valid Lift coding?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

南风起 2024-12-25 15:18:19

这并不能直接回答您的问题,但您可以以不同的方式重写所有 lift:xxx 标记,以使解析器满意 HTML — 例如,使用

<div class="lift:surround?with=default;at=content">
  ... as before ...
</div>

This doesn't directly answer your question, but you can rewrite all the lift:xxx tags differently to make parsers that expect HTML happy — for instance, with <lift:surround>:

<div class="lift:surround?with=default;at=content">
  ... as before ...
</div>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文