IBM Pre-assessment/Sample Test 141 (current version, as of October 28, 2002; includes corrections made by IBM)

Current Requirements:
Test
Number
Test Name Number
of Items /
Questions
Number /
Percentage
Needed
to Pass
Time
(Minutes)
141 XML and Related Technologies 44 26 / 59% 90

Pre-assessment test with complete answers:
1. A database application stores the database definitions in XML format. Currently the XML formats are defined using DTDs. If the definition format can be changed during a possible redesign, which of the following can be MOST logically applied?

  1. DTD is best suited for defining XML format of any form or vocabulary; thus, there is no need to change the definition format.
  2. XML Schema should be used to define the XML formats as it has means to define more constraints and data types.
  3. XML Information Format should be used to define the database information.
  4. XSLT stylesheets should be used to convert between database definitions.
Single Select - Please select the best answer (one and only one choice must be selected).
2. For an application that makes use of XML, the input XML data set consists of many elements and is very large. The BEST way to filter or extract a subset of information from the complete XML document would be to:

  1. Parse the input into a DOM tree and traverse the resulting tree.
  2. Use SAX to extract the required elements.
  3. Make use of an XSL style sheet.
  4. Use the Scalable Vector Graphics (SVG) vocabulary.
Single Select - Please select the best answer (one and only one choice must be selected).
3. A developer has been assigned to select a technology for a B2B integration project. The company receives XML documents from various partners. The XML documents do not belong to one common vocabulary, and the partners will not select a common vocabulary. Which of the following W3C recommendations could BEST be used to solve the above problem?

  1. Publish one common XML Schema for all business partners.
  2. Convert all the business partner XML documents into a semantic web.
  3. Write a DOM parser that can understand any of the business partner's XML documents.
  4. Develop one or more XSL stylesheets to convert the incoming XML documents into the XML vocabulary used within the organization.
Single Select - Please select the best answer (one and only one choice must be selected).
4. Which of the following is MOST likely to be required in the design? The Web site for a financial services company will include both web-based trading (e-trades) and the financial research reports to help investors make their decisions. As part of the application architecture, note the following:
* XML will be used as the data interchange format between the web-based application and the company's legacy trading systems.
* The legacy system data format is not XML.
* XML will be used as the EFT (Electronic Funds Transfer) data interchange format with the customer's bank, from which funds will be withdrawn to settle the trade.
* XML will be used as the source format for the financial research reports, which will be searchable and displayable from the web browser.

It is very important to management that the Web site looks professional, that customers have pleasant interaction, and that the site has performance characteristics. Additionally, management wants to ensure that financial reports can still be produced on paper with high-quality typesetting and four-color printing.

  1. XML from the financial institution must be validated and transformed into a format expected by the legacy system.
  2. XML from the legacy system must be transformed into a format expected by the financial institution's application.
  3. The DTD for financial reports must be consistent with element names used by the financial institution.
  4. The DTD for EFT transactions must be consistent with element names used by the browser.
Single Select - Please select the best answer (one and only one choice must be selected).
5. The configuration information for a software application is stored in XML format. The configuration has to be parsed once during the start-up of the application. The loading of the configuration will also require searching across XML constructs. Performance is not a concern. These requirements can be MOST easily accomplished by designing the configuration loader based on which of the following?

  1. XML Information Set
  2. XSLT
  3. DOM
  4. SAX
Single Select - Please select the best answer (one and only one choice must be selected).
6. Which of the following are TRUE about Web Services Definition Language?

  1. WSDL defines the XML structure for messages using DTD.
  2. WSDL is less suitable to describe Web Services than UDDI.
  3. WSDL can be used to describe a SOAP Service.
  4. WSDL is a method for performing RPC.
Single Select - Please select the best answer (one and only one choice must be selected).
7. To define an XML vocabulary, an XML developer could use:

  1. UML
  2. DTDs
  3. Namespaces
  4. XML Schema
  5. XSLT
Multiple Select - Please select all of the correct answers (this question has 2 correct choices).
8. Which of the following would raise an error if the empID attribute's data type was defined as type ID in the DTD?

  1. <name empID="17563">Joe Smith</name>
  2. <name empID="ft:17563">Joe Smith</name>
  3. <name empID="a17563">Joe Smith</name>
  4. <name empID="">Joe Smith</name>
Multiple Select - Please select all of the correct answers (this question has 2 correct choices). Ans: a, d.
9. The element WidgetDesc begins with descriptive text and is followed by Size and Shape descriptions. The Size and Shape description are each optional and may occur in any order. Which of the following is the correct content model for WidgetDesc?

  1. <xsd:element name="WidgetDesc" content="mixed">
    <xsd:complexContent>
    <xsd:node type="#PCDATA"/>
    <xsd:element name="Size" use="optional"/>
    <xsd:element name="Shape" use="optional"/>
    </xsd:complexContent>
    </xsd:element>
  2. <xsd:element name="widgetDesc">
    <xsd:complexType mixed="true">
    <xsd:all>
    <xsd:element name="Size" type="xsd:string" minOccurs="0" />
    <xsd:element name="Shape" type="xsd:string" minOccurs="0" />
    </xsd:all>
    </xsd:complexType>
    </xsd:element>
  3. <xsd:element name="WidgetDesc">
    <xsd:complexType>
    <xsd:node type="#PCDATA" use="optional"/>
    <xsd:element name="Size" use="optional"/>
    <xsd:element name="Shape" use="optional"/>
    </xsd:complexType>
    </xsd:element>
  4. <xsd:element name="WidgetDesc" type="xsd:string">
    <xsd:complexContent>
    <xsd:any>
    <xsd:element name="Size" minOccurs="0"/>
    <xsd:element name="Shape" minOccurs="0"/>
    </xsd:any>
    </xsd:complexContent>
    </xsd:element>
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
10. Processing instructions can be used for all of the following EXCEPT:

  1. a method for passing the name of a stylesheet.
  2. a method of extending documents without altering DTD validation.
  3. a mechanism for extending schemas that cannot otherwise be modified.
  4. a mechanism for indicating hierarchical levels of structure.
  5. a hook for scripts or server-side includes.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices). Ans: a, d.
11. Assume that XML is being used to model Invoice data that consists of a Heading, Customer Information, Item Purchased, and Price and Quantity for each. Which of the following is the correct XML Schema design for this situation?

  1. <xsd:element name="Invoice">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Heading type="xsd:string"/>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="Address" type="xsd:string"/>
    <xsd:element name="ItemNumber" type="xsd:integer"/>
    <xsd:element name="Descr" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
  2. <xsd:element name="Invoice" type="custInf"/>
    <xsd:complexType name="custInf"> <xsd:sequence>
    <xsd:element name="Heading" type="xsd:string"/>
    <xsd:element name="Customer" type="xsd:string"/>
    <xsd:element name="Item" type="xsd:integer"/>
    <xsd:element name="Customer">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="JobTitle type="xsd:string"/>
    <xsd:element name="Address" type="usAddress"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="Item">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Number" type="xsd:string"/>
    <xsd:element name="ShortDescr" type="xsd:string"/>
    <xsd:element name="Descr" type="xsd:string"/>
    </xsd:element name="Price" type="xsd:currency"/>
    <xsd:element name="Quantity" type="xsd:integer"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
  3. <xsd:element name="Invoice">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Heading" type="xsd:string"/>
    <xsd:element name="Customer" type="custInf"/>
    <xsd:element name="Item" type="itemInf" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="custInf">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="Address" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="itemInf">
    <xsd:sequence>
    <xsd:element name="Number" type="xsd:integer"/>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="Price" type="xsd:decimal"/>
    <xsd:element name="Quantity" type="xsd:integer"/>
    </xsd:sequence>
    </xsd:complexType>
Single Select - Please select the best answer (one and only one choice must be selected). Ans: c.
12. Consider the following XML instance document:
<GarmentSizes>3 3.5 4 4.5 5 6 7 8</GarmentSizes>
Which of the following XML Schema type derivations for GarmentSizes will MOST correctly capture the above requirement?

  1. <xsd:simpleType name="garmentSizeType">
    <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
  2. <xsd:simpleType name="garmentSizeType">
    <xsd:list itemType="xsd:decimal"/>
    </xsd:simpleType>
  3. <xsd:simpleType name="garmentSizeType">
    <xsd:list itemType="xsd:string"/>
    </xsd:simpleType>
  4. <xsd:simpleType name="garmentSizeType">
    <xsd:restriction base="xsd:decimal"/>
    </xsd:simpleType>
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
13. Which of the following is the purpose of the XML Linking Language?

  1. XLink integrates a variety of applications from library catalogs and world-wide directories to syndication and aggregation of news, software, and content to personal collections of music, photos, and events using XML as an interchange syntax.
  2. XLink specification defines a language to be used as a fragment identifier for any URI-reference that locates a resource of Internet media type text/xml or application/xml.
  3. XLink proposes a syntax for providing the equivalent of HTML BASE functionality generically in XML documents by defining an XML attribute named xml:base.
  4. XLink allows elements to be inserted into XML documents in order to create and describe links between resources. It uses XML syntax to create structures that can describe the simple unidirectional hyperlinks of today's HTML, as well as more sophisticated links.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: d.
14. A retail company is in the process of defining a product catalog. The requirements specify that the product be uniquely identified by its SKU (Stock Keeping Unit) and contain a product name, a product description, and a price. Additionally, some products can have up to five accessories. Each accessory is a product by itself. Therefore, only the SKU of the accessories need to be related to the product. Finally, it is also a requirement to enable addition of a promotion code that would be effective during a specific period of time.

A developer defines the following XML Schema for the product:

<schema
targetNamespace=''http://www.SampleStore.com/Account''
xmlns='http://www.w3.org/2001/XMLSchema'
xmlns:ACC= 'http://www.SampleStore.com/Account'>
<complexType name="Product">
<sequence>
<element name="SKU" type="integer"/>
<element name="Name" type="string"/>
<element name="Description" type="string"/>
<element name="UnitPrice" type="decimal"/>
<element name="Accessory" minOccurs="0"
maxOccurs="unbounded" type="ACC:Product"/>
</sequence>
</complexType>
Which of the following statements is TRUE?

  1. Replacing maxOccurs="unbounded" with maxOccurs="5" will make the schema definition match the requirement.
  2. maxOccurs="unbounded" can be removed since by default this attribute is added to any XML Schema definition which already has an minOccurs="0" attribute.
  3. The XML Schema parser will expect a definition with the name Accessory defined in the same document.
  4. Type of the SKU definition must be written as type="sku"
  5. Type of the UnitPrice definition must be written as type="amount"
Single Select - Please select the best answer (one and only one choice must be selected). Ans: a.
15. Consider the following content models:
<!ELEMENT doc (title?, chap*)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT chap (sect+)>
<!ELEMENT sect (para+)>
<!ELEMENT para (#PCDATA)>

Which of the following XML instances would be successfully validated against this DTD?

  1. <doc>
    <chap>
    <para>Text</para>
    </chap>
    </doc>
  2. <doc>
    <chap>
    <sect>
    <para>Text</para>
    </chap>
    </doc>
  3. <doc>
    <title>Text</title>
    </doc>
  4. <doc>
    <title>Text</title>
    <sect>
    <para>Text</para>
    </sect>
    </doc>
Single Select - Please select the best answer (one and only one choice must be selected). Ans: c.
16. Consider the following example:

<xsd:element name="Price">
<xsd:complexType>
<xsd:attribute name="currency" type="xsd:string"/>
</xsd:complexType>
</xsd:element>

The "currency" attribute declaration is equivalent to which of the following DTD declarations?

  1. <!ATTLIST Price currency CDATA #REQUIRED>
  2. <!ATTLIST Price currency CDATA #FIXED>
  3. <!ATTLIST Price currency CDATA #IMPLIED>
  4. <!ATTLIST Price currency PCDATA #IMPLIED>
Single Select - Please select the best answer (one and only one choice must be selected). Ans: c.
17. A developer needs to convert records from a relational database into XML. Each row in a table is represented as an element in the document How can the developer represent relationships in the database?

  1. Use ID and IDREF attributes to represent unidirectional relationships.
  2. Use ID and IDREF attributes to represent bi-directional relationships.
  3. Copy the data in a relationship into the element for the row containing the foreign key.
  4. Copy the data in a relationship into the element for the row containing the primary key.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices). Ans: a, d.
COMMENT: See Schema Recomendation, http://www.w3.org/TR/xmlschema-0/ , search for report.xsd and look into it; you'll see how they create an element called "dummy1" which is unique; so you're actually copy primary key data, not foreign key ones.
18. The XML Namespaces specification is useful for:

  1. preventing object names in the DOM from conflicting with names in legacy APIs.
  2. facilitating the use of longer, more descriptive element and attribute names.
  3. allowing XML elements to use the same names as related XML attributes.
  4. allowing reuse of a common set of names across different XML vocabularies.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: d.
19. Consider the following rules that have been determined for a set of XML information elements:
oEither Title or ShortTitle is required
o Title must be followed by either P or Table
o ShortTitle must always be followed by P
Which content model BEST depicts these rules and provides the greatest flexibility for future changes?

  1. ((Title, P) | (Title, Table) | (ShortTitle,P))
  2. (((Title | ShortTitle), P) | (Title, Table))
  3. ((Title, (P | Table)) | (ShortTitle, P))
  4. (((Title, P?) | (Title, Table?)), (ShortTitle,P?))
Single Select - Please select the best answer (one and only one choice must be selected). Ans: c.
20. An XPath expression returns "hello" in a text node when the expression is processed on an XML document. The XML document is well-formed and valid, but does not contain "hello". Which of the following BEST explains the situation?

  1. The axis is incorrectly specified.
  2. The XSLT processor resolved the entity references.
  3. An incorrect relative location path is specified with respect to the current context node.
  4. There is a missing "/" at the end of the location path.
  5. There is a missing "@" somewhere in the location path.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
21. Which of the following XSLT elements changes the current context node?

  1. xsl:attribute
  2. xsl:call-template
  3. xsl:for-each
  4. xsl:choose
  5. xsl:element
Single Select - Please select the best answer (one and only one choice must be selected). Ans: c.
22. Which of the following statements is NOT TRUE about elements whose parent is an <xsl:stylesheet> element?

  1. <xsl:param> tags cannot appear at this level.
  2. <xsl:include> tags can appear at the beginning of a stylesheet.
  3. <xsl:key> tags can be used to help find elements with a particular property.
  4. <xsl:variable> variables are global to the entire stylesheet.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: a.
23. If two DOM nodes are equivalent, which of the following are TRUE?
I. The DOM nodes have the same node type and node name.
II. The node data are the same.
III. The collection of attribute names are the same.

  1. I and II only
  2. I and III only
  3. II and III only
  4. I, II and III
Single Select - Please select the best answer (one and only one choice must be selected). Ans: d.
24. Consider the following XML document:

<?xml version="1.0" ?>
<doc>
<name>
<fname>
Tom
</fname>
<lname>
Crown
</lname>
</name>
<position>
CIO
</position>
<year>
10
</year>
</doc>

The output of the following XSL template would be:

<xsl:template match="name">
<xsl:apply-templates select="following-sibling" />
</xsl:template>

  1. Tom
  2. Tom Crown
  3. CIO
  4. CIO 10
Single Select - Please select the best answer (one and only one choice must be selected). Ans: d.
25. What is the result of the following XPath expression?

<xsl:value-of select="translate('--aaa--','aba-','ABC')" />

  1. --aaa--
  2. --AAA--
  3. AAA
  4. AaC
Single Select - Please select the best answer (one and only one choice must be selected). Ans: c.
COMMENT: exact example from W3 XPath recomendation http://www.w3.org/TR/xpath#function-translate.
26. Which of the following statements are TRUE about error handling in SAX2?

  1. Parsing errors are divided into two categories: errors and warnings.
  2. The default behaviors for warning() and error() callbacks is to do nothing.
  3. The ErrorHandler is registered with the ContentHandler via the setErrorHandler() method.
  4. Parsing continues after an error occurs.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices). Ans: b, d.
27. A developer wants to invoke the following template:

<xsl:template name="draw-point">
<xsl:param name="x" select="'0'"/>
<xsl:param name="y" select="'0'"/>
...

Which of the following will correctly invoke this template?

  1. <xsl:apply-template name="draw-point">
    <xsl:with-param="x" select="50"/>
    <xsl:with-param="y" select="50"/>
    </xsl:apply-template>
  2. <xsl:apply-template name="draw-point">
    <xsl:with-param name="x" select="50"/>
    <xsl:with-param name="y" select="50"/>
    </xsl:apply-template>
  3. <xsl:call-template="draw-point">
    <xsl:with-param="x" select="50"/>
    <xsl:with-param="y" select="50"/>
    </xsl:call-template>
  4. <xsl:call-template name="draw-point">
    <xsl:with-param name="x" select="50"/>
    <xsl:with-param name="y" select="50"/>
    </xsl:call-template>
Single Select - Please select the best answer (one and only one choice must be selected). Ans: d.
28. When using a SAX2 parser, a developer wants to get called back by the parser when problems occur. Which of the following can be used to accomplish this goal?

  1. Implement the ErrorHandler interface.
  2. Implement the DocumentHandler interface.
  3. Implement the ContentHandler interface.
  4. Subclass the DefaultHandler class and override methods for events of interest.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices). Ans:a, d.
29. Wherever a pants element is allowed in an XML Schema, the XML Schema should also allow a jeans or a shorts element. Which of the following satisfies this requirement?

  1. <xs:element name = "pants" type = "pantDetails" />
    <xs:element name = "jeans" type = "pantDetails" substitutionGroup = "pants" />
    <xs:element name = "shorts" type = "pantDetails" substitutionGroup = "pants" />
  2. <xs:element name = "pants" type = "pantDetails" abstract="true" />
    <xs:element name = "jeans" type = "pantDetails" substitutionGroup = "pants" />
    <xs:element name = "shorts" type = "pantDetails" substitutionGroup = "pants" />
  3. <xs:element name = "pants" type = "pantDetails" />
    <xs:element name = "jeans" type = "pantDetails" />
    <xs:element name = "shorts" type = "pantDetails" />
  4. <xs:element name = "pants" type = "pantDetails" abstract="true" />
    <xs:element name = "jeans" substitutionGroup = "pants" />
    <xs:element name = "shorts" substitutionGroup = "pants" />
Single Select - Please select the best answer (one and only one choice must be selected). Ans: a.
30. Consider the following XML data:

<book>
<title>XML Certification Guide</title>
<chapter>
<title>Prologue</title>
<section>
<title>Introduction</title>
<content>
...
</content>
...
</chapter>
...
</book>

The element "title" can appear as a child of many elements. Which of the following XSL templates is most ideally suited for extracting the values of the "title" element?

  1. <xsl:template match="/title">
    <p><xsl:text>Title: </xsl:text><xsl:value-of select="."/></p>
    </xsl:template>
  2. <xsl:template match="//title">
    <p><xsl:text>Title: </xsl:text><xsl:value-of select="."/></p>
    </xsl:template>
  3. <xsl:template match="title">
    <p><xsl:text>Title: </xsl:text><xsl:value-of select="@title"/></p>
    </xsl:template>
  4. <xsl:template match="title">
    <p><xsl:text>Title: </xsl:text><xsl:value-of select="self"/></p>
    </xsl:template>
Single Select - Please select the best answer (one and only one choice must be selected). Ans:b.
31. Which of the following statements are TRUE about node changes using DOM2?

  1. setValue() to update a node with the specified value.
  2. Node value changes are not supported. A new document must be written to edit existing nodes.
  3. appendChild() to add a node to a specified parent node.
  4. insertNode() to add a node fragment to a location in a document.
  5. removeChild() returns the target node fragment so that it can be inserted elsewhere.
Multiple Select - Please select all of the correct answers (this question has 2 correct choices). Ans: c, e.
32. When using the DOM API, how does a developer access attribute values?

  1. call the getAttribute() method on Node
  2. call the getAttribute() method on Element
  3. call the getAttributes() method on Node and iterate over the NamedNodeMap
  4. call the getAllAttributes() method on Element and iterate over the NamedNodeMap
  5. call the getAttributeNode() method on Element and access the value property on Attr
Multiple Select - Please select all of the correct answers (this question has 3 correct choices). Ans: b, c, e.
33. A company wants to transmit parts of its sales order database to an outsourced service provider using XML. Which of the following is LEAST necessary?

  1. Convert sales order database records into XML.
  2. Validate the sales order XML before transmitting it to the service provider.
  3. Use a DTD or XML Schema to describe the sales order data.
  4. The service provider validates the XML sales order data after receiving it from the company.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
34. Which of the following statements is TRUE concerning SAX2 events?

  1. Textual data results in at least one characters() callback, which contains the text as an array.
  2. Using XMLFilters results in a skippedEntity() callback, effectively removing the object from the processing stream.
  3. Callbacks to startAttribute() follow a startElement() callback, if the element has attributes.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: a.
35. Consider the following XSL fragment where <tr> is a table row:

<xsl:template match="item">
<xsl:element name="tr">
<xsl:if test="position() mod 3 = 0">
<xsl:attribute name="bgcolor">yellow</xsl:attribute>
</xsl:if>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
Which of the following would result from the XSL fragment?

  1. Every third table row is yellow.
  2. The first and second table rows are always yellow.
  3. Table rows where the content of each <tr> element is the text "yellow".
  4. Table rows output only if their original content was the text "yellow."
Single Select - Please select the best answer (one and only one choice must be selected). Ans:a.
36. Which of the following statements BEST describes the meaning of "rendering XML"?

  1. It is the process of converting XML documents to other formats that may be used directly to present the information found in the XML document.
  2. XML is only used to render Web pages expressed in HTML.
  3. When a new rendering of XML data is added to a system, the DTD must be changed.
  4. The process of rendering XML typically updates the XML source material as well as producing the intended output.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: a.
37. An online parts supplier is creating an XML-based application to deliver data to B2B suppliers and vendors, and also for use by B2C clients of various types. Which of the following provides the BEST design solution for the various clients consuming the XML data?

  1. Use a single XSL stylesheet to transform XHTML1.1 linking to a CSS2 stylesheet for formatting.
  2. Process the HTTP request and execute client-specific XSL transformations according to the client's capabilities.
  3. Evaluate the client's needs based on the HTTP request and deliver formatted HTML to the client.
  4. Deliver XML content to B2B clients and XHTML/HTML to B2C clients.
  5. Pass XML directly to B2B clients, and use Active Server Pages or Java Server Pages to deliver customized HTML to B2C clients.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
38. An XML document may contain text that has been marked as being "emphasized" in some manner as follows:

... this is <emphasize>important</emphasize>
information ...

Which XSL formatting object fragment BEST encapsulates the above source XML when targeted towards a printed document?

  1. <fo:emphasize>important</fo:emphasize>
  2. <fo:wrapper font-weight="bold">important</fo:wrapper>
  3. <fo:block>important</fo:block>
  4. <fo:important font-weight="bold"/>
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
39. An XML developer is formatting XML output to HTML for multiple client types. Client memory footprint is a consideration. Which of the following approaches would BEST suit this environment?

  1. Use only a subset of XHTML 1.1, relying on Format Objects to apply style.
  2. Let the client process both the XML and the XSL documents.
  3. Output HTML via a server-side XSL Transformation and embed CSS2 style information in the xsl:template actions.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: c.
40. Which of the following statements is FALSE about CSS and XSL?

  1. CSS stylesheets can be used to style XML documents and HTML documents.
  2. XSL stylesheets can be used to style XML documents and RTF documents.
  3. Unlike CSS, XSL can be used to perform XML transformations.
  4. XSL allows the use of the CSS formatting model.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
41. While analyzing an XSLT stylesheet for performance it was noticed that the following XSLT statement occurred frequently:

<xsl:for-each select="//book[author='Smith']">

To improve the performance of the stylesheet, the XML developer's approach would be which of the following?

  1. <xsl:variable name="SmithBooks" select="//book[author='Smith']"/>
    ...
    <xsl:for-each select="$SmithBooks"/>
  2. <xsl:key name="book-author" match="book" use="author"/>
    ...
    <xsl:for-each select="key('book-author', 'Smith')"/>
  3. <xsl:variable name="books" select="//book"/>
    ...
    <xsl:for-each select="$Books[author='Smith']"/>
  4. <xsl:param name="books" select="//book"/>
    ...
    <xsl:for-each select="$books[author='Smith']"/>
Multiple Select - Please select all of the correct answers (this question has 2 correct choices). Ans: a, b.
42. Midway through the project, it is decided that the technical manuals must have their screen formatting enhanced in the Web browser. Implementing this functionality is MOST likely to require:

  1. changes to the XML transformation between technical manual and ordering DTDs or XML Schemas.
  2. a change to the XML rendering rules for technical manuals.
  3. an enhancement to the DTD or XML Schema for technical manuals.
  4. adjustments to the part number linking approach.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
43. A development team has moved an XML application from the development server to the staging server. While testing the XML application on the new server, the application returns a message indicating that there is an "invalid entity reference" error in the DTD. The MOST likely cause of this error is:

  1. The DTD was not compiled on the new server, and the parser is failing to recognize the entities in the XML document instance.
  2. The DTD references external entities that were not migrated.
  3. The DTD needs to be converted to an XML Schema that uses tokens instead of entities.
  4. The parser is incompatible with the XML application.
  5. The application must be recompiled on the new server.
Single Select - Please select the best answer (one and only one choice must be selected). Ans: b.
44. What is the mechanism for bringing in ALL of the declarations and definitions of an XML Schema into another XML Schema, which belong to the same namespace?

  1. <xsd:include
    schemaLocation="http://www.ibm.com/xmlcertify/Types.xsd/">
  2. <xsd:import
    schemaLocation=http://www.ibm.com/xmlcertify/Types.xsd
    namespace="http://www.ibm.com/xmlcertify/">
  3. <xsd:schema
    schemaLocation="http://www.ibm.com/xmlcertify/Types.xsd/">
  4. <!DOCTYPE type SYSTEM
    http://www.ibm.com/xmlcertify/Types.xsd>
Single Select - Please select the best answer (one and only one choice must be selected). Ans: a