Sie sind auf Seite 1von 7

ACCP I10 SEMESTER 2

XML Simplified
MODULAR QUIZ
FOR
Module 3_4 DTDs. XML Schema.

Module 3 DTDs

1...A DTD is an XML document
True|False

2...DTDs contain declarations for elements and entities.
True|False

3...DTDs are used to validate XML documents,
True|False

4...Each XML document can be represented as a tree structure,
True|False

5...Ability to create one's own tags is XML's greatest disadvantage
True|False

6...DTDs are made up of three blocks of declarations and the DOCTYPE declaration
True|False

7....Elements, attributes and entities can be declared in any order.
True|False

8...DOCTYPE declarations are specified in the prolog of the XML document,
True|False

9...Internal DTDs specify the DTD within square brackets in the declaration itself,
True|False

10...External DTDs use the keyword URL to specify the location of the DTD
True|False

11...Match


A...Element can contain character data but to be parsed, in case it contains entity
references.
B...Element with a number of children appearing only once in the XML document.
C...Elemet can accept either data type or children, etc,
D...Element's children appear at least once in the XML document,
E...Element can have either one of two or more children,


1...<!ELEMENT element-name (type | child -name !...)>
2..<!ELEMENT element-name (child-name+)>
3...<!ELEMENT element-name (child-name, (child-name | child-name)...) >
4...<!ELEMENT element-name (#PCDATA)>
5...<!ELEMENT element-name (child-element-name) >

A-4 , B-5, C-1, D-2, E-3

12...Match

A...Name of a notation.
B..Predefined xml value.
C...id of another element.

D...valid XML name
E...enumerated list.
1...NMTOKEN
2...NOTATION
3...(en1|en2|..)
4...xml:
5...IDREF

A-2, B-4 , C-5, D-1, E-3


II. Module 4 XML Shema.

1...An XML Schema defines the structure of an XML document
True|False

2...An XML Schema is an XML-based add-on to DTDs.
True|False

3...XML syntax is used as the basis to create a schema, so it can be stored with the same
extension .xml (dot XML).
True|False

4...An XML Schema defines how many child elements can appear in an XML document,
True|False

5...An XML Schema defines whether an element is empty or can include text
True|False

6...Can you match the different features for DTD and schemas against their correspoding
description?

A...Allows to define own named data type from pre-existing data types,
B...Allows the schema author to make the attributes common that apply to all elements,
or several attributes that include graphic or table elements.
C...Describes elements which are not required to be present in the XML document.
D...Describes only those elements and attributes that may appear in the content of the
element,
E...Allows to validate documents that use markup from multiple namespaces,
Select
E..Namespace support
A...Archetypes
C...Open model
D...Closed model
B..Attribute grouping

7...Can you match the xml data against their corresponding data type?

A...<prize disabled="true">999</prize>
B...<img src="http://www.abc.com/images/flowers.gif' />
C...<start>09:30:l0.5</start>
D...<start>2002-09-24</start>
E...<prize>+999.5450</prize>
Data type list
B..anyURI
A..boolean
C...time
E...decimal
D...dateTime

8...The order and the number of elements that appears in the mixed content cannot be
specified in the schema,
True|False

9...If the value of maxOccurs attribute is kept unbounded, it means that the element can
appear unlimited number of times,
True|False

10...Elements with complex type may contain nested elements and have attributes,
True|False

11...The default value for the minOccurs attribute is 0,
True|False

12...When a minOccurs attribute is used, there cannot be a maxOccurs attribute in the
same line
True|False

13...Mixed content means that an element whose structure is the complex type can
contains elements with attributes,
True|False
14...Element content means a complex type element that contains only elements,
True|False

15...The order and the number of elements appearing in the mixed content cannot be
specified in schemas,
True|False

16..Element content cannot have attributes.
True|False

17...The sequence element provides an XML representation for describing a selection
from a set of element types.
True|False

18...The all element requires that each element in the group must occur at most once,
True|False

19...For each element type associated with a sequence element, there must be an element
in the XML instance in the same order,
True|False

20...The choice element cannot mention the minOccurs and maxOccurs attribute.
True|False

21...A custom user defined datatype can be created using the <simpleType> definition
True|False

22...Elements of simple type describe the content and data type of an element,
True|False

23...Elements of simple type constitute the structure of an XML document,
True|False

24...A built-in simple element can contain a default value or a facet value.
True|False

25...A default value is the value that is assigned automatically to the element when there
is no other value specified.
True|False

26...Can you match the different keywords against their correspoding description?

A...Specifies the number of digits after decimal point
B...Restricts string types using regular expressions
C...Specifies an allowable value in an enumerated list
D...Specifies whether the attribute is required or optional
E...Specifies that the attribute cannot be used
Key words
B..pattern
E...prohibited
C..enumeration
D...use
A..fractionDigits


Answer

Module 3 DTDs
Question Answer
1 False
2 True
3 True
4 True
5 False
6 False
7 True
8 True
9 True
10 False
11 A-4, B-5, C-1, D-2, E-3

12 A-2, B-4, C-5, D-1, E-3


Module 4 XML Shema.

Question Answer
1 True
2 False
3 False
4 True
5 True
6 Archetypes
Attribute grouping
Open model
Closed model
Namespace support
7 boolean
anyURI
time
dateTime
decimal
8 False
9 True
10 True
11 False
12 False
13 False
14 False
15 False
16 True
17 False
18 True
19 True
20 False
21 False
22 True
23 False
24 False
25 True
26 fractionDigits
pattern
enumeration
use
prohibited

Das könnte Ihnen auch gefallen