Download Now!Here are your Favorite Software for Mac & Windows!

Test answers for XML Schema Test 2016

Test answers for XML schema test 2016 available in here. we are always try to published all upwork and elance test answer that can be easy to proof your skill. 
Q.1. Which of the following constraints can be used by a boolean data type?

  • enumeration
  • pattern
  • minInclusive
  • length

Q.2. Which of the following whiteSpace constraint values makes an XML processor reduce multiple spaces into a single space?

  • preserve
  • replace
  • collapse
  • remove

Q.3. Which of the following restrictions cannot be used with the ENTITIES String data type?

  • length
  • enumeration
  • pattern
  • whiteSpace

Q.4. Which of the following are primary schema components?

  • Attribute declarations
  • Assertions
  • Particles
  • Complex type definitions

Q.5. Which of the following attributes is used to specify that a schema attribute is required?

  • variable
  • fixed
  • use
  • default

Q.6. Analyze the following example:

<xs:element name=”letter”>

<xs:simpleType>

<xs:restriction base=”xs:string”>

<xs:pattern value=”([a-z])*”/>

</xs:restriction>

</xs:simpleType>

</xs:element>

Which of the following are acceptable values for letter?

  • ab123
  • Abcd
  • abcd
  • ABCD

Q.7. Which of the following are declaration components in an XML schema?

  • Element
  • Datatype
  • Model
  • Notation

Q.8. Which of the following elements can only be included in the <annotation> element in an XML schema?

  • <appInfo>
  • <notation>
  • <documentation>
  • <choice>

Q.9. Analyze the following example:

<xs:element name=”letter”>

<xs:simpleType>

<xs:restriction base=”xs:string”>

<xs:pattern value=”([a-z][A-Z])+”/>

</xs:restriction>

</xs:simpleType>

</xs:element>

Which of the following are acceptable values for the <letter> element in the above defined XML schema?

  • Done
  • done
  • DONE
  • dOnE

Q.10. Which of the following elements is used to allow documents to contain additional elements that are not declared in the main XML schema?

  • <any>
  • <all>
  • <choice>
  • <sequence>

Q.11. Analyze the following URI of an XML schema:

http://www.w3.org/XML/XMLSchema/vX.Y/Ne

What does the component Ne in the above URI identify?

  • It identifies the XML Schema Definition Language in general.
  • It identifies the language described in the N-th version of the XSD specification.
  • It identifies the language described in the N-th edition of the XSD specification.
  • None of the above

Q.12. In which of the following model groups of an XML schema do the element information items match one or more of the particles?

  • Sequence
  • Disjunction
  • Conjunction

Q.13. Which of the following data types are derived from the decimal data type?

  • float
  • int
  • int32
  • double

Q.14. Which of the following attributes is defined inside the <xs:extension> element of an XML schema?

  • value
  • type
  • name
  • base

Q.15. Which of the following is a secondary schema component?

  • Attribute declarations
  • Assertions
  • Annotations
  • Particles

Q.16. Analyze the following schema file “family.xsd”:

<?xml version=”1.0″?>

<xs:schema xmlns:xs=”http://www.w3.org/2001/XMLSchema”

elementFormDefault=”qualified”>

<xs:element name=”persons”>

<xs:complexType>

<xs:sequence>

<xs:element name=”person” maxOccurs=”unbounded”>

<xs:complexType>

<xs:sequence>

<xs:element name=”full_name” type=”xs:string”/>

<xs:element name=”child_name” type=”xs:string” maxOccurs=”5″/>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:sequence>

</xs:complexType>

</xs:element>

</xs:schema>

Which of the following statements are true about the above schema file?

  • Each person element must contain a full_name element.
  • Each persons element must contain a full_name element.
  • Each person element can contain a maximum of 5 child_name elements.
  • The persons root element can contain an unlimited number of persons element.

Q.17. Suppose you want to limit the content of an XML element called “car” to a set of acceptable values like BMW, Audi etc. Which of the following constraints will you use in the above situation?

  • enumeration
  • pattern
  • length
  • fractionDigits

Q.18. Analyze the following XML schema fragment:

 

<xs:element name=”name” type=”xs:string” block=”substitution”/>

<xs:element name=”navn” substitutionGroup=”name”/>

<xs:complexType name=”custinfo”>

<xs:sequence>

<xs:element ref=”name”/>

</xs:sequence>

</xs:complexType>

<xs:element name=”customer” type=”custinfo” block=”substitution”/>

<xs:element name=”kunde” substitutionGroup=”customer”/>

 

Which of the following is a valid XML document according to the schema above?

  • <customer> <name>John Smith</name> </customer>
  • <navn> <kunde>John Smith</kunde> </navn>
  • <customer> <navn>John Smith</navn> </customer>
  • <kunde> <name>John Smith</name> </kunde>

Q.19. Which of the following restrictions can be used with the date data types?

  • enumeration
  • fractionDigits
  • totalDigits
  • pattern

Q.20. Which of the following type definitions forms the root of the Type Definition Hierarchy?

  • xs:error
  • xs:anyType
  • xs:nil
  • xs:location

Q.21. Which of the following attributes must be set to true to enable character data to appear between the child-elements of an element in an XML schema?

  • mixed
  • type
  • base
  • value

Q.22. Which of the following are the correct ways to define an empty complex element in an XML schema?

  • <xs:element name=”product”> <xs:complexType> <xs:complexContent> <xs:restriction base=”xs:integer”> <xs:attribute name=”prodid” type=”xs:positiveInteger”/> </xs:restriction> </xs:complexContent> </xs:complexType> </xs:element>
  • <xs:element name=”product”> <xs:complexType> <xs:attribute name=”prodid” type=”xs:positiveInteger”/> </xs:complexType> </xs:element>
  • <xs:element name=”product”/> <xs:complexType> <xs:attribute name=”prodid” type=”xs:positiveInteger”/> </xs:complexType>
  • <xs:element name=”product”/> <xs:complexType> <xs:sequence> <xs:element name=”prodname” type=”xs:string”/> </xs:sequence> </xs:complexType>

Q.23. Which of the following is the correct format for specifying the date in UTC?

  • <start>09-24-2009Z</start>
  • <start>2002-09-24Z</start>
  • <start>2002-09-24</start>
  • <start>09-24-2009</start>

Q.24. Which of the following is the correct format for specifying the time interval using the XSD duration data type?

  • PYnMnDnTHnMnSn
  • PMnDnYnTHnMnSn
  • PnMnDnYTnHnMnS
  • PnYnMnDTnHnMnS

Q.25. Which of the following statements is true if default and use both are present in an XML representation of an Attribute declaration?

  • The actual value of use must be prohibited.
  • The actual value of use must be optional.
  • The actual value of use must be required.
  • The actual value of use must be default.

Q.26. Which of the following are built-in data types of an XML schema?

  • xs:string
  • xs:number
  • xs:boolean
  • xs:float
  • xs:date

Q.27. Analyze the following XML document having a reference to an XML schema:

<?xml version=”1.0″?>

<note

xmlns=”http://www.expertrating.com” xsi:schemaLocation=”http://www.expertrating.com note.xsd”>

<to>Tove</to>

<body>Don’t forget me this weekend!</body>

</note>

 

Which of the following statements is true?

  • The value assigned to the schemaLocation attribute is in the wrong format.
  • The XML Schema Instance Namespace is not specified.
  • A <head> tag must be present.
  • There is no problem with this XML document.

Q.28. Analyze the following schema declaration:

 

<?xml version=”1.0″?>

<xs:schema xmlns:xs=”http://www.w3.org/2001/XMLSchema”

targetNamespace=”http://www.expertrating.com” xmlns=”http://www.expertrating.com”

elementFormDefault=”qualified”>

</xs:schema>

 

Which of the following fragments of the schema declaration defines the namespace being used by the elements and data types in the schema?

  • xmlns:xs=”http://www.w3.org/2001/XMLSchema”
  • targetNamespace=”http://www.expertrating.com”
  • xmlns=”http://www.expertrating.com”
  • elementFormDefault=”qualified”

Q.29. Which of the following validation rules must be true of an element information item E to be locally valid(Simple Type) with respect to an element declaration D?

  • D{abstract}=false
  • D{nillable}=true
  • If E has an xsi:nil=true.
  • D is not absent and E and D have the same expanded name.

Q.30. The elements of an XML schema containing only text and attributes are declared using the________ element.

  • <xs:contentType>
  • <xs:simpleContent>
  • <xs:complexContent>
  • <xs:type>

Q.31. Which of the following is the correct syntax for defining restrictions on an XML element value in an XML schema?

  • <xs:restriction type=”xs:integer”>
  • <xs:restriction value=”xs:integer”>
  • <xs:restriction base=”xs:integer”>
  • <xs:restriction data=”xs:integer”>

Q.32. Which of the following are binary data types in an XML schema?

  • binary
  • hexBinary
  • base32Binary
  • base64Binary

Q.33. Which of the following is the correct format for specifying the date in an XML schema?

  • YYYY-MM-DD
  • DD-MM-YYYY
  • DD-MM-YY
  • MM-DD-YYYY
  1. What value of <maxOccurs> indicator can you set when using the <all> indicator in an XML schema?
  • 0
  • 1
  • unbound
  • No limit

Q.35. Which of the following elements is used to add multiple schemas with the same target namespace to a document?

  • <annotation>
  • <import>
  • <extension>
  • <include>

Q.36. Following is an example of an element in an XML document using a time declaration in its schema definition:

<start>03:05:10.5</start>

Which of the following does the component 10.5 specify?

  • Hours
  • Minutes
  • Seconds

Q.37. Which of the following attributes can be specified in the <xs:complexType> element of an XML schema so as to allow several elements to refer to the same complex type?

  • type
  • value
  • name
  • base

Q.38. Analyze the following example:

 

<xs:element name=”password”>

<xs:simpleType>

<xs:restriction base=”xs:string”>

<xs:pattern value=”[a-zA-Z]{4}”/>

</xs:restriction>

</xs:simpleType>

</xs:element>

 

Which of the following are acceptable values for the password element in the above defined XML schema?

  • ab12
  • abcd4
  • xyZ4
  • abc

Q.39. Which of the following is used to replace spaces in a URI while using anyURI data type in an XML schema?

  • “%20%”
  • %20%
  • %20
  • 20%

Q.40. Which of the following data types are derived from the String data type?

  • boolean
  • ID
  • NCname
  • anyURI
  • Qname

Q.41. The maximum number of decimal digits that you can specify using the decimal data type in an XML schema is ________.

  • 10
  • 15
  • 16
  • 18
  • 20

Q.42. Analyze the following schema declaration:

 

<?xml version=”1.0″?>

<xs:schema xmlns:xs=”http://www.w3.org/2001/XMLSchema”

targetNamespace=”http://www.expertrating.com” xmlns=”http://www.expertrating.com”

elementFormDefault=”qualified”>

</xs:schema>

Which of the following fragments of the schema declaration indicates the default namespace of the XML schema?

  • xmlns:xs=”http://www.w3.org/2001/XMLSchema”
  • targetNamespace=”http://www.expertrating.com”
  • xmlns=”http://www.expertrating.com”
  • elementFormDefault=”qualified”

Q.43. Which of the following statements is true about an XML representation of Attribute declarations in an XML schema?

  • If the targetNamespace attribute is present, the name attribute should be present.
  • If the targetNamespace attribute is present, the form attribute should be present.
  • If an item’s parent is not <schema>, both ref and name must be present.
  • If both fixed and use are present, use must have the optional value as prohibited.

Q.44. What is the default value of the <minOccurs> indicator for Order and Group indicators?

  • No default value
  • 0
  • 1
  • unbound

Q.45. Which of the following is a helper schema component?

  • Notation declarations
  • Simple type definitions
  • Type alternatives
  • Wildcards

Comments

comments