1. Trang chủ
  2. » Công Nghệ Thông Tin

Question Bank Core XML

47 652 4
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Tiêu đề Question Bank Core XML
Trường học University of Information Technology
Chuyên ngành Computer Science
Thể loại bài tập lớn
Thành phố Ho Chi Minh City
Định dạng
Số trang 47
Dung lượng 889 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

A Markup Language is defined as a set of rules adding some meaning to the content and structure of documents.

Trang 1

Question Bank

Core XML

1. A Markup Language is defined as a set of rules adding some meaning

b) Semantic Markup

5. HTML provides the advantage of creating customized tags making it

easier for the users to create their own tags

[0.5]

Trang 2

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

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

a) tree-based, fixed-length b) tree-based, fixed-length

Trang 3

13 The 'standalone' attribute can be set to [0.5]

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

Trang 4

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.

a) Root element can be

customized.

c) Root element describes the function of the document.

b) Root element is a pre-defined

Trang 5

24 Is the following code for commenting in XML valid?

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>

29 XML parsers support _ bit and _ bit Unicode encoding

corresponding to ASCII

[1.5]

Trang 6

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

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.

Trang 7

36 Attribute values must always be enclosed by double quotes [1.5]

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

Trang 8

41 Identify if the following code is correct?

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

45 End of a CDATA block is characterized by the character string [2.0]

Trang 9

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>

49 Child elements declared in a sequence need not appear in the

document in the same sequence

[0.5]

50 <!ELEMENT do(message+)>

The "+" sign indicates that the child element 'message' must occur at

least once inside the do element

Trang 10

54 An attribute which does not have to included is indicated by the value: [0.5]

Trang 11

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]

61 Consider a DTD example:

<!ATTLIST study type (theory|practical) theory>

Is the following statement syntactically correct?

[1.0]

62 The use of namespace in a document can be recognized using a

in the tag name

Trang 12

d) None of the above.

65 The DOCTYPE statement represents the DTD which is termed as [1.0]

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:

68 The keyword termed as the shorthand for mixed content containing all

declared elements is:

[1.0]

Trang 13

"show.dtd"?) d) <!DOCTYPE N1 SOURCE"show.dtd"?>

71 Writing an Internal DTD inside a DOCTYPE is known as: [1.5]

element-b) <!ELEMENT element-name

(element-content type)> d) <! ELEMENTcontent (element-name

element-type) >

a) #CDATA means that the

element contains data that is

c) #PCDATA means that the element contains data that

Trang 14

to be parsed by a parser is to be parsed by a

parser.

b) #PCDATA means that the

element contains character

data that is not to be parsed

(child-element-name;child-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+)>

d) None of the above

77 Identify the correct syntax: (One or more options are true) [1.5] a) <!ATTLIST element-name c) <!ATTLIST element-name

Trang 15

79 Namespaces ensure that there is no conflict within element names and

also determines how to process them

<!ELEMENT APTECH (CLASS1|CLASS2)+>

<!ELEMENT CLASS1 (#PCDATA)>

<!ATTLIST CLASS1

count CDATA #REQUIRED>

<!ELEMENT CLASS2 (#PCDATA)>

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 c) at least one 'target', exactly

Trang 16

one 'source', exactly one 'title',

zero or one 'message', and

some other parsed character

data

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

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

Trang 17

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

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]

Trang 18

91 In order to format an XML document we combine it with a [0.5]

94 Inheritance of a style is a property in which a style rule for an element

95 Identify the attribute applied to a property to give it precedence over

Trang 19

a) !priority c) !important

b) !urgent

96 The 'type' attribute in the <?xml-stylesheet?> processing instruction is

sent from one system to

another system without

modifying the content.

c) XML documents, which are not displayed to the users, do not require stylesheets.

b) One XML document can have

only one style sheet

d) XML does not support thecreation of customized tags

101 Assigning a style to a tag helps the user agent to interpret the data

following specific rules

[1.0]

Trang 20

a) True b) False

102 Selectors helping us to differentiate between different occurrences of

a tag are termed as

[1.0]

b) Multiple Selectors

103 In case of 3 style sheets containing a reference to the same element,

then identify the style sheet used

[1.0]

106 Even if all the border options are set using 'solid' as the border style

option will remove, or turn off all the borders [1.0]

Trang 21

107 Space between the border and its contents is done by using the

Trang 22

The code for the style sheet xsampdoc is given as:

What will be the output of the above code?

a) All The Best! will be displayed

in red with the specified size

as the output

c) The xml document will be displayed in the tree format

b) An error will be generated due

to the absence of quotes in the

2nd line of the xml document

113 In CSS, identification of a selector context is done by using a: [1.5]

[1.5]

a) a-5,b-1,c-2,d-4,e-3 c) a-1,b-3,c-2,d-5,e-4

b) a-4,b-3,c-5,d-1,e-2 d) a-5,b-1,c-2,d-3,e-4

Trang 23

116 Selectors allowing us to differentiate between different occurrences of

<extension> are termed as

118 When two values are specified for the margin then [1.5]

a) the first value is set as the

right and left margins

c) the first value is set as the

top and bottom margins

b) the first value is set as the

top and bottom margins d) the second value is set asthe top and bottom margins

119 To assign the same style rule to different elements, we apply the

same number of declarations as the number of elements to several

Trang 24

type="text/css" href="url"> css" href="url"?>

122 CSS understands _ number of colours defined by their names: [2.0]

127 In order to indicate to an application processing the style sheet to look

for <All> tags followed by<Perfect> tags the syntax is:

Trang 25

b) All.Perfect d) None of the above

128 Differentiating between the different occurrences of a tag is by: [2.0]

129 The logical structure of XML can be manipulated by XSL [0.5]

132 Sorting, filtering, pattern matching are few of the things that XSL

cannot be used for

[0.5]

the options stated

Trang 26

134 In XSL the sign that indicates that sorting takes place in the

136 The processing part in a template in XSL defines the way the styling is

to be applied to the child nodes

[0.5]

137 Normally for enclosing a generic term when defining code we use [0.5]

Trang 27

140 Instructions that control how an element and its content should be

converted in XSL style sheets, are called:

[0.5]

Trang 28

142 "/" in the beginning of the XSL declaration indicates that: [1.0]

a) this line is not to be

considered during execution

c) this node applies to the root level node of XML document

b) this node applies to the root

level node of XSL document

143 In XSL the different source elements are separated by a: [1.0]

144 We can create documents, which can switch styles without submitting

the file back to the server

148 Identify the correct tag for indicating that a document is a style sheet

file and provides a location for declaring the XSL namespace

[1.5]

Trang 29

xsl="url"?> d) <xsl=stylesheetxmlns:xsl="url">

149 Identify the operator used to search across any number of levels of

150 Identify the operator used to search across any number of levels of

the hierarchy from the root of the document

[1.5]

151 Identify the tag required to match the entire document [1.5]

a) <xsl:template= "*"> c) <xsl:template match= "/ |">

b) <xsl:template match= "/">

a) It lets one map a pattern in

the source document with

the output in XML.

c) It is a template-based language.

b) It prevents the transformation

Trang 30

153 XSLT and CSS are compatible standards [1.5]

154 Identify the statements which hold true for CSS: [1.5]

a) It permits reuse of document

data

c) It calculates quantities or

stores values in variables

b) It supports decision structures d) None of the above

156 The process of turning the result of an XSL transformation into a

suitable output form for a reader or listener is identified as:

[1.5]

b) Formatting

157 Match the following operators with their respective explanations:

levels of the hierarchy from the

current context

III)/ iii)refers to the attribute

levels of the hierarchy from the

root of the document

VI)@ vi)Explicitly use the current context

[2.0]

Trang 31

a)

I-v,II-vi,III-iv,IV-i,V-ii,VI-iii,VII-vii c) I-i,II-iii,III-ii,IV-vi,V-iv,VI-vii,VII-v

b) I-ii,II-i,III-iv,IV-vi,V-iii,VI-vii,VII-v d)

I-iii,II-vi,III-i,IV-iv,V-ii,VI-vii,VII-v

158 "*/*" this syntax used in XSL will search all the elements that are the

grandchildren of the root

[2.0]

Trang 32

159 Identify the elements, operators in XSL can be used with: [2.0]

b) XPath is a language to

define XML parts or patterns

161 XSL uses XSLT to transform an XML into an XML

_

[2.0]

162 Treating a document as an object, extracting information, making

changes and querying the document through code is termed as:

Trang 33

a) Component Model c) Object Model

165 Manipulating the XML document through DOM does not require any

166 'parseError' is identified as a method due to which if an error is

a) the document is loaded but

the text is not displayed

b) the document is not loaded

167 The root nodes can make multiple appearances in the document [0.5]

168 The 'appendChild()' method of the DOMDocument Object adds: [0.5]

a) a new Child Element c) a new sub node

b) a new node

169 The 'readyState' property in the DOMDocument Object defines

several states that specify the current status of the asynchronous

download

[0.5]

170 The property 'nextSibling' in DOMDocument Object contains the next

node of the previous nodes in the parent's child list [0.5]

Trang 34

171 The 'xml' property always returns a UNICODE string [0.5]

b) Write

173 The 'nextNode' method in the XMLDOMNodeLis Object returns a

NULL value if there is no next node

c) Even if an application does

not support DOM, it does notmatter and the program can

be written in VB, C or Java

b) DOM intends to provide

programmers with an object

model that will allow

programs and scripts to

access and update the

content of documents in a

standard way.

175 A model applied to dynamic documents is known as: [1.0]

Trang 35

176 A model applied to static document objects is: [1.0]

177 In a tree model wherein we take the example of a book in which the

chapters and paragraphs correspond to an individual character in the

document These are termed as:

[1.0]

b) child-nodes

178 Considering a linear model applied to a book the only disadvantage

that occurs is that if the book is revised and the page number and line

number of the topic changes the model fails to work

Is the statement a valid statement?

[1.0]

179 The model which is identified as a collection of objects used to access

and manipulate data stored in an XML document is an:

181 A lot of properties and methods are repeated in each of the DOM

objects as they inherit the XMLDOMNode object [1.0]

Ngày đăng: 09/04/2013, 09:10

TỪ KHÓA LIÊN QUAN

w