XML没有获取样式信息

时间:2019-01-31 15:18:48

标签: xml xslt dtd

Chrome浏览器的检查人员说我在命名空间方面遇到了麻烦,并且我打算离开域来获取样式。我不明白怎么了。我已经这样做好几天了!这是每个文件的标题部分。

XML文件:

<?xml version="1.0" encoding="UTF-8" standalone = "no"?>
<!DOCTYPE toc SYSTEM "IoT.dtd">
<?xml-stylesheet type="text/xsl" href="IoT.xsl"?>
<toc
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="https://www.w3schools.com toc.xsd">

    <supsectionI>
***OTHER CODE has been deleted to save space***

</toc>

XSL文件:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    exclude-result-prefixes="xs"
    version="2.0">
    <xsl:output method="xml" encoding="utf-8" indent="no"/>

    <xsl:template match="/">

        <html>.....

DTD文件:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified">
<xs:element name="toc">

Image of Errors in Chrome

0 个答案:

没有答案