XML - 管理数据交换/CSS/答案
外观
< XML - 管理数据交换 | CSS
这里是一种方法
为了能够将外部样式表与 XML 文档连接,您需要在文档开头,在
<?xml-stylesheet type="text/css" href="excercise1.css"?>
下方写入
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
像这样
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml-stylesheet type="text/css" href="exercise1.css"?> <!DOCTYPE inventory[ <!ELEMENT inventory (book+)> <!ELEMENT book (isbn,title,titel?,author+,publisher,price)> <!ELEMENT isbn (#PCDATA)> <!ELEMENT title (#PCDATA)> <!ELEMENT author (#PCDATA)> <!ELEMENT publisher (#PCDATA)> <!ELEMENT price (#PCDATA)> <!ENTITY gyl "Gylden, Oslo Norway"> <!-- example of publisher --> <!ENTITY sybex "SYBEX Inc. San Francisco California"> <!-- example of publisher --> ]> <inventory> <book> <isbn>91-1-300875-7</isbn> <title>Here you put in a title</title> <author>Here you put in a author</author> <publisher>&gyl;</publisher> <price>$30</price> </book> <book> <isbn>91-2-705229-X</isbn> <title>Title of second book</title> <author>Author of second book </author> <publisher>&sybex;</publisher> <price>$30</price> </book> </inventory>