Quiz - XML Schema


1.      An XML Schema defines the structure of an XML document.

a.       True

b.      False



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

a.       True

b.      False



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

a.       True

b.      False



4.      An XML Schema defines how many child elements can appear in an XML documents.

a.       True

b.      False



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

a.       True

b.      False



6.      Allows to define own named data type from pre-existing data types.

a.       Archetypes

b.      Attributes grouping

c.       Closed model

d.      Namespace support

e.       Open model



7.      Allows the schema author to make the attributes common that apply to all elements, or several attributes that include graphic or table elements.

a.       Archetypes

b.      Attributes grouping

c.       Closed model

d.      Namespace support

e.       Open model



8.      Describes elements which are not required to be present in the XML document.

a.       Archetypes

b.      Attributes grouping

c.       Closed model

d.      Namespace support

e.       Open model



9.      Describes only those elements and attributes that may appear in the content of the element.

a.       Archetypes

b.      Attributes grouping

c.       Closed model

d.      Namespace support

e.       Open model





10.  Allows to validate documents that use markup from multiple namespace.

a.       Archetypes

b.      Attributes grouping

c.       Closed model

d.      Namespace support

e.       Open model



11.  <prize disabled=”true”>999</prize>

a.       anyURI

b.      boolean

c.       dataTime

d.      decimal

e.       time





12.  <img src=”http://www.abc.com/image/flowers.gif” />

a.       anyURI

b.      boolean

c.       dataTime

d.      decimal

e.       time





13.  <start>09:30:10.5</start>

a.       anyURI

b.      boolean

c.       dataTime

d.      decimal

e.       time





14.  <start>2002-09-24</start>

a.       anyURI

b.      boolean

c.       dataTime

d.      decimal

e.       time





15.  <prize>+999.5450<prize>

a.       AnyURI

b.      boolean

c.       dataTime

d.      decimal

e.       time



16.  Arrange the XML file in its proper order using the schema vocabulary.



(A) <?xml version=”1.0”?><mail

xmlns=”http://www.abc.com/

(B) xmlns:xsi=”http://www.w3.org/2001/XMLSchema-

instance”xsi:schemaLocation=”http://www.abc.com mail.xsd”>

(C) <to>John</to><from>Jordan</from>

(D) <heading>Scheduler</heading><body>3rd March

Monday, 7:30 PM: board meeting!</body>

(E)</mail>



17.  The order and the number of elements that appears in the mixed content cannot be specified in the schema.

a.       True

b.      False





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

a.       True

b.      False



19.  Elements with complex type may contain nested elements and have attributes.

a.       True

b.      False



20.  The default value for the minOccurs attribute is 0.

a.       True

b.      False



21.  When a minOccurs attribute is used, there cannot be a maxOccurs attribute in the same line.

a.       True

b.      False

22.  Mixed content means that an element whose structure is the complex type can contains elememts with attributes.

a.       True

b.      False



23.  Elements content means a complex type element that contains only elements.

a.       True

b.      False



24.   The order and the number of elements appearing in the mixed content cannot be specified in schemas.

a.       True

b.      False



25.  Element content cannot have attributes

a.       True

b.      False

26.  The sequence element provides an XML representation for describing a selection from a set of element types.

a.       True

b.      False



27.  The all element requires that each element in the group must occur at most once.

a.       True

b.      False



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

a.       True

b.      False



29.  The choice element cannot mention the minOccurs and maxOccurs attribute.

a.       True

b.      False



30.  A custom user defined datatype can be created using the <simpleType> definition.

a.       True

b.      False



31.  Elements of simple type describe the contain and data type of an element.

a.       True

b.      False



32.  Elements of simple type constitute the structure of an XML document.

a.       True

b.      False



33.  A built-in simple element can contain a default value or a facet value.

a.       True

b.      False



34.  A default value is the value that is assigned automatically to the element when there is no other value specified.

a.       True

b.      False

35.  Specifies the number of digits after decimal point.

a.       fractionDigits

b.      pattern

c.       enumeration

d.      use

e.       prohibited



36.  Restricts string types using regular expressions

a.       fractionDigits

b.      pattern

c.       enumeration

d.      use

e.       prohibited



37.  Specifies an allowable value in an enumerated list

a.       fractionDigits

b.      pattern

c.       enumeration

d.      use

e.       prohibited



38.  Specifies whether the attribute is required or optional

a.       fractionDigits

b.      pattern

c.       enumeration

d.      use

e.       prohibited



39.  Specifies that the attribute cannot be used

a.       fractionDigits

b.      pattern

c.       enumeration

d.      use

e.       prohibited


Share on Google Plus

About Hà Tuấn Anh

0 nhận xét:

Đăng nhận xét