单项选择题
Report.xml中包含subject 元素,该元素可以包含某HTML 标记,如下:
< subject>
< b>2008年< /b>< i>北京奥运会< i>展望
< /subject>
现需要编写一个XML schema来定义该xml文档内容的结构,以下的schema片断中,()可以使Report.xml通过有效性验证。
A.<xsd:element name="subject"><xsd:complexType mixed="true"><xsd:all><xsd:element name="i"minOccurs="0"maxOccurs="unbounded"type="xsd:string"/><xsd:element name="b"minOccurs="0"maxOccurs="unbounded"ty
B.<xsd:element name="subject"type="xsd:string"/>
C.<xsd:element name="subject"type="xsd:anyType"/>
D.<xsd:element name="subject"><xsd:complexType mixed="true"><xsd:sequence><xsd:element name="i"minOccurs="0"maxOccurs="unbounded"type="xsd:string"/><xsd:element name="b"minOccurs="0"maxOccurs="unbounded"
相关考题
-
单项选择题
<stuList><student id="a001"><name>jack<name><age>22</age></student><student id="a002"><name>make<name><age>23</age></student></stuList>查找id=’a002’的xpath表达式是()。
A.//name[.=’a002’]
B.//name[@id]/age=’22’
C.//name[@id=’a002’]
D.stuList/child::*[2] -
单项选择题
<roster><student ID="s101">;<name>;李华<;/name>;<sex>;男<;/sex>;<birthday>;1978.9.12<;/birthday>;<score>;92<;/score>;</student>;<student ID="s102">;<name>;齐辉<;/name>;<sex>;女<;/sex>;<birthday>;1979.3.2<;/birthday>;<score>;90<;/score>;</student>;</roster>;针对上述XML代码,输出ID为s102的学生的姓名的XSL片段正确的是()。
A.<xsl:template match="/roster"><xsl:value-of select=".[@ID=’s102’]/name"/></xsl:template>
B.<xsl:template match="/roster"><xsl:value-of select="student[@ID=’s102’]/name"/></xsl:template>
C.<xsl:template match="/roster"><xsl:value-of select="[student@ID=’s102’]/name"/></xsl:template>
D.<xsl:template match="/"><xsl:value-of select="student[@ID=’s102’]/name"/></xsl:template> -
单项选择题
<customer_summaryxmlns:addr="http://www.xyz.com/addresses/"xmlns:books="http://www.zyx.com/books/"><addr:name><title>Mrs.</title></addr:name><books:title>Lord of the Rings</books:title>上述是一段关于XML命名空间的实例片段,以下说法错误的是()。
A.本例中,命名空间的前缀分别是addr、books
B.第一个< title>元素属于addr 名称空间,因为其父元素< addr:Name>属于该名称空间
C.名称空间中定义的字符串必须是可以访问的URL,比如:XML 解析器会到http://www.zyx.com/books/去搜索DTD 或schema
D.名称空间的缩写需要在定义之后才能使用
