XML (Solved/Unsolved) : Question Bank
XML (Solved/Unsolved) : Question Bank
1. With XML, you can create your own elements , also called tags.
2. The beginning or first element in XML is called the root (document) element.
3. Jon Bosak is known as the father of XML.
4. HTML is an application of SGML _.
5. The XML linking language is called XLink .
6. The CSS property font-weight allows you to control text boldness.
7. A child element has a direct relationship to a parent element.
8. A [prefix with] colon in an element or attribute name must be associated with a namespace
identifier.
9. An attribute modifies an element by associating information with it.
10. Element names are case sensitive.
11. External DTDs can reference both SYSTEM and PUBLIC identifiers.
12. A valid XML document has a DTD associated with it.
13. An XML document can have both an internal and external subset.
14. <!ATTLIST ...> declares one or more attributes .
15. A content model defines what elements may be contained within another element.
16. Element names must begin with a letter or an underscore .
17.An empty element contains no content.
18. A ? repetition operator mean zero or one instance of the element.
19. Content models are defined with either a sequence list or a choice list.
20. In the functional notation rgb( ), you can use numbers or percentages
21. Attribute names must begin with a letter or underscore.
22. The keyword for an optional attribute is #IMPLIED .
23. The ID attribute type defines an attribute value as a unique identifier.
24. The xml:lang attribute is a built-in XML attribute for specifying languages.
25. A NOTATION declaration is needed for this type of enumerated attribute..
26. An internal entity is declared locally in a DTD while an external entity is declared in a
separate document.
27. A parameter entity is legal only in a DTD.
28. A general entity reference begins with an ampersand (&) and ends with a semicolon.
29. Any parsed entity consists of legal XML text.
30. One tool you can use to test a DTD is with a conditional section.
31. A namespace definition without a prefix is known as a default namespace.
32. Namespaces are declared with an xmlns declaration in an element start-tag.
33. The namespace myth refers to a belief that namespaces are associated with, or validated by,
schemas.
34. You can declare multiple namespaces with multiple instances of the xmlns
declaration within a start-tag.
35. Namespaces are often declared within the start-tag of a root element.
36. Unnamed definitions of simple or complex types are known as anonymous .
37. With <complexType>, you can define content of both complex and mixed type.
38. minOccurs specifies the minimum times an element may occur while maxOccurs
determines the maximum times it may occur
39. The ref attribute can reference other element and attribute definitions in a schema.
Page 1 of 1
40. The <attribute> element must be declared with either a named or anonymous complexType
41. The original XML document or byte stream is referred to as a source tree and the output is called
the result tree.
42. Location paths can be either abbreviated or unabbreviated .
43. A synonym for <xsl:stylesheet> is <xsl:transform> .
44. The instruction <xsl:element> is an example of an XSLT element.
45. Both <xsl:if> and <xsl:choose> help perform conditional processing.
46. The root element for XHTML is html .
47. The root element must contain a namespace declaration.
48. In XHTML, always use a CDATA section inside the <script> element.
49. The forthcoming recommendation for small devices is called XHTML Basic .
50. Document profiles defines the elements, etc. that are appropriate for a certain class of
document, without a formal recommendation.
Page 2 of 2
2. What is the correct syntax of the declaration which defines the XML version?:
1. <xml version="1.0" />
2. <?xml version="1.0"?>
3. <?xml version="1.0" />
4. None of the above
Level: Easy
Page 3 of 3
Level: Easy
8. Comment in XML document is given by
1. <?-- -->
2. <!-- --!>
3. <!-- -->
4. </-- -- >
Level: Easy
Page 4 of 4
3. XMLElement#123
4. All
Level: Easy
Page 5 of 5
Topic: DTD
18. There is a way of describing XML data, how?
1. XML uses a DTD to describe the data
2. XML uses XSL to describe data
3. XML uses a description node to describe data
4. Both 1and 3
Level: Medium
Page 6 of 6
28. In XML
(1) the internal DTD subset is read before the external DTD
(2) the external DTD subset is read before the internal DTD
(3) there is no external type of DTD
(4) there is no internal type of DTD
Level Easy
Page 7 of 7
31. To add the attribute named Type to the <customer> tag the syntax will be
(1) <customer attribute Type=”exelent”>
(2) <customer Type attribute =”exelent”>
(3) <customer Type attribute_type=”exelent”>
(4) <customer Type=”exelent”>
Level: Medium
34. The default model for complex type, in XML schemas for element is
1. textOnly
2. elementOnly
3. no default type
4. both 1 & 2
Level: Medium
35. Microsoft XML Schema Data types for Hexadecimal digits representating octates
1. UID
2. UXID
3. UUID
Page 8 of 8
4. XXID
Level: Medium
39. In simple Type Built into XML schema Boolean type holds
(1) True, False
(2) 1,0
(3) both (1) & (2)
(4) True/False and any number except 0
Level: Medium
40. In simple type built into XML schema type flat has single precision of
floating point
(1) 16 bit
(2) 32 bit
(3) 8 bit
(4) 4 bit
Level: Medium
Topic: Misc.
Page 9 of 9
1. Entity
2. Entity Reference
3. Comment Reference
4. Comment Data
Level: Medium
Page 10 of 10
(2) DATAFIELD
(3) DATASRC
(4) DATAFLD
Level: Medium
48. To bind the HTML element <INPUT> Type in text with the datasource “dsoCustomer” we
use
(1) <INPUT TYPE=”TEXT” DATAFIELD=”#dsoCustomer”>
(2) <INPUT TYPE=”TEXT” DATASRC=”dsoCustomer”>
(3) <INPUT TYPE=”TEXT” DATASRC=”#dsoCustomer”>
(4) <INPUT TYPE=”TEXT” DATAFLD=”#dsoCustomer”>
Level: Medium
49. XML DSOs has the property for the number of pages of data the recordset contains
(1) count
(2) number
(3) pageCount
(4) pageNumber
Level: Medium
Page 11 of 11
Topic: Templates
55. To match the root node in XMLT transform the syntax will be
1. <xsl:template match=”Document”>
2. <xsl:template match=”Root”>
3. <xsl:template match=”RootNode”>
4. <xsl:template match=”/”>
Level: Medium
56. To match the specific XML elements child like <NAME> of parent element is <PLANET> the syntax will
be
1. <xsl:template match=”PLANET_NAME”>
2. <xsl:template match=”PLANET/NAME”>
3. <xsl:template match=”/NAME”>
4. <xsl:template match=”//”>
Level: Medium
Page 12 of 12
Ans: ( c)
Topic: XSL
60. The XSL formating object use to format a list is
1. list-block
2. list-item
3. list-item-body
4. list-item-label
Level: Difficult
62. Identify the most accurate statement about the application of XML:
1. XML must be used to produce XML and HTML output.
2. XML cannot specify or contain presentation information.
3. XML is used to describe hierarchically organized information.
4. XML performs the conversion of information between different e-business
applications.
Level: Difficult
63. The XSl formatting object which formats the data and caption of a table is
(1) table
(2) table-content
(3) table-text
(4) none of the above
Level: Difficult
64. The XSL formating object which holds the content of the table body
(1) table
(2) table-body
(3) table-content
(4) table-footer
Level: Difficult
65. The XSL formatting object which formats the data in a table
(1) table
(2) table-body
(3) title
(4) table-content
Level: Difficult
Page 13 of 13
66. The XSL formating object use to hold the content of the label of a list item is
(1) list-block
(2) list item
(3) list-item-body
(4) list-item-label
Level: Difficult
67. The XSL formating object use to hold the contents of the body of a list item is
(1) list-block
(2) list item
(3) list-item-body
(4) list-item-label
Level: Difficult
70. The syntax for writing the minimum occurrence for an element is
(1) <xsd:element ref=”note” min=”0”/>
(2) <xsd:elements ref=”note” min=”0”/>
(3) <xsd:elements ref=”note” minOccur=”0”/>
(4) <xsd:elements ref=”note” minOccurs=”0”/>
Level: Medium
Page 14 of 14
2. the input and output of the XSLT processor must be a hierarchical tree
representing an XML document
3. the XSLT processor must be called from a web agent
4. the XSLT processor must be given the DTD as well as the XML document
instance
Level: Difficult
74. Which statement correctly describes the capabilities of the XSLT language?
1. XSLT uses the DTD to determine how XML documents will be translated
2. XSLT specifies how a hierarchical trees, representable by an XML document
may be translated into non-hierarchical formats
3. XSLT specifies how a hierarchical tree, representable by an XML
document, may be translated into another hierarchical tree, also
representable by an XML document
4. XSLT specifies the formatting style to be used to render an XML document
Level: Difficult
76. The transformation of XML document in to another type of document by XSLT can be done
by
(i)In the server
(ii)In the client
(iii) With a separate program
Page 15 of 15
77: To match the root node in XMLT transform the syntax will be
(1) <xsl:template match=”Document”>
(2) <xsl:template match=”Root”>
(3) <xsl:template match=”RootNode”>
(4) <xsl:template match=”/”>
Level: Difficult
78: To match the specific XML elements in XMLT the syntax for given name “rootnode” is
(1) <xsl:template match=”root”>
(2) <xsl:template match=”/”>
(3) <xsl:template match=”rootnode”>
(4) <xsl:template match=”//”>
Level: Difficult
79 To match the specific XML elements child like <NAME> of parent element is <PLANET>
the syntax will be
(1) <xsl:template match=”PLANET_NAME”>
(2) <xsl:template match=”PLANET/NAME”>
(3) <xsl:template match=”/NAME”>
(4) <xsl:template match=”//”>
Level: Difficult
80. InXSLT style sheet we have syntax to match elements with id as (if id is “change”)
(1) <xsl:template match=”id(‘change’)”>
(2) <xsl:template match=”(change)”>
(3) <xsl:template match=”change”>
(4) <xsl:template match-id=”Change”>
Level: Difficult
81. To match the text node (in XSLT) the syntax will be
(1) <xsl:template match=”text”>
(2) <xsl:template match-text=”text”>
(3) <xsl:template match=text( )>
(4) <xsl:template match=”text( )”>
Level: Difficult
Page 16 of 16
Level: Easy
84: Which of the following specify that the order and content of "membership" is not important
1. <!ELEMENT membership NORULE>
2. <!ELEMENT membership EMPTY>
3. <!ELEMENT membership ALL>
4. <!ELEMENT membership ANY>
Level: Easy
85: Which of the following is used to specify the attribute list of an element
1. ATTLIST
2. ?ATTLIST
3. !ATTLIST
4. #ATTLIST
Level: Medium
86: Which of the following instruct the browser which stylesheet to use
1. <xml-stylesheet type="text/xsl" href="cd.xsl">
2. <xml-stylesheet type="text/xsl" xsl="cd.xsl">
3. <?xml-stylesheet type="text/xsl" href="cd.xsl"?>
4. <?xml-stylesheet type="text/xsl" xsl="cd.xsl"?>
Level: Difficult
88: Which of the following XSLT Patterns is used to match any descendant nodes
1) /
2) //
3) .
4) ..
Level: Medium
89: Which of the following XSLT Patterns is used to match the parent node
1) /
2) //
3) .
4) ..
Level: Medium
Page 17 of 17
Page 18 of 18
97. If a namespace is attached to an element by prefix, what is the effect on non-prefixed child
elements
1. Nothing
2. The namespace affects the immediate nonprefixed child elements, but no others
3. The namespace affects all child elements of the element to which the namespace is
attached no matter what level.
4. None of the above
Level:Difficult
Page 19 of 19
1.
2.
e. XML declaration
f. empty
c 6. Document Type Definition
element
3.
d 1. Document type declaration a. PCDATA
e 2. Children of a parent element b. CDATA section
f 3. Element declaration c. <
c 4. Built-in XML entity d. <!DOCTYPE…
a 5. Parsed character data e. siblings
Page 20 of 20
4.
C 1. CSS visibility property a. base16
d 2. generic font name b. rgb(0,0,0)
f 3. zero or more instance repetition operator c. hidden
b 4. functional notation d. sans-serif
a 5. Hexadecimal e. or
e 6. Vertical bar (|) f. asterisk (*)
5.
6.
d 1. unparsed entity a. A
Page 21 of 21
7.
e 1. urn:wyeast-comm:db a. #FIXED
c 4. http://wyeast.net/tack d. attribute
b 5. db: e. URN
8.
d 1. XML Schema predecessor a. simple type
c 2. part of an annotation b. decimal
e 3. immediate child of <schema> c. <appinfo>
b 4. a built-in datatype d. DTD
a 5. no attributes, other elements as content e. global
9.
1. instructions for transforming an XML
D a. @*
document
e 2. formats XML documents b. XSLT
b 3. transforms XML documents c. <xsl:text>
Page 22 of 22
10.
c 1. Marriage of XML and HTML a. whitespace
b. XHTML
e 2. Contains deprecated elements and attributes
namespace
3. All XHTML elements and attributes must be
d c. XHTML
in this form
Page 23 of 23