Please explain the answers for these IBM Mock questions.
5. In a B2B organization, it is required to
exchange XML messages conforming to a single vocabulary
with other companies in real time. The messages arrive via different media including email. Since the messaging
is done over the internet,it is important that the messages be validated at both ends when they arrive.
What factors are likely to be considered by a developer, when designing such a system.
(Select 3 correct choices)
a)
Is the parser at the receiving end a validating parser?
b)
Does the parser handle XML Schemas or DTDs?
c)
Is the parser validation lenient?
d)
Does the document instance override the internal DTD subset?
e)
Is the same parser being used at both ends?
Please explain the logic to arrive at this answer . ?
Answer : a b d
14.Which of the following schema fragments is the same as the DTD fragment below ?
<!ELEMENT myElement EMPTY>
a)<xsd:element name="myElement"/>
b)<xsd:element name="myElement" type ="xsd:anyType"/>
c)<xsd:element name="myElement" type="xsd:empty"/>
d)None of the above
How is empty identifed in a schema ?
Answers: d
21. Which of the following Document type definitions will validate the below XML document successfully ?
<? xml version="1.0" ?>
<root/>
(Select 3 correct choices)
a) <!ELEMENT root (#PCDATA)>
<!ATTLIST root rootattr CDATA #IMPLIED "value">
b) <!ELEMENT root EMPTY>
<!ATTLIST root rootattr CDATA #FIXED "value">
c) <!ELEMENT root (#PCDATA)>
d) <!ELEMENT root ANY>
<!ATTLIST root rootattr CDATA "value">
e) <!ELEMENT root (CDATA) >
Answers: b c d
40. Which of the following XML documents are NOT well formed ?
(Select 2 correct choices)
a) <?xml version="1.0"?>
<root attr1="val1" attr2="" attr1="test">
<root/>
</root>
</root>
b) <?xml version="1.0"?>
<root attr1="1value" attr2="2value">
<root/>
</root>
c) <?xml version="1.0"?>
<root attr1="1value" attr2="">
<root> 5 is < than 4 </root>
</root>
d) <?xml version="1.0"?>
<root attr1="1value" attr2="">
<root> 5 is > than 4 </root>
</root>
Answer: a c
Thanks
Dhiren