ĐỀ THI LÝ THUYẾT IXJ

1. For an application that makes use of XML, the input XML data set consists of many elements and is very large. The BEST way to filter or extract a subset of information from the complete XML document would be to:
0. Parse the input into a DOM tree and traverse the resulting tree.
1. Use SAX to extract the required elements.(TRUE)
2. Make use of an XSL style sheet.
3. Use the Scalable Vector Graphics (SVG) vocabulary.
2. The configuration information for a software application is stored in XML format. The configuration has to be parsed once during the start-up of the application. The loading of the configuration will also require searching across XML constructs. Performance is not a concern. These requirements can be MOST easily accomplished by designing the configuration loader based on which of the following?
0. XML Information Set
1. XSLT
2. DOM(TRUE)
3. SAX



3. To define an XML vocabulary, an XML developer could use:
0. UML
1. DTDs(TRUE)
2. Namespaces
3. XML Schema(TRUE)
4. XSLT
4. Consider the following content models:
< !ELEMENT doc (title?, chap*) >
< !ELEMENT title (#PCDATA) >
< !ELEMENT chap (sect+) >
< !ELEMENT sect (para+) >
< !ELEMENT para (#PCDATA) >

Which of the following XML instances would be successfully validated against this DTD?

0. < doc >
< chap >
< para >Text< /para >
< /chap >
</doc>
1. < doc >
< chap >
< sect >
< para >Text< /para >
</chap>
</doc>
2. < doc >
< title >Text< /title >
< /doc >(TRUE)
3. < doc >
< title >Text< /title >
< sect >
< para >Text< /para >
</sect>
</doc>
5. The XML Namespaces specification is useful for:
0. preventing object names in the DOM from conflicting with names in legacy APIs.
1. facilitating the use of longer, more descriptive element and attribute names.
2. allowing XML elements to use the same names as related XML attributes.
3. allowing reuse of a common set of names across different XML vocabularies.(TRUE)
6. If two DOM nodes are equivalent, which of the following are TRUE?
1. The DOM nodes have the same node type and node name.
2. The node data are the same.
3. The collection of attribute names are the same.

0. 1 and 2 only
1. 1 and 3 only
2. 2 and 3 only
3. 1, 2 and 3(TRUE)
7. Which of the following statements are TRUE about error handling in SAX2?
0. Parsing errors are divided into two categories: errors and warnings.
1. The default behaviors for warning() and error() callbacks is to do nothing.(TRUE)
2. The ErrorHandler is registered with the ContentHandler via the setErrorHandler() method.
3. Parsing continues after an error occurs.(TRUE)
8. When using a SAX2 parser, a developer wants to get called back by the parser when problems occur. Which of the following can be used to accomplish this goal?
0. Implement the ErrorHandler interface.(TRUE)
1. Implement the DocumentHandler interface.
2. Implement the ContentHandler interface.
3. Subclass the DefaultHandler class and override methods for events of interest.(TRUE)
9. Which of the following statements are TRUE about node changes using DOM2?
0. setValue() to update a node with the specified value.
1. Node value changes are not supported. A new document must be written to edit existing nodes.
2. appendChild() to add a node to a specified parent node.(TRUE)
3. insertNode() to add a node fragment to a location in a document.
4. removeChild() returns the target node fragment so that it can be inserted elsewhere.(TRUE)
10. When using the DOM API, how does a developer access attribute values?
0. call the getAttribute() method on Node
1. call the getAttribute() method on Element(TRUE)
2. call the getAttributes() method on Node and iterate over the NamedNodeMap(TRUE)
3. call the getAllAttributes() method on Element and iterate over the NamedNodeMap
4. call the getAttributeNode() method on Element and access the value property on Attr(TRUE)
11. An empty file is a well-formed XML document
0. true
1. false(TRUE)
12. Which of the following statements is TRUE concerning SAX2 events?
0. Textual data results in at least one characters() callback, which contains the text as an array.(TRUE)
1. Using XMLFilters results in a skippedEntity() callback, effectively removing the object from the processing stream.
2. Callbacks to startAttribute() follow a startElement() callback, if the element has attributes.
13. XML document must have at least the document element (root).
0. true(TRUE)
1. false
14. Which of the following XML documents are well-formed?
0. <firstElement>some text goes here
<secondElement>another text goes here
</secondElement>
</firstElement>(TRUE)
1. <firstElement>some text goes here
2. </firstElement>
<secondElement> another text goes here
</secondElement>
3. <firstElement>some text goes here
<secondElement> another text goes here
</firstElement>
</secondElement>
4. <firstElement>some text goes here
<secondElement>another text goes here
</firstElement>
15. Which of the following XML fragments are well-formed?
0. < myElement myAttribute="someValue"/ >(TRUE)
1. < myElement myAttribute=someValue/ >
2. < myElement myAttribute='someValue'/ >(TRUE)
3. < myElement myAttribute="someValue'/ >
4. <myElement myAttribute="some'Value"/>(TRUE)
5. <myElement myAttribute='some"Value'/>(TRUE)
16. It is illegal to omit quotation marks around attribute values.
Which method does SAX use for processing XML documents?

0. Event Based(TRUE)
1. DocumentHandler
2. Document
3. Tree based
17. Which method does DOM use for processing XML documents?
0. Event Based
1. DocumentHandler
2. Document
3. Tree based(TRUE)
18. Which interfaces are part of the SAX2 API?
0. ContentHandler, ErrorHandler, DTDHandler, EntityResolver(TRUE)
1. DocumentHandler, ErrorHandler, DTDHandler, EntityHandler
2. DocumentHandler, Errorhandler, DTDHandler, SchemaHandler
3. DocumentHandler, Errorhandler, DTDHandler, EntityResolver
19. Which is the best description of the "characters()" method?
0. a method of DOM API to insert character data in the XML document
1. a method of the SAX ContentHandler interface to receive notification
of the presence of character data(TRUE)
2. a method of the DOM interface to replace the entity reference
with the character data
3. None of these.
20. An XML document to be processed is very large. The application extracts a small portion of the information from the document. Memory and speed may be constraints. Which method or methods are most appropriate for this situation?
0. Use SAX(TRUE)
1. Use DOM
2. Extract the necessary information and process using XSLT.
3. Use a schema-based approach.
21. When you construct an XML using a DOM enabled Parser, the same parser should be used to process back
the XML document when the process involves legacy applications, otherwise it is not necessary to do so.


0. Not really
1. Yes, whenver the process is between legacy conectivity this is better.
2. You can use SAX enabled parser to fill this gap.
3. This statement is not a correct one, because DOM is constructed using IDL(TRUE)
22. When Processing Instructions are a part of your parsing process, DOM should be used,
since SAX cannot be used to detect a Processing Instruction in a document.


0. true(TRUE)
1. false
23. Consider a system which is memory & speed constraint. The application is to process XML documents,
sort the contents and mail them to a higher configuration machine for transformation. Which is the best approach?


0. Use platform native language to process the docuements
1. Use DOM based approach.(TRUE)
2. Using SAX based approach is the best.
3. DOM and SAX must be used in this context.
24. When receiving documents from a non-trusted agent, the best way to process the documents is:
0. Use SAX
1. Use DOM
2. Both can be used here.
3. Both can be used but validity is an issue here.(TRUE)
25. In DOM, the Document interface is the only interface that allows you to create other DOM document components.
0. true(TRUE)
1. false
26. XSLT is essentially a tool for translating what kind of documents?
0. XML(TRUE)
1. PDF
2. DOM
3. RTF
27. Use of SAX based parser is most likely to be used in which of the following scenarios?
0. You want to process the document in a sequential order only.(TRUE)
1. The documents is very large.(TRUE)
2. When there is no need to validate XML documents.
3. The parser implements only SAX based approach.
28. DOM can be used to process HTML documents.
0. true(TRUE)
1. false
29. What error types does the SAX2 ErrorHandler interface handle?
0. informational, warning, fatal-error
1. warning, error, fatal-error(TRUE)
2. warning, error
3. informational, warning, error, fatal-error
30. A DOM-based parser should be used for which of the following situations?
0. Need to modify the XML document directly(TRUE)
1. Performance and/or memory is an issue
2. Need to have random access to the components of the XML document(TRUE)
3. Only need to process the XML document sequentially
31. Which of the following nodes in a DOM tree are always leaf nodes (nodes with no children)?
(Select 3 correct choices)

0. Document
1. Processing Instruction(TRUE)
2. Notation(TRUE)
3. EntityReference
4. CDATA Section(TRUE)
32. Which of the following represents an abstraction of an unordered collection of nodes in DOM?
0. NodeList
1. DocumentFragment
2. NamedNodeMap(TRUE)
3. Attributes
33. Which of the following DOM interfaces could be used to filter a set of nodes from a tree based on some criteria?
0. TreeFilter
1. NodeFilter(TRUE)
2. TreeWalker
3. NodeIterator
34. Which of the following statements does not correctly identify the limitations of DTDs ?
0. Only one DTD may be associated with any XML document
1. DTDs do not support namespaces
2. DTD can be changed programatically using the DocumentType interface in DOM(TRUE)
3. DTDs are not extensible
4. DTDs support very weak data typing
35. Which of the following XSLT functions can be used to return a nodeset with the current context node?
0. context()
1. node()
2. current()(TRUE)
3. self()
36. XSL is BEST described as a
0. Object-oriented programming language
1. Procedural programming language
2. Declarative language(TRUE)
3. Interpreted language
37. Which of the following schema fragments is the same as the DTD fragment below ?
< !ELEMENT myElement EMPTY >

0. < xsd:element name="myElement"/ >
1. < xsd:element name="myElement" type ="xsd:anyType"/ >
2. < xsd:element name="myElement" type="xsd:empty"/ >
3. None of the options(TRUE)
38. Which of the following statements about XSL formatting objects are false ?
0. Formatting objects describes the layout of a series of nested boxes or areas that are placed on at least one page
1. Elements in XSL-FO objects map to the boxes on the page in a one to one fashion(TRUE)
2. XSL-FO allows multi-column layouts and footnotes etc in page margins.
3. XSL-FO allows conditional formatting.
39. Which of the following statements about namespaces and DTDs are false?
0. A document can have a DTD but not use namespaces or use namespaces
but not have a DTD
1. A document can use both namespaces and DTDs or neither namespaces nor DTDs
2. Namespaces are completely independent of DTDs
3. DTDs for a document with namespace qualified elements cannot be written
since DTDs do not support namespaces(TRUE)
40. Which of the following SAX2 methods is used by a non validating parser to report that an entity reference
is not resolved


0. skippedEntityReference()
1. ignorableWhitespace()
2. skippedEntity()(TRUE)
3. ignorableEntity()
41. Which of the following XSLT functions returns the number of nodes present in the nodeset, passed
as an argument


0. last()
1. sum()
2. count()(TRUE)
3. size()
42. Which of the following XML based technologies can be considered as XML metadata?
(Select 2 correct choices)


0. Document Type Definition(TRUE)
1. eXtensible Stylesheet language
2. Document Object Model
3. XML Schema(TRUE)
43. A small retailer maintains inventory data in an XML document. This inventory data is read by an application.
The application allows new inventory items to be added to the XML based database. The application also allow
update of inventory details in the XML based database.
Which of the following XML technologies is MOST likely to be used by the application ?


0. XQuery
1. SAX Parser
2. XSLT processor
3. DOM Parser(TRUE)
4. XML schema validator
44. An XML based application maintains a very large configuration file in XML format.
The application needs to read the configuration file at startup and at intermittent intervals for updates.
The process of reading the configuration file needs to be very fast, so as not to impact other parts of the system.
These requirements can be MOST easily accomplished by designing the configuration loader based on
which of the following?


0. An XSLT processor based on DOM
1. DTD
2. XML Schema
3. DOM
4. SAX(TRUE)
45. Which of the following unabbreviated XPath expressions is the same as the abbreviated
XPath expression below?
/book/chapter[4]/paragraph[2]/sentence[1]


0. /child::book/child::chapter[position()=4]/child::paragraph[position()=2]/child::sentence[position()=1](TRUE)
1. /descendant::book/child::chapter[4]/child::paragraph[2]/child::sentence[1]
2. /descendant-or-self::book/child::chapter[4]/child::paragraph[2]/child::sentence[1]
3. None of the options
46. Which of the following statements regarding the differences between DOM and SAX are false ?
(Select 2 correct choices)

0. DOM is ideally suited than SAX for handling large documents, that may need to be searched efficiently(TRUE)
1. Parsing of an XML document can be aborted when the elements of interest
are found when using SAX
2. SAX is a read-only XML parsing methodology
3. If random access to an XML document is desired, SAX is better suited than DOM(TRUE)
47. Which of the following axes can be used together to reference all the nodes in any XML document ?
0. ancestor-or-self,descendant-or-self,self
1. ancestor, descendant, self, child
2. ancestor, descendant, self, following, preceding(TRUE)
3. ancestor, following-sibling, preceding-sibling, descendant
4. It is not possible to reference all the nodes using unabbreviated
XPath expressions
48. Which of the following statements about XSL formatting objects are true ?
(Select 3 correct choices)


0. It is possible to perform conditional formatting using XSL FO(TRUE)
1. Elements in an XSL FO document describe the elements on a rendered page in a one to one fashion
2. It is possible to render a page with multi column layouts using XSL FO(TRUE)
3. Formatting objects can be used to describe the layout of a rendered page
4. None of the options(TRUE)
49. Which of the following lines can be used in an XML document named Test.xml
to associate it with a stylesheet named Test.css


0. < ?xml-stylesheet href="Test.css" type="text/css"? >(TRUE)
1. < ?xml-stylesheet href="Test.xsl" type="text/css"? >
2. < ?xmlstylesheet href="Test.css" type="text/xsl"? >
3. < xml-stylesheet href="Test.css" type="text/css"/ >
4. ?xml-stylesheet link="Test.css" type="text/css"?>
50. Which of the following XML Schema element definitions are equivalent to the element definition below ?
< xsd:element name="myElement" type="xsd:anyType" / >

0. < xsd:element name=myElement / >
1. < xsd:element name="myElement" type="xsd:string" / >
2. < xsd:element name="myElement" type="ANY" / >
3. < xsd:element name="myElement" / >(TRUE)
4. None of the above
51. Which of the following XPath function calls will return the value 10 when invoked ?
0. string-length("XML-Schema")(TRUE)
1. length("XML-Schema")
2. size("XML-Schema")
3. string("XML-Schema").size()
4. count("XML-Schema")
52. Which of the following statements relating to cascading style sheets and formatting objects is FALSE ?
(Select 2 correct choices)


0. CSS is an XML syntax that can be used to describe the appearance of particular elements
in an XML document(TRUE)
1. Cascading style sheets can only be applied to non XML documents(TRUE)
2. fo:root is always the root element of a formatting objects document, assuming fo is mapped
to the appropriate URI.
3. It is possible to perform conditional formatting using XSL-FO, but not using CSS
mẫu web bán hàngLiên hệ
Site map
in hóa đơn gtgt - in hóa đơn gtgt - in hóa đơn gtgt