Anda di halaman 1dari 23

XML: MCQ

Chapter 01: Introducing XML


Q1. Which of the following is or are the purposes of markup language in electronic documents?
A. To modify the look and formatting contents for output on some medium
B. To process the content in a document for the input into an application
C. To establish the structure and meaning of a document
D. To enforce rules and constraints on data in the document
Answer: A, C
Q2. ____________ sets the structure of the document and defines the semantic meaning of elements.
A. Markup
B. Document Script
C. Processor application
D. Metadata
Answer: A
Q3. Which one of the following editing programs like Word processors generally use to accomplish formatting?
A. Markup
B. Runtime Script
C. Typesetters
D. Metadata
Answer: A

Q4. Which one closed markup?


A. The rules of the markup is not publicly open and vendors can not create own processors for markup language
B. The rules of the markup is publicly open and vendors can create own processors for markup language
Answer: A
Q5. _______________ markup used to generate code that is specific to a particular device or application?
A. Specific
B. Generalized
C. Open
D. Closed
Answer: A
Q6. Which one is used to described portable documents across many different applications?
A. Specific markup language
B. Generalized markup language
Answer: B
Q7. Which one is generic enough to be used in many different applications?
A. Specific markup language
B. Generalized markup language
Answer: B
Q8. Which of the following is or are generalized markup languages?
A. HTML
B. RTF
C. XML
D. SGML
Answer: C, D
Q9. HTML is __________ markup language?
A. Specific
B. Generalized
Answer: A
Q10. ___________ can be used to create other markup language with its own rules and purposes.
A. Specific markup language
B. Generalized markup language
Answer: B
Q11. Which of the following is or are NOT extensible?
A. HTML
B. RTF
C. XML
D. SGML
Answer: A, B
Q12. _________ allows creation of other markup languages.
A. HTML
B. SGML
Answer: B
Q13. HTML is _________ of SGML.
A. an application
B. a subset
C. a part
D. a form
Answer: A

Chapter 02: Entering Into XML


Q1. XML is an application of SGML.
Is this statement true?
A. Yes
B. No
Answer: B [XML is a subset or profile of SGML. HTML is an application of SGML]

Q2. XML is ____________ of SGML.


Which one best fits the blank?
A. a subset
B. an application
C. a profile
D. a newer version
Answer: A or C [Either one is correct]

Q3. Which of the following is or are supported by XML but not by SGML?
A. DTD Validation
B. XLL linking mechanism
C. XSL for formatting
D. XSD for strong data typing and enforcing constraints
Answer: B, C, D

Q4. Which of the following is or are supported by both SGML and XML?
A. DTD Validation
B. XLL linking mechanism
C. XSL for formatting
D. XSD for strong data typing and enforcing constraints
Answer: A [XML inherits DTD validation from SGML. Other three are specifications included in only in XML]

Q5. If HTML is about displaying information, XML is about ______________ information.


Which one best fits the blank space.
A. displaying
B. processing
C. describing
D. interpreting
Answer: C [See page 15]

Q6. _________ is a metalanguage.


Choose appropriate one for the blank.
A. HTML
B. XML
Answer: B [Like SGML, XML is extensible you can create other languages using it.]

Q7. Anything that can be done in XML can also be done in SGML, but XML has some advantages over SGML.
Do you agree?
A. Yes
B. No
Answer: A

Q8. _______ is self-describing?


Which one best fits the blank space.
A. XML
B. HTML
Answer: A
Q9. XML is not self-describing.
Is it true?
A. Yes
B. No
Answer: B
Q10. XML does not provide for separating the user interface form the data.
Do you agree?
A. Yes
B. No
Answer: B [XML’s power is its ability to separate the user interface from the data.]

Q11. Which one of the following is NOT true?


A. XML is self-describing
B. XML can be used for displaying data
C. XML can be used as a data-interchange format
D. XML can be used to create common data store for information
Answer: B

Q12. XML is intended to _________ HTML.


Which one is the correct word for the blank?
A. replace
B. complement
Answer: B

Q13. Which of the following is or are true about both XML and SGML?
A. Generalized language
B. Documents are self-describing
C. Documents can validated using DTD rules
D. Data types and constraints can be enforced on documents using Schema documents
Answer: A, B, C [Schema validation only supported in XML]

Q14. Consider the following two statements.


I. XML documents are considered truly parsable
II. HTML documents are truly parsable
Now which of the following is or are correct above about the above two statements?
A. Both statements are true
B. Both statements are false
C. statements I is true but statement II is false
D. statements I is false but statement II is true
Answer: C

Q15. HTML (also SGML) allows authors to omit the closing tags for many elements. It is a ____________.
A. shortcut technique
B. minimization technique
C. typing technique
D. acceptable technique
Answer: B

Q16. Which specification of XML is the currently approved as a recommendation by W3C?


A. XML 1.0
B. XML 1.1
C. XML 2.0
D. XML 2.1
Answer: A

Chapter 03: XML Structure and Syntax


Q1. Every XML document includes both a ___________ and a _______________.
Find the correct options for the blanks.
A. logical structure
B. physical Structure
C. datatype
D. schema
Answer: A, B
Q2. Which one of the following tells what elements to include in a XML document and in what order?
A. Logical structure of the XML document
B. Physical structure of the XML document
Answer: A

Q3. The _________ structure of every XML document contains the actual data used in the document.
Which is appropriate for the blank?
A. logical
B. physical
Answer: B

Q4. Which of the following is or are true about the logical structure of an XML document?
A. It is like a template that tells what elements to include in what order
B. It indicates what a document contains
C. It indicates how a document is built
D. It is composed of all the content used in a document
Answer: A, C

Q5. Which of the following is or are true about the physical structure of an XML document?
A. It is like a template that tells what elements to include in what order
B. It indicates what a document contains
C. It indicates how a document is built
D. It is composed of all the content used in a document
Answer: B, D

Q6. The logical structure of an XML document indicates how a document is built, the physical structure _______________?
Which phrase is the correct for the blank space?
A. why a document is built
B. what a document contains
C. what a document cannot contain
D. when a document can be built
Answer: B [See page 26]

Q7. The prolog section in an XML document is optional.


Do you agree?
A. Yes
B. No
Answer: A [Prolog consists of xml declaration and document type declaration. Both are optional. You can omit both or
either one of the two]

Q8. Which of the following component or components the prologs of an XML document can contain?
A. The XML declaration
B. The document type declaration
C. The processing instruction
D. The root element
Answer: B

Q9. The ______ identifies the version of the XML specification to which the document conforms.
Choose the correct one for the blank.
A. XML declaration
B. document type declaration
C. processing instruction
D. root element
Answer: A

Q10. The ___________ consists of markup code that indicates the grammar rules or DTD (Document Type Definition) for the
particular class of document
Choose the correct one for the blank.
A. XML declaration
B. document type declaration
C. processing instruction
D. root element
Answer: B
Q11. Which is the purpose of the stand-alone attribute in the XML declaration in an XML document?
A. It indicates the version of XML specification to which the document conforms
B. It identifies the character encoding scheme the document uses
C. It identifies whether any markup exist that is external to the document
D. It identifies document element in the XML document
Answer: C

Q12. What are the possible values of stand-alone attribute of the XML declaration in an XML file?
A. yes
B. no
C. true
D. false
Answer: A, B

Q13. Which of the following correctly identifies the correct position of the Document Type Declaration in an XML file?
A. Preceding the XML Declaration
B. Following the XML Declaration
C. Preceding the Document Element
D. Following the Document Element
Answer: B, C

Q14. Which of the following is or are true about the Document Element in an XML document?
A. It is the root element
B. An XML document contains only one Document Element
C. It contains all the data in the XML document
D. It can comprise any number of subelement and external entities
Answer: A, B, C, D

Q15. If you create an entity “Author”, then which one correctly references it?
A. &Author&
B. #Author#
C. &Author#
D. &Author;
Answer: D

Q16. Which of the following is or are NOT properly nested?


A. <description>I got <b>IDB-BiSEW <i>scholarship</b></i> in 2007</description>
B. <description>I got <b>IDB-BiSEW <i>scholarship</i> in 2007</b></description>
C. <description>I got <b>IDB-BiSEW <i>scholarship</b> in 2007<i></description>
D. <description>I got <b>IDB-BiSEW <i>scholarship</i></b> in 2007</description>
Answer: A, C

Q17. Consider the following entity declaration


<!ENTITY PC “Mr. Sirajum Monir”>
Now which one correctly references the above entity correctly?
A. <description>ESAD-CS is coordinated by #PC#</description>
B. <description>ESAD-CS is coordinated by &PC&</description>
C. <description>ESAD-CS is coordinated by &PC;</description>
D. <description>ESAD-CS is coordinated by #PC;</description>
Answer: C

Q18. Which type of entities requires notation declaration?


A. Parsed entities
B. Unparsed Entities
C. Parameter entities
D. Predefined entities
Answer: B

Q19. For which one there is no predefined entity declared? [1]


A. >
B. <
C. &
D. ©
E. “
Answer: D
Q20. Which character is placed before the entity name to refer a parsed entity?
A. &
B. #
C. %
D. $
Answer: A

Q21. Which character is placed before the entity name to refer a parameter entity?
A. &
B. #
C. %
D. $
Answer: C

Q22. Which of the following is or are valid empty elements in XML?


A. <item>
B. <item />
C. <item></item>
D. <item empty=”true”>
Answer: B, C

Q23. What quality or qualities a valid XML document must meet?


A. It is well-formed
B. It contains only character entities
C. It strictly obeys the rules for defined by DTD
D. It contains all tags defined in W3C’s recommendation
Answer: A, C

Q24. Which of the following quality or qualities a well-formed XML must meet?
A. It matches the definition a document
B. It strictly obeys the rules for defined by DTD
C. It observes the constraints for a well-formed as defined by the XML specification
D. It contains all tags defined in W3C’s recommendation
Answer: A, C [See page 33]

Q25. Consider the following two statements [1]


(i) An well-formed xml document is always valid
(ii) A valid xml document is always well-formed
Find out the true options
A. state (i) is true
B. state (i) is false
C. state (ii) is true
D. state (ii) is false
Answer: B, C

Chapter 04: DTD


Q1. Which one acts like a rules book for an XML document?
A. XSL
B. XSD
C. DTD
D. CSS
Answer: C
Q2. What are the parts that a DTD can comprise?
A. An internal subset
B. A public subset
C. An external subset
D. A private subset
Answer: A, C
Q3. If an XML document contains both an external DTD subset and an internal DTD subset, which part is processed first?
A. The internal subset
B. The external subset
Answer: A
Q4. You have a DTD schema named name.dtd in your local file system in the current working directory. Which of the
following is the valid syntax to associate an XML document to that DTD schema? The root element is names.
A. <!DOCTYPE names PUBLIC “name.dtd”>
B. <!DOCTYPE names SYSTEM “name.dtd”>
C. <!DOCTYPE SYSTEM “name.dtd”>
D. <!DOCTYPE PUBLIC “name.dtd”>
Answer: B
Q5. What other elements an element can contain in what order is defined by the __________.
A. Content rules
B. Content model
C. Children model
D. Allowable content
Answer: B
Q6. What do you call the element declaration which conations a list of other elements?
A. Content rules
B. Content model
C. Children model
D. Allowable content
Answer: B
Q7. Which one is correct about an element declaration in DTD?
A. It contains the name of the element and the type of data the element contains
B. It contains the type of data the element contains and the name of the element
C. It contains the name of the element, the type of data the element contains and the actual data the element holds
D. It contains the name of the element, the type of data the element contains and the precision of data the element
holds
Answer: A [Name comes first then content specification (the type of data the element can contain)
Q8. What is content specification?
A. It identifies the child elements an element must contain and the order of the child elements
B. It identifies the name of the element and the type of data the element can contain
C. It identifies the name of the element, the type of data the element contains and the actual data the element holds
D. It identifies the pattern of data that an element can contain
Answer: B
Q9. Consider the following DTD fragment
<! ELEMENT description (#PCDATA)>
According to the above declaration which of the following is or are valid?
A. <description />
B. <description>The scholarship is for underprivileged Muslim young</description>
C. <description>The scholarship is for <b>underprivileged</b> Muslim young</description>
D. <description>The scholarship is for <b>underprivileged <i>Muslim young</i></b> </description>
Answer: A, B [PCDATA allows empty content but if declared EMTY, it will not allow any content. B, C are well-formed but to
be valid b and I element should be defined]
Q10. Which of the following DTD content specification or specifications are valid?
A. <!ELEMENT description (#PCDATA| b | i )>
B. <!ELEMENT description (#PCDATA| b | i )*>
C. <!ELEMENT description ( b | i | #PCDATA )*>
D. <!ELEMENT description ( b | i | #PCDATA )>
Answer: B [Two things to remember to define such mixed content: 1. #PCDATA must be the first among the alternatives 2.
You must place asterisk (*) mark after the parenthesis]
Q11. ____________ is ordinary text that can include characters normally reserved for markup
Which one is the correct for the blank?
A. Character Data
B. Parsed Character Data
Answer: A
Q12. XML processors assume that the content of element in a XML file is _______________ by default.
A. Character Data
B. Parsed Character Data
Answer: B
Q13. XML processors assume that the value of an attribute in a XML file is _______________ by default.
A. Character Data
B. Parsed Character Data
Answer: A
Q14. Which of the following is or are valid text content for an XML element?
A. 9 > 8 is true
B. 9 &gt; 8 is true
C. 9 ‘>’ 8 is true
D. <![CDATA[ 9 > 8 is true]]>
Answer: B, D [The Greater than character (>) must be escaped; CDATA section allows reserved characters. CDATA Section
is not parsed]
Q15. <!ELEMENT modification (change*)> according to this definition, which of the following statement or statements are
true?
A. modification will have only one child change
B. modification may not have any child change
C. modification may have more than one child change
D. all of the above
Answer: B, C
Q16. <!ELEMENT modification (change?)>
According to this definition, which of the following statement or statements are true?
A. modification may have one child change
B. modification may not have any child change
C. modification may have more than one child change
D. all of the above
Answer: A, B
Q17. <!ELEMENT modification (change+)>
According to this definition, which of the following statement or statements are true?
A. modification may have one child change
B. modification may not have any child change
C. modification may have more than one child change
D. all of the above
Answer: A, C
Q18. Consider the fillowing DTD declarations
<!ELEMENT company (#PCDATA) >
<!ATTLIST company id CDATA #IMPLIED >
According to this declarations, find the valid xml for company element.
A. <company id=”HTCL”>Hi-Tech Systems</company>
B. <company>Hi-Tech Systems</company>
C. <company id=””>Hi-Tech Systems</company>
D. None
Answer: A, B, C
Q19. To associate an XML document with a DTD schema in a public place on a server with URI
http://www.htcsl.com/hr/name.dtd, which of the following is the valid syntax?
A. <!DOCTYPE names PUBLIC “http://www.htcsl.com/hr/name.dtd”>
B. <!DOCTYPE names SYSTEM “http://www.htcsl.com/hr/name.dtd”>
C. <!DOCTYPE PUBLIC “http://www.htcsl.com/hr/name.dtd”>
D. <!DOCTYPE SYSTEM “http://www.htcsl.com/hr/name.dtd”>
Answer: A
Q20. Consider the fillowing DTD declarations
<!ELEMENT name ( first, last) >
<!ELEMENT first (#PCDATA) >
<!ELEMENT last (#PCDATA) >

According to above declarations which of the following is or are valid for name element?
A. <name>
<first>Shaz</first>
<last />
</name>
B. <name>
<first></first>
<last>Amin</last
</name>
C. <name>
<first>Shaz</first>
</name>
D. <name>
<last>amin<last>
<first>shaz</last>
</name>
Answer: A, B, D
Q21. Consider the following DTD declarations
<!ELEMENT name ( first, last, middle?) >
<!ELEMENT first (#PCDATA) >
<!ELEMENT last (#PCDATA) >
<!ELEMENT middle (#PCDATA) >

According to above declarations which of the following is or are valid for name element?
A. <name>
<first>Shaz</first>
<last />
<middle>Mohammed</middle>
</name>
B. <name>
<first></first>
<last>Amin</last>
</name>
C. <name>
<first>Shaz</first>
</name>
D. <name>
<last>amin<last>
<first>shaz</last>
</name>
Answer: A, B, D
Q22. Consider the fillowing DTD declarations
<!ELEMENT name ( first| last) >
<!ELEMENT first (#PCDATA) >
<!ELEMENT last (#PCDATA) >
According to above declarations which of the following is or are valid for name element?
A. <name>
<first>Shaz</first>
<last />
</name>
B. <name>
<first></first>
<last>Amin</last
</name>
C. <name>
<first>Shaz</first>
</name>
D. <name>
<last>amin<last>
</name>
Answer: C, D [#PCDATA allows empty content
Q23. You want to test various structures in DTD while tracking variations. Which of the following DTD construct or construct
will help you?
A. CDATA section
B. INGNORE
C. INCLUDE
D. ATTLIST
Answer: B, C [IGNORE and INCLUDE are used to turn certain portion of DTD on or off and thus allows you test variations]
Q24. XML declaration in the Prolog is also a Processing Instruction.
Do you agree?
A. Yes
B. No
Answer: A [PIs are written within <? and ?> and they provide instructions for XML processing Application. In that sense <?xml
….?> is certainly a processing instruction (PI)]
Q25. Consider the following Processing Instruction (PI)
<?AVI CODEC=”VIDEO1” COLORS=”256”?>
Now which one is PI target?
A. AVI
B. CODEC
C. COLORS
D. VIDEO1
Answer: A
Q26. Which of the following is or are the possible values of the RMD attribute in the XML declaration?
A. ALL
B. NONE
C. INTERNAL
D. EXTERNAL
Answer: A, B, C
Q27. You want to indicate the xml processor that it should not process certain portion DTD (internal or external) should not
be processed. Which attribute would use to solve it ino XML declaration?
A. stand-alone
B. encoding
C. RMD
D. Process
Answer: C

Chapter 05: Scripting XML


Q1. Client side script code can appear anywhere within an HTML document.
Do you agree?
A. Yes
B. No
Answer: A [Though ideal position is the HEAD section]
Q2. Which property of <SCRIPT> tag allows you to specify which language you want to use?
A. LANG
B. LANGUAGE
C. LANG-OPTION
D. TYPE
Answer: B [You specify like <SCRIPT LANGUAGE=”VBScript”>…..</SCRIPT>. Language can be JavaScript, VBScript or Jscript.
Default is JavaScript. If you do not specify language “JavaScript” will be assumed. Also remember VBScript only works within
Internet Explorer. JavaScript is supported by almost all browsers]

Q3. You have written the following script code in your HTML page
<SCRIPT>
alert (“Welcome to my site”);
</SCRIPT>
Which scripting language you are using?
A. JavaScript
B. VBScript
C. Jscript
D. PerlScript
Answer: A [Since default language is JavaScript]

Q4. You want to welcome when your HTML Page is loaded on the browser. Which of the following will work for you?
A. <BODY onload=”alert( “Welcome to my site);”>
B. <BODY alert(“Welecome to my site”);>
C. <SCRIPT FOR=”body” event=”onload”> alert( “Welcome to my site”); </SCRIPT>
D. <SCRIPT FOR=”window” event=”onload”> alert( “Welcome to my site”); </SCRIPT>
Answer: A, D

Q5. ___________ acts a middle layer between the data in an XML document and a display mechanism.
Which one best fits the blank.
A. XSL
B. XSD
C. DTD
D. An XML Parser
Answer: D [An XML Processor]

Q6. XML describes data, ________ instructions for how the processor should display data.
Which one fits the blank correctly?
A. includes
B. does not include
Answer: B

Q7. ____________ primarily parses and validates an XML document.


A. An application
B. A file based database
C. An XML Processor
D. A Schema Document
Answer: C
Q8. The _________ lets authors view all parts of the XML tree from the root through its branches.
Find the appropriate the option for the blank.
A. XML Object Model
B. JavaScript
C. XML Parser
D. Stylesheet
Answer: A

Q9. Which property of an XML DOM parser instance returns the root element of an XML document?
A. root
B. rootElement
C. document
D. documentElement
Answer: D
Q10 and Q11 are based on the following JavaScript code
var xmlDoc = new ActiveXObject( “Microsoft.xmldom” );

xmlDoc.loadXML (“<trainees>” +
“ <trainee>”+
“ <id>10732</id>”+
“ <name>Hasan Abid</name>”+
“ </trainee>”+
“ <trainee>”+
“ <id>10733</id>”+
“ <name>Ruhul Amin</name>”+
“ </trainee>” +
“</trainee>”);

var traineeCollection = xmlDoc.documentElement.childNodes

Q10. Which one returns the number of trainee element present in the xml tree?
A. traineeCollection.length
B. traineeCollection.items.length
C. traineeCollection.childNodes.length
D. traineeCollection.childNodes.items.length
Answer: A

Q11. Now which of the following should return the text 10732? [Choose all valid options.]
A. traineeCollection.item(0).firstChild.text
B. traineeCollection.item(0).childNodes.item(0).text
C. traineeCollection.item(0).firstChild.nodeValue
D. traineeCollection.item(0).firstChild.firstChild.nodeValue
Answer: A, B, D

Chapter 06: XML as Data


Q1. Which one is strong typing of data?
A. An element can contain a single type of data.
B. An element can contain multiple types of data
C. An element can contain only numeric data
D. An element can contain only character data
Answer: A
Q2. Which one is weak typing of data?
A. An element can contain a single type of data.
B. An element can contain multiple types of data
C. An element can contain only numeric data
D. An element can contain only character data
Answer: B

Q3. To import rich data types support of Microsoft’s XML processor (MSXML), which namespace should you use?
A. urn:microsoft-com:data
B. urn:shemas-microsoft-com:data
C. urn:shemas-microsoft-com:datatypes
D. urn:shemas-microsoft-com:types
Answer: C [We use xmlns:dt=” urn:shemas-microsoft-com:datatypes” and then specify like <id dt:dt=”int”>101</id>]

Q4. According to XML-Data specification within datatypes namespace, what does the following data type declaration
mean?
fixed.14.4
A. A number of 4 digits with 14 parts precision
B. A number which can have maximum 14 digits but alt least 4 digits
C. A number which can have maximum 14 digits on the left of decimal point and maximum 4 digits on the right of
decimal point
D. A number which can have maximum 14 digits but maximum 4 digits on the right of decimal point
Answer: C

Q5. Which property of an element node helps to access the data type of the node?
A. nodeType
B. nodeDataType
C. dataType
D. Type
Answer: C [Another data type related property is nodeTypedValue, allows accessing the content of the node]

Q6. Find out the parts which a qualified name is composed of.
A. Namespace Name
B. Local Name
C. Universal Name
D. Resource Name
Answer: A, B

Q7. ___________ in XML is a methodology for creating unique name in an XML document by identifying element names with
a unique external resource.
Find out the correct word for the blank.
A. Document rules
B. Schema Definitions
C. Namespaces
D. Parsers
Answer: C

Q8. Which one makes an XML element or attribute name universally unique?
A. A Document rule
B. A Schema Definition
C. A Namespace
D. An XML Parser
Answer: C

Q9. A qualified name in XML _________ an associated namespace name.


Which one is appropriate?
A. has
B. does not have
Answer: A

Q10. Where can you include a namespace declaration in an XML document?


A. In the prolog of the document
B. In Document Type Declaration
C. Directly within an element name
D. All of the above
Answer: A, C

Q11. How can you make namespace default?


A. Declaring a namespace with a prefix
B. Declaring a namespace without a prefix
C. Declaring a namespace with DEFAULT attribute having the value true
D. You can not make a namespace default.
Answer: B

Chapter 07: Linking with XML


Q1. What are the two basic methods for linking in HTML?
A. Anchor element
B. Href element
C. Src element
D. Link element
Answer: A, D [Anchor (<a> tag) is used for hyperlinking and Link element is used. See page 106]

Q2. Which vocabulary provides supports for building links into XML?
E. XSL
F. XPointer
G. XLink
H. XHTML
Answer: C

Q3. Simple links are ________ links?


Which one is correct?
A. inline
B. out-of-line
Answer: A

Q4. Which type of Link in XLink works as they same way as the HTML Links?
A. Simple Link
B. Extended Link
Answer: A

Q5. Which XML link mechanism allows linking only one resource?
A. Simple Link
B. Extended Link
Answer: A

Q6. Which of the following is or are the valid syntaxes of addressing XML link resource?
A. HREF=”uri?XPointer”
B. HREF=”uri#XPointer”
C. HREF=”uri|XPointer”
D. HREF=”uri!$XPointer”
Answer: B, C

Q7. Which attribute of an XML Link identifies the significance of the link to the application processing it?
A. TITLE
B. ROLE
C. SHOW
D. ACTUATE
Answer: B

Q8. Which attribute of an XML Link identifies how the link should be traversed?
A. TITLE
B. ROLE
C. SHOW
D. ACTUATE
Answer: C

Q9. Which attribute of an XML Link identifies how the link should be activated?
A. TITLE
B. ROLE
C. SHOW
D. ACTUATE
Answer: D

Q10. What are the permissible values of the SHOW of an XML Link element?
A. blank
B. new
C. embed
D. replace
Answer: B, C, D
Q11. If you want that the content of the target source should be inserted at the position of an XML Link in a source
document, what will be the value of the SHOW attribute?
A. blank
B. new
C. embed
D. replace
Answer: C

Q12. Which type of XML link can connect multiple resources?


A. Simple Link
B. Extended Link
Answer: B

Q13. Which of the following is or are true about extended link?


A. It can link multiple resources
B. It can link read-only resources
C. It allow filtering of relevant links
D. It can control how a resources will be created
Answer: A, B, C

Q14. Which type of link allows creating links in which the local resource is not the part of the link?
A. Inline-link
B. Out-of-line link
C. Simple link
D. Extended link
Answer: B

Q15. Which one provides a way to address the internal structure of an XML document?
A. XLink
B. XPath
C. XPointer
D. XSL
Answer: C

Q16. Which one in Pointer specifies a location in in the XML document tree?
A. Location group
B. Location term
C. Address term
D. Resource term
Answer: B

Chapter 08, 09: XSL


Q1. XSL is built around the ___________________ mechanism?
A. XML Link
B. style sheet
C. HTML
D. XHTML
Answer: B

Q2. Which of the following is or are true about XSL?


A. XSL is a formatting language built for XML
B. XSL uses a different syntax and notations from those used in XML
C. XSL’s structure and syntax are as those in XML
D. XSL is an application of XML
Answer: A, C, D [See page 124]

Q3. XSL is _________ of XML.


Which one fits best in the blank?
A. An application
B. A subset
C. A parser
D. A processor
Answer: A [It is not a subset of XML. It is built for particular purpose. It is specific markup language]
Q4. Which application of XML provides formatting information to the data in an XML document?
A. XLL
B. XSD
C. XSL
D. DTD
Answer: C

Q5. Which of the following is or are parts of XSL?


A. XSL transformation language
B. XPath expression
C. XPointer address
D. Formatting Object specification
Answer: A, D

Q6. Which of the following is or are not true?


A. XSL style rules for an XML document consist of only one template
B. XSL style rules for an XML document consist of one or more templates
C. Each template contains a pattern
D. XSL can produce HTML output
Answer: B, C, D

Q7. XML uses __________ to specify the XML element to which an XSL template applies?
A. XML DOM
B. XPointers
C. Patterns
D. Scripts
Answer: C

Q8. For a XSL Patterns Query to work, you specify a ______ in which it will operate.
Choose the write option for the blank.
A. context
B. root
C. node
D. tree
Answer: A

Q9. Which symbol is placed in front of an attribute name in an XPath pattern expression?
A. $
B. #
C. @
D. \
Answer: C

Q10. Find out the valid operators used in in XSL?


A. $EQ$
B. =
C. $NE$
D. !=
E. &LT&
F. &GT&
G. >
H. <
Answer: A, B, C, E, F
[It works only in Microsoft’s processors. W3C standard uses =, !=, &gt; for > , &lt; for <]

Q12. Which of the following is or are used in XSL for conditional processing?
A. xsl:if
B. xsl:select
C. xsl:choose
D. xsl:switch
Answer: A, C

Q13. Which of the following used to direct XSL processor to find the correct template to apply based on the pattern
specified?
A. xsl:apply
B. xsl:apply-templates
C. xsl:template
D. xsl:find
Answer: B

Q14. which one applies the same template to multiple nodes?


A. xsl:if
B. xsl:choose
C. xsl:for-each
D. xsl:loop
Answer: C

Q15. Which XSL element is used in conjunction with xsl:choose and xsl:when?
A. xsl:else
B. xsl:otherwise
C. xsl:default
D. xsl:none
Answer: B

Q17. Which XSL element evaluates an XSL pattern and returns the value of identified node as text?
A. xsl:value
B. xsl:value-of
C. xsl:get
D. xsl:of
Answer: B

Q18. Which extension XSL is built around filtering and addressing data XML document?
A. XSL patterns
B. XSL query
C. XSL template
D. XPointer
Answer: A

Q19. “XSL patterns query specify what should be found in XML document and how to find it”
Is this statement true?
A. Yes
B. No
Answer: B [XSL patterns query specify what should be found in XML document, NOT how to find it. See page 149]

Q20. Which symbol is used to separate the address elements in XSL patterns query?
A. \
B. /
C. ?
D. !
Answer: B

Q21. What is the Context in XSL patterns query?


A. The node or range of nodes on which the query will work
B. The node or range of nodes on which the query will exclude
C. The document on which the query will operate
D. The template for the XSL patterns query.
Answer: A

Q22. What are the subquery operators in XSL pattern query?


A. the curly braces pairs { }
B. the open an close brackets [ ]
C. the open and close parenthesis ( )
D. the quotes pair “ “
Answer: B

Q23.. What are the grouping operators in XSL pattern query?


A. the curly braces pairs { }
B. the open an close brackets [ ]
C. the open and close parenthesis ( )
D. the quotes pair “ “
Answer: C

Q24. XSL patterns query does not support numeric comparison.


Do you agree?
A. Yes
B. No
Answer: B [XSL patterns support numeric comparison]

Q25. Which one is short for case-insensitive less than or equal to operator in XSL patterns?
A. $le$
B. $ile$
C. $cle$
D. $gle&
Answer: B

Chapter 10: XML-Data


Q1. XML-Data is a language used to create a ______.
Which one the best option for the blank?
A. XML Link
B. Style rules for a document
C. Schema
D. Content
Answer: C

Q2. Which one is the correct about a schema?


A. It identifies the structure of a particular XML document
B. It identifies the structure and constraints of a particular XML document
C. It converts an XML document into a format for display
D. It is used to create links in XML document
Answer: B

Q3. Schema langue does not use XML syntax but DTD does .
Do you agree?
A. Yes
B. No
Answer: B [Reverse is true]

Q4. Which one must be the root element in an XML Schema document?
A. Schema
B. ElementType
C. AttributeType
D. Element
Answer: A

Q5. Which namespace you must associate with Schema element in an XML Schema document?
A. urn:microsoft-com:xml-data
B. urn:schemas-microsoft-com:xml-data
C. urn:schemas-microsoft-com:datatypes
D. http://www.w3.org/1999/XSD
Answer: B [C is used to import rich data types]

Q6. Which of the following is or are the top-level elements in an XML Schema document?
A. ElementType
B. AttributeType
C. element
D. attribute
Answer: A, B [ElementType and AttributeType are declared directly under Schema element. The element and attribute are
decalred within ElementType]

Q7. Which of the following is or are the local-level elements in an XML Schema document?
A. ElementType
B. AttributeType
C. element
D. attribute
Answer: B, C

Q8. Which one of the following is NOT the valid value of the content attribute in an XSML Schema document?
A. empty
B. any
C. textOnly
D. eltOnly
E. mixed
Answer: B

Q9. What are the possible values of order attribute of element type in XML-Data Schema Language?
A. seq
B. one
C. all
D. many
Answer: A, B, C, D

Q10. How can you specify the order in which the elements in the declaration can appear?
A. By using the type attribute in the element type declaration
B. By using the order attribute in the element type declaration
C. By using the sequence attribute in the element type declaration
D. You can not specify order
Answer: B

Q11. What does the value many of the order attribute in the element type declaration specify?
A. Elements must appear in the same order as they appear in element type declaration
B. one of the declared elements must appear in the parent element
C. All the element types declared must appear as a subelement, the subelements can appear in any order
D. Any of element types declared must appear as a subelement and in any order
Answer: D

Q12. How can you specify cardinality of elements in XSD?


A. Using special symbols - ?, +, *
B. Using minOccurs and maxOccurs attribute
C. The is no symbols or attributes; Elements can appear as many as many times as they are declared
D. You can not specify cardinality in XSD
Answer: B [DTD uses symbols; for reminder – cardinality means how many times an element can appear]

Q13. The default value for the both minOccurs and maxOccurs is ____.
Choose the correct one?
A. 0
B. 1
C. unspecified
D. unlimited
Answer: B

Q14. How many times an element can appear if both maxOccurs and minOccurs attributes are not specified.
A. 0 time
B. 1 time
C. Any number of time
D. These attributes must specified
Answer: B

Q15. You are creating an XML Schema document, which one is correctly sets the maxOccurs attribute to specify that the
element can appear any number of times?
A. maxOccurs=”unlimited”
B. maxOccurs=”any”
C. maxOccurs=”*”
D. maxOccurs=”?”
Answer: C [Don’t confuse with XSD, XSD uses unlimited]

Q16. How can you specify that the value for an attribute must be give?
A. By adding the optional attribute in attribute declaration and specifying its value no
B. By adding the required attribute in attribute declaration and specifying its value yes
C. By adding the optional attribute in attribute declaration and specifying its value false
D. By adding the required attribute in attribute declaration and specifying its value true
Answer: B

Q17. Consider the following attribute declaration


<attribute name=”inventory dt:type=”int” dt:min=”0” dt:max=”50” />
Now which of the following is or are true?
A. the attribute can contain the minimum value of 0
B. the attribute can contain the minimum value of 1
C. the attribute can contain the maximum value of 50
D. the attribute can contain the maximum value of 49
Answer: A, C [Values are inclusive]

Q18. Which one open content model?


A. It allows adding elements those are not declared
B. It does not allow adding elements those are not declared
Answer: A [B is closed content model]

Q19. Which one is the Open Content Model?


A. an element type declaration sets the content attribute to empty or textOnly
B. an element type declaration sets the content attribute to anything other than empty or textOnly
C. an element type declaration sets the content attribute to all
D. an element type declaration sets the content attribute many
Answer: B

Chapter 11: XML Today and Tomorrow


Q1. Which of the following is or are XML-based object persistence technology?
A. KMOL
B. XMOP
C. Coins
D. SMIL
Answer: A, B, C [KMOP (KOALA object markup language, XMOP (XML metadata object persistence) and Coins all are for
Java Language. C# has built-in XML serialization technique. XML serializer is XML-based serialization in .NET]

Q2. Which of the following can be used to insert into XML data into HTML document without creating an ActiveX Control?
Which one the best option for the blank?
A. XML DSO
B. XML Data Islands
C. XML-Data Schema Language
D. DTD
Answer: B

Q3. Which of the following is are the advantages of XML Data Islands over XML DSO?
A. You do not need a separate XML file
B. You do not need to load XML using scripting code
C. You do not need to create active control using object tag
D. XML data is independent of HTML page
Answer: A, B, C [D is not true for XML Data Islands. XML Data Islands make your XML data and HTML page more tightly
coupled. It is a disadvantage]

Q4. Which of the following is or are the valid attribute of XML element used for XML Data Islands
A. SRC
B. ASYNC
C. DATASRC
D. VAIDATEONPARSE
Answer: A, B, D

Q5. Which one is XML based technology for displaying TV-like multimedia over Internet?
A. SVG
B. SMIL
C. HTML+TIME
D. Flash
Answer: B [Flash can show animations but it is not XML based]
Q6. Which XML-based technology enables you to times effects on your web page?
A. SVG
B. SMIL
C. HTML+TIME
D. Flash
Answer: C

Q7. VML stands for _________.


A. Video Markup Language
B. Visual Markup Language
C. Vector Markup Language
D. Virtual Markup Language
Answer: C

Q8. Which of the following capability or capabilities DOM provides?


A. Define the logical structure of an HTML or XML document
B. Define how an XML or HTML document will be displayed
C. Define how an XML or HTML document is accessed and manipulated
D. Define the output structure of an XML or HTML document.
Answer: A, C

Q9. Consider the following two statements


Statement (I) DOM represents the semantics of the objects in the object model
Statement (II) DOM defines the semantics of an XML or HTML document.
Find correct options
A. Statement (I) is true
B. Statement (II) is true
C. Statement (I) is false
D. Statement (II) is false
Answer: A, D

Q10. How can cross-platform compatibility of XML occur?


A. If any platform implements XML according to the published standards by W3C
B. If any platform implements XML according to Microsoft Internet Explorer 5 implementations
C. XML has no cross-platform compatibility issue
D. Cross-platform compatibility of XML never occurs
Answer: A

Q11. Which of the following feature or feature for each object DOM provides?
A. the interfaces used to manipulate the object
B. the meaning of the object in relationship to the rest of the document
C. the collaboration between interfaces and objects
D. the naming rules to define object in a document
Answer: A, B, C

Chapter 12: Parsing XML


Q1. Which one is true about a validating parser?
A. It requires an XML document to be well-formed
B. It requires an XML document to be constructed according to the rules for defined DTD or Schema
C. It requires an XML document to be well-formed and also to be constructed according to the rules for defined DTD
or Schema
D. None of the above
Answer: C

Q2. Which one is a steam-based parser?


A. It reads an entire XML document and the application a tree like structure based on the elements in the XML
document
B. It reads an entire XML document and give the a collections of rows and columns based the elements in the XML
document
C. It reads through an XML document and signal the application every time new a component appears
D. It reads through an XML document and signal the application every time element appears but ignores attributes
Answer: C

Q3. Which one is a tree-based parser?


A. It reads an entire XML document and the application a tree like structure based on the elements in the XML
document
B. It reads an entire XML document and give the a collections of rows and columns based the elements in the XML
document
C. It reads through an XML document and signals the application every time new a component appears
D. It reads through an XML document and signals the application every time element appears but ignores attributes
Answer: A

Q4. Which one is the standard API for an application to communicate with a steam-based parser?
A. Document Object Model (DOM)
B. Simple API for XML (SAX)
C. XML Link Language (XLL)
D. XML Data Islands
Answer: B

Q5. Which one is the standard API for an application to communicate with a tree-based parser?
A. Document Object Model (DOM)
B. Simple API for XML (SAX)
C. XML Link Language (XLL)
D. XML Data Islands
Answer: A

Q6. Which is NOT a DOM interface?


A. XMLDocument
B. Document
C. Node
D. NodeList
Answer: A

Q7. _________ is an iterator for a list of Nodes in DOM API.


Which one is appropriate for the blank?
A. NodeCollection
B. NodeList
C. NodeGroup
D. NodeChildren
Answer: B

Q8. Which implementation should you choose for parsing a huge XML document?
A. SAX
B. DOM
Answer: A

Q9. Which implementation is faster than the other one?


A. DOM
B. SAX
Answer: B

Q10. Which implementation is suitable for complex searching in an XML document?


A. DOM
B. SAX
Answer: A

Chapter 13: Database Integration


Q1. Which Database Management System links records like a family tree where each record type has only one owner?
A. Hierarchical Database Management System
B. Relational Database Management System
C. Object-Oriented Database Management System
D. XML Database Management System
Answer: A

Q2. How redundancy is minimized in RDBMS?


A. Through the process of serialization
B. Through the process of normalization
C. Through the process of keying and referencing
D. Through the process of tuning
Answer: B

Q3. Which Database Management System allows storing and retrieving objects in addition to mere data?
A. Hierarchical Database Management System
B. Relational Database Management System
C. Object-Oriented Database Management System
D. XML Database Management System
Answer: C

Q4. What is a Data Model?


E. It represent actual Data in a Schema
F. It represents the storage mechanism for data
G. It represents the conceptual model of data structure
H. All of the above
Answer: C

Q5. Which type of XML Documents is designed for application-to-application data exchange?
A. Data-Centric
B. Document-centric
Answer: A
Q6. Which type of XML Documents generally contains a lot of mixed contents?
A. Data-Centric
B. Document-centric
Answer: B

Q7. Which one supports richer set of data types than the other one?
A. DTD
B. XSD
Answer: B

Q8. Which of the following is or are the ways of encoding binary data in XML?
A. Parsed Entities
B. Unparsed Entities
C. ASCII
D. Base64
Answer: B, D

Q9. Which of the following XSD element or elements can be used to create primary key constrains?
A. xsd:key
B. xsd:unique
C. xsd:keyref
D. xsd:primarykey
Answer: B [xsd:key is same as xsd:unique but allows null values]

Q10. Which of the following XSD element or elements can be used to create foreign key constrains?
A. xsd:key
B. xsd:unique
C. xsd:keyref
D. xsd:foreign
Answer: C

Q11. Which of the following XSD elements are used only in conjunction with xsd:key, xsd:unique or xsd;keyref?
A. xsd:selector
B. xsl:path
C. xsd:field
D. xsd:element
Answer: A, C