Tải bản đầy đủ (.doc) (47 trang)

Question Bank Core XML

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (194.82 KB, 47 trang )

Question Bank
Core XML
1. A Markup Language is defined as a set of rules adding some meaning
to the content and structure of documents.
[0.5]
a) True b) False
2. Document Content is determined by [0.5]
a) Stylistic Markup c) Structural Markup
b) Semantic Markup
3. Document Structure is determined by [0.5]
a) Stylistic Markup c) Structural Markup
b) Semantic Markup
4. ________ is a very powerful language and the mother of all markup
languages.
[0.5]
a) GML c) SGML
b) CGML d) HTML
5. HTML provides the advantage of creating customized tags making it
easier for the users to create their own tags.
[0.5]
a) True b) False
6. Data in HTML cannot be structured. [0.5]
a) True b) False
7. HTML linking is one to one and is hardcoded in the HTML file. This
indicates that HTML has a robust linking mechanism which is an
advantage of using HTML.
[0.5]
a) True b) False
8. XML is a Meta-Language.
Select the option which best describes the statement given above.
[0.5]


a) A language in a language. c) Describes other
languages.
b) An application of SGML.
9. XML data can be embedded in HTML. [0.5]
a) True b) False
10. In a 3-tier model identify the front-end, middle-tier and back-end [0.5]
a) Browser, Database Server,
WebServer
c) Browser, WebServer,
Database Server
b) WebServer, Browser,
Database Server
11. The __________ structure of XML is much more powerful than
_________ data formats.
[0.5]
a) tree-based, fixed-length b) tree-based, fixed-length
12. IE5 has an inbuilt XML Parser called [0.5]
a) GSXML c) UXML
b) MSXML
13. The 'standalone' attribute can be set to [0.5]
a) Yes/No b) True/False
14. XML allows creation of multiple root elements [0.5]
a) True b) False
15. Primary requirements of an interoperable system were: [1.0]
a) Specific rules were created
for the format of the
document.
c) Common format should be
specific to their domains.
b) The document processing

programs should support
different document formats.
d) The document processing
programs should support a
common document format.
16. Logical structure of data can be interpreted and used in many ways by
various applications due to XML tags.
[1.0]
a) True b) False
17. Using DTD, _________ parser checks for validity. [1.0]
a) Non-Validating b) Validating
18. Markup includes [1.0]
a) Comments c) References
b) Instructions d) All of the above
c) DTD's
19. All processing instructions begin and end with [1.0]
a) <? ... ?> c) <? ... \>
b) <\ ... \> d) <\ ... ?>
20. Assume <BODY> is used as the root element in an XML document.
This indicates that
[1.0]
a) Root element can be
customized.
c) Root element describes
the function of the
document.
b) Root element is a pre-defined
tag.
21. Tags can begin with [1.0]
a) a colon d) a period

b) an underscore e) All of the above
c) a number
22. <xml> and <_Name> - Identify whether the following tags are valid or
invalid
[1.0]
a) Valid, Valid c) Invalid, Valid
b) Valid, Invalid d) Invalid, Invalid
23. Length of XML tag is dependent on the processor. [1.0]
a) True b) False
24. Is the following code for commenting in XML valid?
<!-- Comment1 <!-- Comment2 --> -->
[1.0]
a) Valid b) Invalid
25. XML declaration is also a processing instruction. [1.0]
a) True b) False
26. Height="8" Weight="70">
Here 8 and 70 when used outside XML Environment, they are taken as
[1.0]
a) Strings c) Characters
b) Values
27. To describe data XML uses a _________ [1.0]
a) Document Type Definition c) Data Type Description
b) Data Type Definition d) Dynamic Type Definition
28. Which of these is not a correct name for an XML element? [1.0]
a) <first name> c) <age>
b) <NAME> d) All 3 names are incorrect.
29. XML parsers support ___ bit and ___ bit Unicode encoding
corresponding to ASCII.
[1.5]
a) 4 c) 12

b) 8 d) 16
30. Which of the following statements is true? [1.5]
a) All XML elements must be
lower case.
c) All XML elements must
have a closing tag.
b) All XML documents must have
a DTD.
d) All the above statements are
true.
31. Syntax for an XML declaration is
a) </xml version="1.0"?> c) <?xml version="1.0"/>
b) <\xml version=:"1.0"?> d) <?xml version="1.0"?>
32. WML for handheld devices is written in XML. [1.5]
a) True b) False
33. Elements inside the root are termed as child elements. [1.5]
a) True b) False
34. Which of the following statement/s are true? [1.5]
a) XML elements must be
properly nested.
c) XML tags are case sensitive.
b) XML documents must have a
root tag.
d) All the above statements
are true.
35. XML elements cannot be empty.
a) True b) False
36. Attribute values must always be enclosed by double quotes. [1.5]
a) True b) False
37. Difference between XML and HTML [2.0]

a)* XML was designed to
describe data and focus on
what data is.
c) XML was designed to
display data and focus on
how data looks.
b) HTML was designed to
display data and focus on
how data looks
d) HTML was designed to
describe data and focus on
what data is.
38. Identify if the following XML document code is valid.
<?xml version="1.0"?>
<note>
<to>Joe</to>
<from>John</from>
<heading>Reminder</heading>
<body>Dont forget me this weekend!</body>
</note>
[2.0]
a) Valid b) Invalid
39. Identify if the following XML document code is valid.
<?xml version="1.0"?>
<to>Joe</to>
<from>John</from>
<heading>Reminder</heading>
<body>Dont forget me this weekend!</body>
[2.0]
a) Valid b) Invalid

40. XML provides a software and hardware independent way of sharing
data.
[2.0]
a) True b) False
41. Identify if the following code is correct?

<b><i>This text is bold and italic</b></i>
[2.0]
a) Correct b) Incorrect
42. Identify the line/s containing an error
1)<?xml version="1.0"?>
2)<note date=12/11/99>
3)<to>Ravi</to>
4)<from>Amit</from>
5)<heading>Reminder</heading>
6)<body>Make good food please</body>
7)</note>
[2.0]
a) Line 1 c) Line 3
b) Line 2 d) Line 5
43. Match the correct entity names with the respective characters
a) &amp; 1) <
b) &gt; 2) '
c) &quot; 3) >
d) &lt; 4) "
e) &apos; 5) &
[2.0]
a) a-4 ,b-3 ,c-2 ,d-5 ,e-1 c) a-3 ,b-2 ,c-1 ,d-4 ,e-5
b) a-5 ,b-3 ,c-4 ,d-1 ,e-2 d) a-1 ,b-2 ,c-5 ,d-4 ,e-3
44. CDATA is text that will be parsed by parser. Identify whether the

statement is valid.
a) Valid b) Not Valid
45. End of a CDATA block is characterized by the character string [2.0]
a) ':' c) '))'
b) ';' d) ']]'
46. XML documents referencing the DTD will contain the __________
declaration which specifies the location of an external DTD.
[0.5]
a) <!ENTITYTYPE> c) <!DOCTYPE>
b) <!FILETYPE> d) <!ENTITY>
47. External DTD is referenced at the beginning of the XML file. [0.5]
a) True b) False
48. ANY indicates that an element can contain only one child element of
character data.
[0.5]
a) True b) False
49. Child elements declared in a sequence need not appear in the
document in the same sequence.
[0.5]
a) True b) False
50. <!ELEMENT do(message+)>
The "+" sign indicates that the child element 'message' must occur at
least once inside the do element.
[0.5]
a) True b) False
51. An attribute is another name for stating property of an element. [0.5]
a) True b) False
52. In DTD, XML element attributes are declared with a/an _________
declaration.
[0.5]

a) ENTITY c) ELEMENT
b) ATTLIST d) DOCTYPE
53. 'NMTOKENS' [0.5]
a) The value is a list of other ids c) The value is a list of valid
XML names.
b) The value is a list of other
entities.
d) The value is the name of a
notation.
54. An attribute which does not have to included is indicated by the value: [0.5]
a) #DEFAULT value c) #IMPLIED
b) #REQUIRED d) #FIXED value
55. The width attribute has a default value of 1. [0.5]
a) True b) False
56. Documents that follow the XML tag rules, but don't have a DTD are
well-formed documents.
[0.5]
a) True b) False
57. URL includes URI and URN. [0.5]
a) True b) False
58. Internal DTD and XML code are stored in a document with the file
extension
[1.0]
a) .xml c) .xms
b) .dtd d) .css
59. Verify the snippet given below:
<?xml version="1.0" ?>
<img src=bullet_d.gif></img
[1.0]
a) True b) False

60. <!ELEMENT element-name (child-name )>
Identify the sign to be placed in the syntax above so that it declares
that the child name
can occur zero or one time inside the element.
[1.0]
a) + c) ?
b) * d) #
61. Consider a DTD example:
<!ATTLIST study type (theory|practical) theory>
Is the following statement syntactically correct?
[1.0]
a) Yes b) No
62. The use of namespace in a document can be recognized using a
______ in the tag name.
[1.0]
a) semi-colon d) period
b) colon e) hash
c) comma
63. For elements in the XSL namespace, XSL uses the prefix [1.0]
a) 'xsl:' c) 'xsl;'
b) 'xsl.' d) 'xsl?'
64. Identify the correct statements [1.0]
a) DTD is defined in an XML
markup language.
c) Documents need not
conform to the specified
structure of the DTD.
b) DTD does not have its own
syntax.
d) None of the above.

65. The DOCTYPE statement represents the DTD which is termed as [1.0]
a) Data Type Declaration c) Document Type
Declaration
b) Data Type Definition d) Document Type Definition
66. <!-- WELCOME.xml -->
<?xml version = "1.0"?>
<!DOCTYPE WELCOME SYSTEM "hello.dtd">
The following code indicates that the DTD is:
[1.0]
a) An internal DTD c) None of the above
b) An external DTD
67. DTD helps define the legal building blocks of an XML document. [1.0]
a) True b) False
68. The keyword termed as the shorthand for mixed content containing all
declared elements is:
[1.0]
a) #CDATA c) ANY
b) #PCDATA
69. URI may contain characters that are illegal in XML names. [1.0]
a) True b) False
70. Syntax for declaring an external DTD to an XML document is: [1.5]
a) <!DOCTYPE N1 TARGET
"show.dtd">
c) <!DOCTYPE N1 SYSTEM
"show.dtd">
b) (?DOCTYPE N1 SYSTEM
"show.dtd"?)
d) <!DOCTYPE N1 SOURCE
"show.dtd"?>
71. Writing an Internal DTD inside a DOCTYPE is known as: [1.5]

a) Declaration c) Wrapping
b) Sequencing
72. Syntax for element declaration is [1.5]
a) <!ELEMENT element-content
(element-name type)>
c) <?ELEMENT element-
content (element-name
type)?>
b) <!ELEMENT element-name
(element-content type)>
d) <!--ELEMENT element-
content (element-name
type)-->
73. Identify the correct statements [1.5]
a) #CDATA means that the c) #PCDATA means that the
element contains data that is
to be parsed by a parser.
element contains data that
is to be parsed by a
parser.
b) #PCDATA means that the
element contains character
data that is not to be parsed
by a parser.
d) #CDATA means that the
element contains
character data that is not
to be parsed by a parser.
74. Identify the correct syntax [1.5]
a) <!ELEMENT element-name

(child-element-name),(child-
element-name),....>
c) <!ELEMENT element-name
(child-element-name,child-
element-name,....>
b) <!ELEMENT element-name
(child-element-name);(child-
element-name);....>
d) <!ELEMENT element-name
(child-element-name;child-
element-name;....>
75. For declaring a child element 'message' to occur zero or more times
inside the 'note' element, identify the correct syntax
a) <!ELEMENT element-name
(child-name+)>
c) <!ELEMENT element-name
(child-name*)>
b) <!ELEMENT element-name
(child-name?)>
d) <!ELEMENT element-name
(child-name+)>
76. <!ELEMENT A((B,C)|D|E)>
Identify what the statement indicates
[1.5]
a) Element A consists of B or C
and D and E.
c) Element A consists of B and
C followed by D and then by
E.
b) Element A consists D or E

or B followed by C.
d) None of the above
77. Identify the correct syntax: (One or more options are true) [1.5]
a) <!ATTLIST element-name
attribute-name CDATA
"default-value">
c) <!ATTLIST element-name
attribute-name attribute-
type #FIXED "value">
b) <!ATTLIST element-name
attribute-name attribute-type
#IMPLIED>
d) <!ATTLIST element-name
attribute-name attribute-type
#REQUIRED "value">
78. In the attribute-type the value which is pre-defined is indicated by: [1.5]
a) IDREF c) ENTITY
b) Async d) xml;
79. Namespaces ensure that there is no conflict within element names and
also determines how to process them.
[1.5]
a) True b) False
80. <?xml version="1.0" ?>
<!DOCTYPE APTECH
[
<!ELEMENT APTECH (CLASS1|CLASS2)+>
<!ELEMENT CLASS1 (#PCDATA)>
<!ATTLIST CLASS1
count CDATA #REQUIRED>
<!ELEMENT CLASS2 (#PCDATA)>

<!ATTLIST CLASS2
count CDATA #REQUIRED>
]>
<TRIAL>ELECTRONIC GOODS
<CLASS1 count="8">10students</CLASS1>
<CLASS2 count="10">20students</CLASS2>
</TRIAL>
The following code will execute without displaying any errors?
[2.0]
a) True b) False
81. <!ELEMENT trial (targets+, source,title+,message*,#PCDATA)>
The above example declares that the element trial must contain:
[2.0]
a) exactly one 'target', at least
one 'source', exactly one 'title',
zero or one 'message', and
some other parsed character
data.
c) at least one 'target', exactly
one 'source', at least one
'title', zero or one
'message', and some other
parsed character data.
b) exactly one 'target', at least
one 'source', exactly one 'title',
not less than one 'message',
and some other parsed
character data.
82. <?xml version="1.0"?>
<script>

<![CDATA[
function matchwo(a,b)
{
if (a < b && a < 0) then
{
return 1
}
}
]]>
</script>
The above code:
a) Generates an error b) Executes without any error
83. (eval|eval|___) the following value indicates that [2.0]
a) The value is a character data. c) The value is the name of a
notation.
b) The value is a list of entities. d) None of the above.
84. <!ELEMENT Circle EMPTY>
<!ATTLIST Circle radius CDATA "20">
The following code indicates that the circle is defined as an empty
element,with the radius attribute having a default value of 20 and type
CDATA.
a) True b) False
85. Identify the correct statements: [2.0]
a) The DTD contains the list of
tags allowed within the XML
documents and their type
and attributes.
c) Namespaces allow us to be
able to identify, which
elements or attributes

come from which source
and also to access further
materials such as a DTD or
other description of the
elements and attributes.
b) A DTD comes in the form of
a simple file text file, which
can be stored in a separate
file or embedded within the
XML file.
86. Prefix is: [2.0]
a) a namespace c) An alias selected by a
document author
b) An alias selected by the
document user
d) Both a and b
87. Identify the correct statements: [2.0]
a) Tags from multiple
namespaces can be mixed.
c) XSL uses the prefix ‘xsl:’
for elements in the XSL
namespace
b) With namespaces, 2 elements
can exist in the same xml-
based document instance and
also refer to the same schema
88. XML vocabulary is used for specifying formatting semantics. [0.5]
a) True b) False
89. XSLT is used to convert documents written in one XML DTD, into
another DTD.

[0.5]
a) True b) False
90. XML documents can be formatted using text editors. [0.5]
a) True b) False
91. In order to format an XML document we combine it with a [0.5]
a) Text editor b) Style sheet
92. Identify the correct statements [0.5]
a) CSS is an extension of
HTML
c) XSL is an extension of
HTML.
b) CSS is an extension of XML. d) XSL is an extension of
XML
93. It is possible to have a property with multiple values [0.5]
a) True b) False
94. Inheritance of a style is a property in which a style rule for an element
also applies to the element it contains.
[0.5]
a) True b) False

Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Tải bản đầy đủ ngay
×