 |
| XML General XML discussions. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

April 30th, 2006, 08:47 PM
|
|
Registered User
|
|
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Exam Questions
I am taking a XML Course, in the course I have been given a pre-test for studying purposes. I hope some of you experts can help me out. The exam is open book, so this will help me alot. Hope you can help out, even though you reply with a few questions.
Question 1
Which of the following comments are not permitted in a well-formed XML document? (Choose all that apply.)
A.
B.
C. <!--
Extractor Module
Utility Templates
-->
D.
E.
Question 2
The pseudo-attribute in the XML prolog (<?xml ... ?>) which specifies the character encoding must be:
A. Lower case, but the value is case-sensitive.
B. Upper case, but the value is case-insensitive.
C. Lower case, but the value is case-insensitive.
D. Lower case, but the value must be in upper case.
E. Upper case, and the value must also be in upper case.
Question 3
What is meant by normalizing in XML?
A. Modifying identifiers so that they are unique within a given namespace.
B. Insuring the integrity of data by correcting errors.
C. Changing all line breaks to a common character, among other things.
D. Resolving identifier collisions.
E. Marshalling datatypes.
Question 4
By setting the default namespace to an empty string, what would happen within the scope of the declaration?
A. The empty string becomes the namespace.
B. The empty string becomes the default namespace.
C. It has the same effect of there being no default namespace.
D. The default namespace does not change.
E. None of the above.
Question 5
The content model of an XML document is defined by:
A. Global variable declarations.
B. The namespace binding in the XML prolog.
C. Imported and/or included rule-graphs.
D. Zero or more schemas and/or namespaces, and/or the structure of the document itself.
E. XSL:FO
Question 6
Which of the following can be said to be valid XML?
A. <?xml version="1.0"?>
<!DOCTYPE galaxy SYSTEM "cosmos.dtd">
<galaxy>M85</galaxy>
B. <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE galaxy [
<!ELEMENT galaxy(#PCDATA)>
]>
<galaxy>M85</galaxy>
C. <?xml version="1.0"?>
<!DOCTYPE SYSTEM "http://www.example.com/cosmos.dtd">
<galaxy>M85</galaxy>
D. <?xml version="1.0">
<!DOCTYPE galaxy SYSTEM "http://www.example.com/cosmos.dtd">
<galaxy>M85</galaxy>
E. <?xml version="1.0"?>
<!DOCTYPE PUBLIC "http://www.example.com/cosmos.dtd">
<galaxy>M85</galaxy>
Question 7
What is the construct for specifying to an XML processor to render text in an XML document without parsing it?
A. <PCDATA>How now, brown cow?</PCDATA>
B. <CDATA>How now, brown cow?</CDATA>
C. <![CDATA[How now, brown cow?]]>
D. <!PCDATA[How now, brown cow?]]>
E. <![#PCDATA[How now, brown cow?]]>
Question 8
What are the types of DTD entities?
A. Internal general, external general, internal local, external local, character
B. Internal global, external global, internal local, external local, external unparsed
C. Parameter, internal general, external parsed general, unparsed
D. Internal general, external general, internal limited, external limited, reference
E. Internal unrestricted, external unrestricted, internal reference, external reference
Question 9
Consider the following DTD fragment:
<!ATTLIST x y ENTITY #REQUIRED>According to this definition:
A. The name of the y element must match the name of an unparsed entity defined in the DTD
B. The value of the y element must match the name of an unparsed entity defined in the DTD
C. The name of the y attribute must match the name of an unparsed entity defined in the DTD
D. The value of the y attribute must match the name of an unparsed entity defined in the DTD
E. None of the above.
Question 10
Consider the following DTD:
<!ELEMENT train (engine?, wagon*)>
<!ELEMENT engine(#PCDATA)>
<!ELEMENT wagon(#PCDATA)>
Which XML would be successfully validated? (Choose all that apply.)
A. <train />
B. <train>
<engine>
That Could
</engine>
</train>
C. <train>
<engine>
That Could
<wagon>
Caboose
</wagon>
</engine>
</train>
D. <train>
<engine>
No. 7
</engine>
<wagon>
Pullman
</wagon>
<wagon>
Diner
</wagon>
</train>
E. <train>
<engine>
No. 8
</engine>
<engine>
No. 9
</engine>
<wagon>
Wagon-Lits
</wagon>
</train>
Question 11
Assume there exists an XML document containing the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE audio_presentation [
<!ENTITY data "c:.wav">
<!ELEMENT audio_presentation (#PCDATA)>
<!NOTATION au PUBLIC "au 1.0" "http:\\www.example.com.exe">
<!NOTATION wav PUBLIC "wav 1.0" "http:\\www.example.com.exe">
<!ATTLIST audio_presentation modality NOTATION (au|wav) #REQUIRED>
]>
Which of the following XML fragments would be validated by the above definitions?
A. <audio_presentation modality="au|wav">&data;</audio_presentation>
B. <audio_presentation modality="wav">&data;</audio_presentation>
C. <audio_presentation>&data;</audio_presentation>
D. <audio_presentation modality="data"></audio_presentation>
E. <audio_presentation modality="&data;">wav</audio_presentation>
Question 12
Which of the following XPath expressions will select all **************** children of the current node that have a width attribute with the value of "EEEE"? (Choose all that apply.)
A. ****************[attribute::width="EEEE"]
B. ****************[@width="EEEE"]
C. ****************(@width="EEEE")
D. child::****************[attribute::width="EEEE"]
E. child::****************(attribute::width="EEEE")
Question 13
Consider the following XML document fragment:
<?xml version="1.0" encoding="UTF-8"?>
<periodicTable>
<chemicalElement symbol="Ag">
<atomicNumber>47</atomicNumber>
<atomicWeight>107.8682</atomicWeight>
</chemicalElement>
<chemicalElement symbol="Au">
<atomicNumber>79</atomicNumber>
<atomicWeight>196.96654</atomicWeight>
</chemicalElement>
</periodicTable>Which XPath expression would select just the child elements of all chemicalElement elements of the periodicTable element?
A. /periodicTable/chemicalElement*
B. /periodicTable/*
C. /*/*/*
D. //*
Question 14
Which XPath expression selects all species elements that have a mutation element?
A. species[mutation]
B. species(mutation)
C. species/mutation
D. species[@mutation]
Question 15
Which XPath expression selects the first manifold node that has a riemann attribute?
A. manifold[@riemann[1]]
B. manifold[1][@riemann]
C. manifold[1]/[@riemann]
D. manifold[@riemann][1]
E. [1]manifold[@riemann]
Question 16
What is the result of the following XPath expression?
translate("asagus","abc","ABC")
A. asagus
B. Asagus
C. AsAgus
D. AspBrCgus
E. ABCaragus
Question 17
In XPath which statement is correct?
A. The attribute axis contains the attributes of the context node
B. The child axis contains the children of the context node
C. Both of the above
D. None of the above
Question 18
Consider the following XML document:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<entree cuisine="Cajun">
<dish>Jambalaya</dish>
<price denomination="dollar">3.33</price>
</entree>
<entree cuisine="Russian">
<dish>Borshch</dish>
<price denomination="ruble">6.66</price>
</entree>
</menu>Which XPath expression selects the price of Borshch?
A. //entree[@cuisine='Borshch']/price
B. //entree[dish='Borshch']/price
C. //entree[@dish='Russian']/price
D. //entree[text()='Borshch']/price
E. //entree['Borshch']/price
Question 19
Which of the following is the correct syntax for expressing the IF-THEN-ELSE flow of control in XPath 1.0?
A. ( a = b ? c : d )
B. cond ( a = b, c, d )
C. if ( a = b ) then ( c ) else ( d )
D. if ( a = b ) then c else d
E. There is no such construct in XPath 1.0.
Question 20
Which of the following statements about XML Schema attributes is true?
A. An attribute may be of a complex type.
B. An attribute may be of a derived simple type.
C. An attribute may not be of any derived type.
D. An attribute type may not be a list or a union.
E. An attribute type may not be an enumeration.
Question 21
What is the XML Schema component which corresponds to the definition of general entities in a DTD?
A. xs:generalEntity
B. xs:entity
C. xs:ENTITY
D. xs:anySimpleType
E. There is no such component.
Question 22
Which of the following is a valid instance of the type NMTOKEN in XML Schema?
A. %correct
B. 76Trombones
C. #OfBigPrizes
D. @large
E. None of the above.
Question 23
Which XML Schema element improves on the functionality provided by DTD's IDREF?
A. IDREF
B. IDREFS
C. key
D. keyref
E. ref
Question 24
In XML Schema what is one of the differences between an "empty element" and a "nil element"?
A. A nil element always has the explicit content "nil", an empty element is merely empty.
B. A nil element must have the "nillable" attribute in its definition set to "true".
C. A nil element must have its value attribute set to "xsi:nil".
D. Empty elements are permitted implicitly, while nil elements do not exist as such.
E. The terms "empty" and "nil" are synonymous.
Question 25
Consider the following XML Schema fragment:
<xs:element name="identifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{3}[-]{1,1}\d{2}[-]{1,1}\p{Nd}{4}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>What values are possible for the "identifier" element?
A. Three digits optionally followed by a hyphen followed by two digits optionally followed by a hyphen followed by three digits.
B. Three digits followed by a hyphen followed by two digits followed by a hyphen followed by four digits.
C. From zero to three digits followed by a hyphen followed by from zero to three digits followed by a hyphen followed by from zero to four digits.
D. Three instances of the lowercase character 'd' followed by a hyphen followed by two instances of the lowercase character 'd' followed by a hyphen followed by four instances of the lowercase character 'd'.
E. Three or more digits optionally followed by a hyphen followed by two or more digits followed by a hyphen followed by from to three or more digits.
Question 26
Assume that in an existing XML document you have the following element:
<item SKU="19724814" />How would you write an XML Schema to validate this fragment?
A. <xs:element name="item"
<xs:complexType>
<xs:complexContent>
<xs:restriction base="xs:integer">
<xs:attribute name="SKU" type="xs:positiveInteger"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
B. <xs:element name="item">
<xs:complexType>
<xs:attribute name="SKU" type="xs:positiveInteger"/>
</xs:complexType>
</xs:element>
C. Both of the above are correct.
D. None of the above is correct.
Question 27
Assume that in an existing XML document the following element is found:
<data href="http://www.example.com/datAdat"/>How would you write the most appropriate XML Schema definition for the href attribute?
A. <xs:attribute name="href" type="xs:string"/>
B. <xs:attribute name="href" type="xs:anyURI"/>
C. <xs:attribute name="href" type="xs:NMTOKEN"/>
D. <xs:attribute name="href" type="xs:anyType"/>
E. <xs:attribute name="href" type="xs:QName"/>
Question 28
Consider the following XML Schema fragment:
<xs:simpleType name='strList'>
<xs:list itemType='xs:string'/>
</xs:simpleType>
Suppose this schema were instantiated in an XML document as follows: <myStuff xsi:type='strList'>
Mary had a little lamb,
Its fleece was white as snow,
And everywhere that Mary went,
The lamb was sure to go.
</myStuff>What is the length of the myStuff list?
A. 1
B. 4
C. 22
D. 107
E. NaN
Question 29
A new automobile dealer wishes to install an ordering system for new automobiles. The salesmen have in the past had their orders entered into a system which accommodated only one color of upholstery for any given automobile. Consider the following XML Schema fragment:
<xs:element name="Upholstery_Color_Selections">
<xs:complexType>
<xs:sequence>
<xs:element ref="Upholstery_Color_Selection" maxOccurs="5"/>
</xs:sequence>
<xs:attribute name="Desired_Selection" type="xs:unsignedLong" use="required"/>
</xs:complexType>
</xs:element>The color attribute was in the past an unsigned long integer representing an RGB value. Suddenly, two-tone upholstery have become available. How can the Desired_Selection attribute of Upholstery_Color_Selection be modified to allow for two-tone autos with the greatest degree of backwards compatibility?
A. Change the attribute type to a list of unsignedLong.
B. Change the attribute type to a union of unsignedLong and unsignedLong.
C. Change the attribute to a child element.
D. Derive a new data type rgbType from unsigned Long.
E. None of the above.
Question 30
Suppose there exist five stylesheets, U, W, X, Y and Z. Further suppose that the stylesheets import in the following order: stylesheet U imports stylesheets W and X in that order; stylesheet W imports stylesheet Y; stylesheet X imports stylesheet Z. What is then the order of import precedence from highest to lowest?
A. Y, W, Z, X, U.
B. U, W, X, Z, Y.
C. U, X, Z, W, Y.
D. W, Z, U, Y, X.
E. X, Z, Y, U, W.
Question 31
The component
<xsl:choose>cannot be used by itself. Which components are used to support it?
A. <xsl:if> and <xsl:when>
B. <xsl:case> and <xsl:otherwise>
C. <xsl:if> and <xsl:else>
D. <xsl:case> and <xsl:default>
E. <xsl:when> and <xsl:otherwise>
Question 32
Which fragment correctly applies an XSLT attribute value template to assign the value of an element to an attribute?
A. <covering finish="texture"/>
B. <covering finish="</texture>">
C. <covering finish="(/texture)">
D. <covering finish="[/texture]">
E. <covering finish="{/texture}">
Question 33
Which XSLT fragment correctly returns the position of the current node in the context node-set in Roman numerals?
A. <xsl:position value="number()-1" template="R"/>
B. <xsl:position value="number()" format="r"/>
C. <xsl:number value="position()-1" format="i"/>
D. <xsl:number value="position()" format="0" template="i"/>
E. <xsl:number value="position()" format="I"/>
Question 34
Suppose the current node represents the following?
<foo:bar/>What value is returned by an XSLT template that only results in the application of the name() function to this node?
A. xsi:nil
B. foo
C. foo:bar
D. bar
E. "http://www.w3c.org"
Question 35
Consider the XSLT element:
<xsl:copy-of select="expression"/>When would the result of the expression be converted to a string before being inserted into the result tree?
A. When the result is a tree fragment.
B. When the result is a node-set.
C. When the result is neither a node-set nor a result tree fragment.
D. When the result is a tree fragment and when the result is a node-set.
E. None of the above
Question 36
Consider the following literal result element written in an XSLT stylesheet:
<example><foo></example>Assume further that the stylesheet contains the following output element: <xsl:output cdata-section-elements="example"/>What would the output from the XSLT stylesheet look like?
A. <example><foo></example>
B. <example>foo</example>
C. <example><foo></example>
D. <example><![CDATA[<foo>]]></example>
E. <example></example>
Question 37
Which SOAP attribute is used to indicate if processing a header entry must be possible?
A. actor
B. mustUnderstand
C. required
D. encodingStyle
Question 38
The four types of WSDL transmission primitives are:
A. Publish-subscribe, solicit-response, notify, update.
B. Notify, publish-subscribe, one-way, solicit.
C. Send-receive, send, receive, receive-send.
D. Solicit, notify, one-way, request-response.
E. Notification, request-response, solicit-response, one-way.
Question 39
WSDL relates
A. Services to operations to port types to bindings.
B. Services to operations to bindings to port types.
C. Services to bindings to operations to port types.
D. Services to bindings to port types to operations.
E. Services to port types to operations to bindings.
Question 40
WSDL documents may:
A. Include XML Schema components
B. Contain XML Schema components
C. Import XML Schemas
D. Import and include XML Schema components
E. All of the above
Question 41
While editing this XML document in XMLSpy
you would like to change all "userID" elements into attributes with the name "uid". Which of the following approaches is the easiest method to achieve this?
A. Using the "Replace" command to find all elements with the name "userID" and rep lacing the name with "uid; then selecting each new element "uid" in either Grid or Text View and using the "Convert To --> Attribute" command on the "XML" menu to convert them into attributes one by one.
B. Right-clicking on the column header "userID" and choosing "Convert To --> Attribute" from the context-menu; then double-clicking on the column header "userID" and typing "uid" to change the name.
C. Switching to "Text View" and adding a new "uid" attribute to each "Person" element manually; then using Copy/Paste to copy the values from the "userID" elements to the new attributes one by one; then deleting all the "userID" elements one by one.
D. It is neither possible to change elements to attributes nor can you copy values from elements into attributes; one must manually delete all the elements and create new attributes and manually re-enter the content.
Question 42
You are in the process of architecting a new XML Schema to unify expense reports across your organization. Multiple departments have submitted example XML documents with their use-cases to assist in the process. How can you quickly create a first iteration of an XML Schema that matches all the XML use case documents that you have received?
A. Open each example document in XMLSpy and collect all information from the various example documents; create an outline of the XML Schema by hand; enter the XML Schema into XMLSpy using the XML Schema editor.
B. Open the first example document in XMLSpy and use the "Generate DTD/Schema" command to automatically create an XML Schema that matches the first example document; repeat the same process for all example documents; use the "Come Open File" command on the Tools menu to come all the schemas with each other and find out where the differences are; create a common schema manually based on the differences.
C. Write a JavaScript function that opens each XML example document and creates an XML Schema for it; then write a second JavaScript function that uses the "Merge Schema" command to sequentially merge each schema with the previous schemA
D. Create a project in XMLSpy and add all example XML documents to one folder; right-click on the folder and choose "Generate DTD/Schema" from the context menu; pick "W3C Schema" from the options dialog and click OK; XMLSpy automatically creates an XML Schema that captures a unified content model for all the example documents.
Question 43
XMLSpy allows you to generate an XML Schema from a relational database schemA Although you can use most databases via ADO or ODBC, XMLSpy supports some databases natively. Which databases are these (choose all that apply)?
A. Microsoft Accessâ¢
B. DB2â¢
C. Oracleâ¢
D. Microsoft SQL Serverâ¢
E. Sybaseâ¢
Question 44
XMLSpy allows you to put breakpoints in XSLT and XML files for XSLT transformation debugging. Where can you place such breakpoints?
A. A single element per line only.
B. Comments, elements, and processing instructions.
C. Multiple elements or attributes per line.
D. Processing instructions or text nodes.
E. Processing instructions only.
Question 45
What are the 5 views supported in XMLSpy (Professional and Enterprise Editions)?
A. Code View, Grid View, HTML View, XML Schema View, WSDL Design View.
B. Authentic View, Browser View, Grid View, Text View, XML Schema/WSDL Design View.
C. Debugging View, Grid View, HTML View, XML Schema View, WSDL Design View.
D. Code View, Grid View, HTML View, Tree View, XML Schema View.
E. AuthenticView, Code View, Grid View, HTML View, Project View.
Question 46
Which of the following editing tasks is not an ideal usage for Grid View?
A. Changing elements into attributes in an XML instance document.
B. Re-arranging the ordering of elements and attributes in an XML instance document.
C. Cutting and pasting XML data into and out of external applications such as Microsoft Excel.
D. Developing visual user interfaces for WYSIWYG XML data entry.
E. Re-naming elements and attributes in an XML instance.
Question 47
Given a valid XML Schema, which of the following can be auto-generated using XMLSpy? (Choose all that apply.)
A. A relational database schema.
B. A sample XML instance document.
C. Program code (Class files in Java, C++ or C#).
D. A Document Type Definition (DTD).
Question 48
What is the purpose of the "Authentic View" included in XMLSpy?
A. Inspecting the output of XSLT transformations.
B. Viewing client transaction processes of a SOAP.
C. Editing and displaying the output of a wireless application.
D. Visually creating XSL: FO transformations used in XML to PDF transformations.
E. Editing XML in a word-processor like environment.
Question 49
What are SPL files used for in XMLSpy?
A. They are templates used to configure the output of XMLSpy's XML Schema based code generator.
B. They are configuration files used to validate XML files.
C. They configure XMLSpy's Project View (e.g. folders, properties, etC).
D. They are pre-compiled assemblies used by the XMLSpy SOAP Debugger.
E. They are an interface for configuring 3rd party software plug-ins for XMLSpy.
Question 50
The XMLSpy diagram below is an illustration of which of the following?
A. A visual representation of the Document Type Definition for a threeType element.
B. A globally defined, XML Schema simple type definition.
C. An XML Schema type which uses type derivation.
D. An XML Schema element which uses a substitution group.
E. None of the above.
|
|

May 1st, 2006, 04:08 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
|
|
What's the point of us doing it?
Even if it's an open book exam, and as an employer if I found a qualification depended on that form of exam I'd ignore it, you'll still going to have to find the answers yourself at the time.
--
Joe ( Microsoft MVP - XML)
|
|

September 21st, 2006, 04:45 AM
|
|
Registered User
|
|
Join Date: Sep 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi i need correct answer for this question:
Question 1
Which of the following comments are not permitted in a well-formed XML document? (Choose all that apply.)
A.
B.
C.
<!--
Extractor Module
Utility Templates
-->
D.
E.
Question 2
The pseudo-attribute in the XML prolog (<?xml ... ?>) which specifies the character encoding must be:
A. Lower case, but the value is case-sensitive.
B. Upper case, but the value is case-insensitive.
C. Lower case, but the value is case-insensitive.
D. Lower case, but the value must be in upper case.
E. Upper case, and the value must also be in upper case.
Question 3
What is meant by normalizing in XML?
A. Modifying identifiers so that they are unique within a given namespace.
B. Insuring the integrity of data by correcting errors.
C. Changing all line breaks to a common character, among other things.
D. Resolving identifier collisions.
E. Marshalling datatypes.
Question 4
By setting the default namespace to an empty string, what would happen within the scope of the declaration?
A. The empty string becomes the namespace.
B. The empty string becomes the default namespace.
C. It has the same effect of there being no default namespace.
D. The default namespace does not change.
E. None of the above.
Question 5
The content model of an XML document is defined by:
A. Global variable declarations.
B. The namespace binding in the XML prolog.
C. Imported and/or included rule-graphs.
D. Zero or more schemas and/or namespaces, and/or the structure of the document itself.
E. XSL:FO
Question 6
Which of the following can be said to be valid XML?
A.
<?xml version="1.0"?>
<!DOCTYPE galaxy SYSTEM "cosmos.dtd">
<galaxy>M85</galaxy>
B.
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE galaxy [
<!ELEMENT galaxy(#PCDATA)>
]>
<galaxy>M85</galaxy>
C.
<?xml version="1.0"?>
<!DOCTYPE SYSTEM "http://www.example.com/cosmos.dtd">
<galaxy>M85</galaxy>
D.
<?xml version="1.0">
<!DOCTYPE galaxy SYSTEM "http://www.example.com/cosmos.dtd">
<galaxy>M85</galaxy>
E.
<?xml version="1.0"?>
<!DOCTYPE PUBLIC "http://www.example.com/cosmos.dtd">
<galaxy>M85</galaxy>
Question 7
What is the construct for specifying to an XML processor to render text in an XML document without parsing it?
A.
<PCDATA>How now, brown cow?</PCDATA>
B.
<CDATA>How now, brown cow?</CDATA>
C.
<![CDATA[How now, brown cow?]]>
D.
<!PCDATA[How now, brown cow?]]>
E.
<![#PCDATA[How now, brown cow?]]>
Question 8
What are the types of DTD entities?
A. Internal general, external general, internal local, external local, character
B. Internal global, external global, internal local, external local, external unparsed
C. Parameter, internal general, external parsed general, unparsed
D. Internal general, external general, internal limited, external limited, reference
E. Internal unrestricted, external unrestricted, internal reference, external reference
Question 9
Consider the following DTD fragment:
<!ATTLIST x y ENTITY #REQUIRED>
According to this definition:
A. The name of the y element must match the name of an unparsed entity defined in the DTD
B. The value of the y element must match the name of an unparsed entity defined in the DTD
C. The name of the y attribute must match the name of an unparsed entity defined in the DTD
D. The value of the y attribute must match the name of an unparsed entity defined in the DTD
E. None of the above.
Question 10
Consider the following DTD:
<!ELEMENT train (engine?, wagon*)>
<!ELEMENT engine(#PCDATA)>
<!ELEMENT wagon(#PCDATA)>
Which XML would be successfully validated? (Choose all that apply.)
A.
<train />
B.
<train>
<engine>
That Could
</engine>
</train>
C.
<train>
<engine>
That Could
<wagon>
Caboose
</wagon>
</engine>
</train>
D.
<train>
<engine>
No. 7
</engine>
<wagon>
Pullman
</wagon>
<wagon>
Diner
</wagon>
</train>
E.
<train>
<engine>
No. 8
</engine>
<engine>
No. 9
</engine>
<wagon>
Wagon-Lits
</wagon>
</train>
Question 11
Assume there exists an XML document containing the following:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE audio_presentation [
<!ENTITY data "c:.wav">
<!ELEMENT audio_presentation (#PCDATA)>
<!NOTATION au PUBLIC "au 1.0" "http:\\www.example.com.exe">
<!NOTATION wav PUBLIC "wav 1.0" "http:\\www.example.com.exe">
<!ATTLIST audio_presentation modality NOTATION (au|wav) #REQUIRED>
]>
Which of the following XML fragments would be validated by the above definitions?
A. <audio_presentation modality="au|wav">&data;</audio_presentation>
B. <audio_presentation modality="wav">&data;</audio_presentation>
C. <audio_presentation>&data;</audio_presentation>
D. <audio_presentation modality="data"></audio_presentation>
E. <audio_presentation modality="&data;">wav</audio_presentation>
Question 12
Which of the following XPath expressions will select all **************** children of the current node that have a width attribute with the value of "EEEE"? (Choose all that apply.)
A. ****************[attribute::width="EEEE"]
B. ****************[@width="EEEE"]
C. ****************(@width="EEEE")
D. child::****************[attribute::width="EEEE"]
E. child::****************(attribute::width="EEEE")
Question 13
Consider the following XML document fragment:
<?xml version="1.0" encoding="UTF-8"?>
<periodicTable>
<chemicalElement symbol="Ag">
<atomicNumber>47</atomicNumber>
<atomicWeight>107.8682</atomicWeight>
</chemicalElement>
<chemicalElement symbol="Au">
<atomicNumber>79</atomicNumber>
<atomicWeight>196.96654</atomicWeight>
</chemicalElement>
</periodicTable>
Which XPath expression would select just the child elements of all chemicalElement elements of the periodicTable element?
A. /periodicTable/chemicalElement*
B. /periodicTable/*
C. /*/*/*
D. //*
Question 14
Which XPath expression selects all species elements that have a mutation element?
A. species[mutation]
B. species(mutation)
C. species/mutation
D. species[@mutation]
Question 15
Which XPath expression selects the first manifold node that has a riemann attribute?
A. manifold[@riemann[1]]
B. manifold[1][@riemann]
C. manifold[1]/[@riemann]
D. manifold[@riemann][1]
E. [1]manifold[@riemann]
Question 16
What is the result of the following XPath expression?
translate("asagus","abc","ABC")
A. asagus
B. Asagus
C. AsAgus
D. AspBrCgus
E. ABCaragus
Question 17
In XPath which statement is correct?
A. The attribute axis contains the attributes of the context node
B. The child axis contains the children of the context node
C. Both of the above
D. None of the above
Question 18
Consider the following XML document:
<?xml version="1.0" encoding="UTF-8"?>
<menu>
<entree cuisine="Cajun">
<dish>Jambalaya</dish>
<price denomination="dollar">3.33</price>
</entree>
<entree cuisine="Russian">
<dish>Borshch</dish>
<price denomination="ruble">6.66</price>
</entree>
</menu>
Which XPath expression selects the price of Borshch?
A. //entree[@cuisine='Borshch']/price
B. //entree[dish='Borshch']/price
C. //entree[@dish='Russian']/price
D. //entree[text()='Borshch']/price
E. //entree['Borshch']/price
Question 19
Which of the following is the correct syntax for expressing the IF-THEN-ELSE flow of control in XPath 1.0?
A. ( a = b ? c : d )
B. cond ( a = b, c, d )
C. if ( a = b ) then ( c ) else ( d )
D. if ( a = b ) then c else d
E. There is no such construct in XPath 1.0.
Question 20
Which of the following statements about XML Schema attributes is true?
A. An attribute may be of a complex type.
B. An attribute may be of a derived simple type.
C. An attribute may not be of any derived type.
D. An attribute type may not be a list or a union.
E. An attribute type may not be an enumeration.
Question 21
What is the XML Schema component which corresponds to the definition of general entities in a DTD?
A. xs:generalEntity
B. xs:entity
C. xs:ENTITY
D. xs:anySimpleType
E. There is no such component.
Question 22
Which of the following is a valid instance of the type NMTOKEN in XML Schema?
A. %correct
B. 76Trombones
C. #OfBigPrizes
D. @large
E. None of the above.
Question 23
Which XML Schema element improves on the functionality provided by DTD's IDREF?
A. IDREF
B. IDREFS
C. key
D. keyref
E. ref
Question 24
In XML Schema what is one of the differences between an "empty element" and a "nil element"?
A. A nil element always has the explicit content "nil", an empty element is merely empty.
B. A nil element must have the "nillable" attribute in its definition set to "true".
C. A nil element must have its value attribute set to "xsi:nil".
D. Empty elements are permitted implicitly, while nil elements do not exist as such.
E. The terms "empty" and "nil" are synonymous.
Question 25
Consider the following XML Schema fragment:
<xs:element name="identifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{3}[-]{1,1}\d{2}[-]{1,1}\p{Nd}{4}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
What values are possible for the "identifier" element?
A. Three digits optionally followed by a hyphen followed by two digits optionally followed by a hyphen followed by three digits.
B. Three digits followed by a hyphen followed by two digits followed by a hyphen followed by four digits.
C. From zero to three digits followed by a hyphen followed by from zero to three digits followed by a hyphen followed by from zero to four digits.
D. Three instances of the lowercase character 'd' followed by a hyphen followed by two instances of the lowercase character 'd' followed by a hyphen followed by four instances of the lowercase character 'd'.
E. Three or more digits optionally followed by a hyphen followed by two or more digits followed by a hyphen followed by from to three or more digits.
Question 26
Assume that in an existing XML document you have the following element:
<item SKU="19724814" />
How would you write an XML Schema to validate this fragment?
A.
<xs:element name="item"
<xs:complexType>
<xs:complexContent>
<xs:restriction base="xs:integer">
<xs:attribute name="SKU" type="xs:positiveInteger"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
</xs:element>
B.
<xs:element name="item">
<xs:complexType>
<xs:attribute name="SKU" type="xs:positiveInteger"/>
</xs:complexType>
</xs:element>
C. Both of the above are correct.
D. None of the above is correct.
Question 27
Assume that in an existing XML document the following element is found:
<data href="http://www.example.com/datAdat"/>
How would you write the most appropriate XML Schema definition for the href attribute?
A. <xs:attribute name="href" type="xs:string"/>
B. <xs:attribute name="href" type="xs:anyURI"/>
C. <xs:attribute name="href" type="xs:NMTOKEN"/>
D. <xs:attribute name="href" type="xs:anyType"/>
E. <xs:attribute name="href" type="xs:QName"/>
Question 28
Consider the following XML Schema fragment:
<xs:simpleType name='strList'>
<xs:list itemType='xs:string'/>
</xs:simpleType>
Suppose this schema were instantiated in an XML document as follows:
<myStuff xsi:type='strList'>
Mary had a little lamb,
Its fleece was white as snow,
And everywhere that Mary went,
The lamb was sure to go.
</myStuff>
What is the length of the myStuff list?
A. 1
B. 4
C. 22
D. 107
E. NaN
Question 29
A new automobile dealer wishes to install an ordering system for new automobiles. The salesmen have in the past had their orders entered into a system which accommodated only one color of upholstery for any given automobile. Consider the following XML Schema fragment:
<xs:element name="Upholstery_Color_Selections">
<xs:complexType>
<xs:sequence>
<xs:element ref="Upholstery_Color_Selection" maxOccurs="5"/>
</xs:sequence>
<xs:attribute name="Desired_Selection" type="xs:unsignedLong" use="required"/>
</xs:complexType>
</xs:element>
The color attribute was in the past an unsigned long integer representing an RGB value. Suddenly, two-tone upholstery have become available. How can the Desired_Selection attribute of Upholstery_Color_Selection be modified to allow for two-tone autos with the greatest degree of backwards compatibility?
A. Change the attribute type to a list of unsignedLong.
B. Change the attribute type to a union of unsignedLong and unsignedLong.
C. Change the attribute to a child element.
D. Derive a new data type rgbType from unsigned Long.
E. None of the above.
Question 30
Suppose there exist five stylesheets, U, W, X, Y and Z. Further suppose that the stylesheets import in the following order: stylesheet U imports stylesheets W and X in that order; stylesheet W imports stylesheet Y; stylesheet X imports stylesheet Z. What is then the order of import precedence from highest to lowest?
A. Y, W, Z, X, U.
B. U, W, X, Z, Y.
C. U, X, Z, W, Y.
D. W, Z, U, Y, X.
E. X, Z, Y, U, W.
Question 31
The component
<xsl:choose>
cannot be used by itself. Which components are used to support it?
A.
<xsl:if> and <xsl:when>
B.
<xsl:case> and <xsl:otherwise>
C.
<xsl:if> and <xsl:else>
D.
<xsl:case> and <xsl:default>
E.
<xsl:when> and <xsl:otherwise>
Question 32
Which fragment correctly applies an XSLT attribute value template to assign the value of an element to an attribute?
A. <covering finish="texture"/>
B. <covering finish="</texture>">
C. <covering finish="(/texture)">
D. <covering finish="[/texture]">
E. <covering finish="{/texture}">
Question 33
Which XSLT fragment correctly returns the position of the current node in the context node-set in Roman numerals?
A. <xsl:position value="number()-1" template="R"/>
B. <xsl:position value="number()" format="r"/>
C. <xsl:number value="position()-1" format="i"/>
D. <xsl:number value="position()" format="0" template="i"/>
E. <xsl:number value="position()" format="I"/>
Question 34
Suppose the current node represents the following?
<foo:bar/>
What value is returned by an XSLT template that only results in the application of the name() function to this node?
A. xsi:nil
B. foo
C. foo:bar
D. bar
E. "http://www.w3c.org"
Question 35
Consider the XSLT element:
<xsl:copy-of select="expression"/>
When would the result of the expression be converted to a string before being inserted into the result tree?
A. When the result is a tree fragment.
B. When the result is a node-set.
C. When the result is neither a node-set nor a result tree fragment.
D. When the result is a tree fragment and when the result is a node-set.
E. None of the above
Question 36
Consider the following literal result element written in an XSLT stylesheet:
<example><foo></example>
Assume further that the stylesheet contains the following output element:
<xsl:output cdata-section-elements="example"/>
What would the output from the XSLT stylesheet look like?
A. <example><foo></example>
B. <example>foo</example>
C. <example><foo></example>
D. <example><![CDATA[<foo>]]></example>
E. <example></example>
Question 37
Which SOAP attribute is used to indicate if processing a header entry must be possible?
A. actor
B. mustUnderstand
C. required
D. encodingStyle
Question 38
The four types of WSDL transmission primitives are:
A. Publish-subscribe, solicit-response, notify, update.
B. Notify, publish-subscribe, one-way, solicit.
C. Send-receive, send, receive, receive-send.
D. Solicit, notify, one-way, request-response.
E. Notification, request-response, solicit-response, one-way.
Question 39
WSDL relates
A. Services to operations to port types to bindings.
B. Services to operations to bindings to port types.
C. Services to bindings to operations to port types.
D. Services to bindings to port types to operations.
E. Services to port types to operations to bindings.
Question 40
WSDL documents may:
A. Include XML Schema components
B. Contain XML Schema components
C. Import XML Schemas
D. Import and include XML Schema components
E. All of the above
Question 41
While editing this XML document in XMLSpy
you would like to change all "userID" elements into attributes with the name "uid". Which of the following approaches is the easiest method to achieve this?
A. Using the "Replace" command to find all elements with the name "userID" and rep lacing the name with "uid; then selecting each new element "uid" in either Grid or Text View and using the "Convert To --> Attribute" command on the "XML" menu to convert them into attributes one by one.
B. Right-clicking on the column header "userID" and choosing "Convert To --> Attribute" from the context-menu; then double-clicking on the column header "userID" and typing "uid" to change the name.
C. Switching to "Text View" and adding a new "uid" attribute to each "Person" element manually; then using Copy/Paste to copy the values from the "userID" elements to the new attributes one by one; then deleting all the "userID" elements one by one.
D. It is neither possible to change elements to attributes nor can you copy values from elements into attributes; one must manually delete all the elements and create new attributes and manually re-enter the content.
Question 42
You are in the process of architecting a new XML Schema to unify expense reports across your organization. Multiple departments have submitted example XML documents with their use-cases to assist in the process. How can you quickly create a first iteration of an XML Schema that matches all the XML use case documents that you have received?
A. Open each example document in XMLSpy and collect all information from the various example documents; create an outline of the XML Schema by hand; enter the XML Schema into XMLSpy using the XML Schema editor.
B. Open the first example document in XMLSpy and use the "Generate DTD/Schema" command to automatically create an XML Schema that matches the first example document; repeat the same process for all example documents; use the "Come Open File" command on the Tools menu to come all the schemas with each other and find out where the differences are; create a common schema manually based on the differences.
C. Write a JavaScript function that opens each XML example document and creates an XML Schema for it; then write a second JavaScript function that uses the "Merge Schema" command to sequentially merge each schema with the previous schemA
D. Create a project in XMLSpy and add all example XML documents to one folder; right-click on the folder and choose "Generate DTD/Schema" from the context menu; pick "W3C Schema" from the options dialog and click OK; XMLSpy automatically creates an XML Schema that captures a unified content model for all the example documents.
Question 43
XMLSpy allows you to generate an XML Schema from a relational database schemA Although you can use most databases via ADO or ODBC, XMLSpy supports some databases natively. Which databases are these (choose all that apply)?
A. Microsoft Accessâ¢
B. DB2â¢
C. Oracleâ¢
D. Microsoft SQL Serverâ¢
E. Sybaseâ¢
Question 44
XMLSpy allows you to put breakpoints in XSLT and XML files for XSLT transformation debugging. Where can you place such breakpoints?
A. A single element per line only.
B. Comments, elements, and processing instructions.
C. Multiple elements or attributes per line.
D. Processing instructions or text nodes.
E. Processing instructions only.
Question 45
What are the 5 views supported in XMLSpy (Professional and Enterprise Editions)?
A. Code View, Grid View, HTML View, XML Schema View, WSDL Design View.
B. Authentic View, Browser View, Grid View, Text View, XML Schema/WSDL Design View.
C. Debugging View, Grid View, HTML View, XML Schema View, WSDL Design View.
D. Code View, Grid View, HTML View, Tree View, XML Schema View.
E. AuthenticView, Code View, Grid View, HTML View, Project View.
Question 46
Which of the following editing tasks is not an ideal usage for Grid View?
A. Changing elements into attributes in an XML instance document.
B. Re-arranging the ordering of elements and attributes in an XML instance document.
C. Cutting and pasting XML data into and out of external applications such as Microsoft Excel.
D. Developing visual user interfaces for WYSIWYG XML data entry.
E. Re-naming elements and attributes in an XML instance.
Question 47
Given a valid XML Schema, which of the following can be auto-generated using XMLSpy? (Choose all that apply.)
A. A relational database schema.
B. A sample XML instance document.
C. Program code (Class files in Java, C++ or C#).
D. A Document Type Definition (DTD).
Question 48
What is the purpose of the "Authentic View" included in XMLSpy?
A. Inspecting the output of XSLT transformations.
B. Viewing client transaction processes of a SOAP.
C. Editing and displaying the output of a wireless application.
D. Visually creating XSL: FO transformations used in XML to PDF transformations.
E. Editing XML in a word-processor like environment.
Question 49
What are SPL files used for in XMLSpy?
A. They are templates used to configure the output of XMLSpy's XML Schema based code generator.
B. They are configuration files used to validate XML files.
C. They configure XMLSpy's Project View (e.g. folders, properties, etC).
D. They are pre-compiled assemblies used by the XMLSpy SOAP Debugger.
E. They are an interface for configuring 3rd party software plug-ins for XMLSpy.
Question 50
The XMLSpy diagram below is an illustration of which of the following?
A. A visual representation of the Document Type Definition for a threeType element.
B. A globally defined, XML Schema simple type definition.
C. An XML Schema type which uses type derivation.
D. An XML Schema element which uses a substitution group.
E. None of the above.
murugesan
|
|

September 21st, 2006, 11:01 AM
|
 |
Wrox Author
|
|
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
|
|
If you have one or two questions where you are confused after doing detailed study, for example because you find conflicting information in different sources, then it might be reasonable to ask on a forum for advice or opinions. But posting the whole questionnaire verbatim, and asking others to do your homework for you, is ridiculous. It is almost certainly breaching someone's copyright, apart from anything else.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| online exam project |
manisha agarwal |
ASP.NET 2.0 Basics |
1 |
September 2nd, 2008 10:07 AM |
| certifed exam |
sen22 |
ASP.NET 2.0 Basics |
0 |
April 21st, 2007 06:57 AM |
| bea exam preps ? |
pinna |
Need help with your homework? |
0 |
November 12th, 2006 02:12 AM |
| hp exam stuff ? |
olango |
Need help with your homework? |
1 |
September 23rd, 2006 06:47 PM |
| Need guidance for SCEA exam |
Prasad_Salaskar |
J2EE |
2 |
May 9th, 2006 10:43 AM |
|
 |