XSLT HTML验证 [英] XSLT HTML Validation
问题描述
我从XslTransform(C#)生成HTML并且HTML没有
验证,请参阅 http://www.redburg.co.uk/mira/mira415_ev_wh_ch.html 以
为例。
我使用以下XSLT代码:
<?xml version =" 1.0"?>
< ; xsl:stylesheet version =" 1.0"
xmlns:xsl =" http://www.w3.org/1999/XSL/Transform">
>
< xsl:output method =" html" version =" 4.01" />
< xsl:output doctype-system =" http://www.w3.org/TR/html4/strict.dtd" />
< xsl:output doctype-public =" - // W3C // DTD HTML 4.01 // EN" />
是否有任何URL提供有关xsl和html的更多详细信息以及
HTML在从XslTransform创建后可以如何验证。
I am producing HTML from XslTransform (C#) and the HTML does not
validate, see http://www.redburg.co.uk/mira/mira415_ev_wh_ch.html as
an example.
I am using the following XSLT code:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="4.01"/>
<xsl:output doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
<xsl:output doctype-public="-//W3C//DTD HTML 4.01//EN"/>
Are there any URL''s giving more details on xsl and html and how the
HTML can validate after being created from XslTransform.
推荐答案
Trevor Oakley写道:
Trevor Oakley wrote:
我从XslTransform(C#)生成HTML并且HTML没有验证,请参阅 http://www.redburg.co.uk/mira/mira415_ev_wh_ch.html 作为
I am producing HTML from XslTransform (C#) and the HTML does not
validate, see http://www.redburg.co.uk/mira/mira415_ev_wh_ch.html as
an example.
你是什么意思不验证 ?基本上在XSLT中得出
文档从未得到验证,它是样式表作者的责任
输出有效结果。
-
Oleg Tkachenko [XML MVP]
http: //blog.tkachenko.com
我指的是HTML的W3C验证。我的XML / XSLT输出是
HTML,但缺少doctype会导致验证失败。
***通过Developersdex发送 http://www.developersdex.com ***
不要只参加USENET ...获得奖励!
I am referring to W3C validation of HTML. My output from the XML/XSLT is
HTML but the doctype is absent which causes a failed validation.
*** Sent via Developersdex http://www.developersdex.com ***
Don''t just participate in USENET...get rewarded for it!
Trevor Oakley写道:
Trevor Oakley wrote:
我指的是HTML的W3C验证。我的XML / XSLT输出是
HTML,但缺少doctype,导致验证失败。
I am referring to W3C validation of HTML. My output from the XML/XSLT is
HTML but the doctype is absent which causes a failed validation.
啊哈。很可能这个问题与您在C#代码中运行
转换的方式有关。确保你没有转换为
XmlWriter或XmlReader,因为如MSDN所述,在这种情况下,xsl:output
指令被忽略。
< br $>
-
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
这篇关于XSLT HTML验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!