level 1
黑哉不黑ლ
楼主
3.写出以下两个xml标记中包含的内容。
①<file> 141501 </file>
②<chapter>
141501
</chapter>
答案:
4.若某一有效的xml文件中,有如下语句:
<ch:book type="novel" xmlns:ch="chapter"/>
请写出对应的DTD文件中的声明语句。
答案:
5. 根据代码写出对应的xml语句。
① <!ENTITY %content "(chapter,section)">
<!ELEMENT book %content;>
<!ELEMENT chapter (#PCDATA)>
<!ELEMENT section EMPTY>
答案:
② <xs:element name="book" type="bookType"/>
<xs:complexType name="bookType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="publication"type="xs:date" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
答案:
6. 按要求写出自定义简单数据类型bookType的Schema语句。
要求:可接受的值只有chapter和section
<xs:simpleType name=" ① ">
<xs:restrictionbase=" ② ">
③
④
</xs:restriction>
</xs:simpleType>
答案:① ② ③ ④
2016年09月19日 04点09分
1
①<file> 141501 </file>
②<chapter>
141501
</chapter>
答案:
4.若某一有效的xml文件中,有如下语句:
<ch:book type="novel" xmlns:ch="chapter"/>
请写出对应的DTD文件中的声明语句。
答案:
5. 根据代码写出对应的xml语句。
① <!ENTITY %content "(chapter,section)">
<!ELEMENT book %content;>
<!ELEMENT chapter (#PCDATA)>
<!ELEMENT section EMPTY>
答案:
② <xs:element name="book" type="bookType"/>
<xs:complexType name="bookType">
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="publication"type="xs:date" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
答案:
6. 按要求写出自定义简单数据类型bookType的Schema语句。
要求:可接受的值只有chapter和section
<xs:simpleType name=" ① ">
<xs:restrictionbase=" ② ">
③
④
</xs:restriction>
</xs:simpleType>
答案:① ② ③ ④