Posted in XML

Đề thi XML nè

1. Which of the following nodes in a DOM tree are always leaf nodes (nodes with no children)?
(Select 3 correct choices)
a) Document
b) Processing Instruction
c) Notation
d) EntityReference
e) CDATA Section

2. Which of the following statements MOST accurately describes a “linkbase” ?
a) A linkbase is an XML document which contains links to other resources,
which may or may not be XML documents
b) An XML document, which contains inbound or third party links is called a linkbase
c) A linkbase is a series of extended links which link to each other
either directly or indirectly.
d) A database of links maintained in an XML document is a linkbase.

3. During the redesign of a legacy system, it is decided to use XML as the data exchange format between
different processes. It is proposed to generate XML data from the database and send it to any process
that might have a need for it. Also the same XML document will contain the data for different database tables,
all of which have different keys. Which of the following DTD or Schema constructs is MOST likely to be used
in the system ?

a) ID/IDREF
b) xsl:key
c) unique
d) key/keyref
e) generate-id()

4. Which of the following represents an abstraction of an unordered collection of nodes in DOM?
a) NodeList
b) DocumentFragment
c) NamedNodeMap
d) Attributes

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?

6. Which of the following DOM interfaces could be used to filter a set of nodes from a tree based on some criteria?
a) TreeFilter
b) NodeFilter
c) TreeWalker
d) NodeIterator

7. Which of the following statements does not correctly identify the limitations of DTDs ?
a) Only one DTD may be associated with any XML document
b) DTDs do not support namespaces
c) DTD can be changed programatically using the DocumentType interface in DOM
d) DTDs are not extensible
e) DTDs support very weak data typing

8.
Assuming that the xsd prefix is mapped to the namespace URI for XML schema, what is the type
of the element with name “myElement” ?
a) ANY
b) xsd:anyType
c) EMPTY
d) It is illegal to define an element without specifying a corresponding type

9. Which of the following are valid combinations of minOccurs and maxOccurs for any element in a xsd:all group ?
(Select 2 correct choices)
a) minOccurs = 1 maxOccurs = 1
b) minOccurs = 0 maxOccurs = unbounded
c) minOccurs = 0 maxOccurs = 0
d) minOccurs = 0 maxOccurs = 1

10 Which of the following XSLT functions can be used to return a nodeset with the current context node?
a) context()
b) node()
c) current()
d) self()

11. What schema groups should a group of elements be defined under in order to allow them all to appear
in any sequence in a document instance?
a) xsd:all
b) xsd:any
c) xsd:choice
d) xsd:sequence

12. XSL is BEST described as a
a) Object-oriented programming language
b) Procedural programming language
c) Declarative language
d) Interpreted language

13. Which of the following resources can be signed using an XML signature?
(Select 3 correct choices)
a) XML encoded data
b) specific section of an XML file
c) Binary encoded data
d) Set of nodes returned as a DocumentFragment

14.Which of the following schema fragments is the same as the DTD fragment below ?

a)
b)
c)
d) None of the above

15. Which of the following cannot be a part of a SOAP message?
(Select 2 correct choices)
a) User defined elements, which belong to an application namespace
b) DTD
c) Processing Instruction
d) Status information pertaining to a SOAP response

16.
The above line is parsed using a SAX2 parser.
What is the sequence of events passed by the parser to the handler ?
a) startElement(), startPrefixMapping(), endElement(), endPrefixMapping()
b) startPrefixMapping(),startElement(),endElement(),e ndPrefixMapping()
c) startMapping, endMapping,startElement(), endElement()
d) None of the above

17. Consider the below XML document

A DTD is written for the above XML document such that the above XML document is validated successfully
against the DTD. Which of the following statements about the DTD are true?
a) The DTD needs to declare xml:space as an attribute of the root element
b) The xml:space need not be declared as an attribute of root element
c) The XML document cannot be validated successfully, since the prefix xml is
reserved and cannot be used in instance documents
d) A DTD for the above document can be written but the root element must be declared
as EMPTY

18. Which of the following XML Schema elements can be used to make schemas more readable ?
(Select 2 correct choices)
a) xsd:annotation
b) xsd:comment
c) xsd:title
d) xsd:appInfo

19. Which of the following value pairs for the parameters minOccurs and maxOccurs can be used to indicate
the cardinality operator “?”
a) minOccurs = “1” maxOccurs = “unbounded”
b) minOccurs = “0” maxOccurs = “1”
c) minOccurs = “0” maxOccurs = “unbounded”
d) minOccurs = “1” maxOccurs = “1”

20. Which of the following statements about XSL formatting objects are false ?
a) Formatting objects describes the layout of a series of nested boxes or areas
that are placed on atleast one page
b) Elements in XSL-FO objects map to the boxes on the page in a one to one fashion
c) XSL-FO allows multi-column layouts and footnotes etc in page margins.
d) XSL-FO allows conditional formatting.

Tác giả:

Thích thì chiều sao phải xoắn :))

One thought on “Đề thi XML nè

Gửi phản hồi

Mời bạn điền thông tin vào ô dưới đây hoặc kích vào một biểu tượng để đăng nhập:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s