如何使用 xsl:output 获取带有 url 的 doctype 标记
中添加了以下 xsl:output 标记
我在 xslt
结果我在 html 输出中得到以下 doctype 标记
-
我如何使用 xsl:output 在 doctype 标记中提及 url,它将输出如下所示的 doctype 标记
最好的问候,
凯沙夫
i have added the below xsl:output tag in xslt
<xsl:output method="html" indent="yes" encoding="utf-8" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" ></xsl:output>
as a result i get the below doctype tag in the html output-
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
how can i mention the url in the doctype tag using xsl:output which would output a doctype tag that looks like below
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "_http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Best Regards,
Keshav
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
更多
发布评论
评论(1)
快速访问 W3Schools 会发现 XSL:Output 元素有一个 doctype- system 属性可用,以及 doctype-public。我相信这就是您所需要的。
如果将 xsl:output 更改为以下内容,
您应该获得所需的 DTD 输出,如下所示:
A quick trip to W3Schools reveals that the XSL:Output element has a doctype-system attribute available, as well as a doctype-public. I believe this is what you need.
If you change your xsl:output to the following
You should get the DTD output you require, as follows: