Free Cheat-test Samples and Demo Questions Download
Adobe exams Adobe
Apple exams Apple
Avaya exams Avaya
Check Point exams Check Point
Cisco exams Cisco
Citrix exams Citrix
CIW exams CIW
CompTIA exams CompTIA
CWNP exams CWNP
EC-Council exams EC-Council
EMC exams EMC
Exin exams Exin
Fortinet exams Fortinet
GIAC exams GIAC
Hitachi exams Hitachi
HP exams HP
IBM exams IBM
Isaca exams Isaca
ISC exams ISC
ISEB exams ISEB
Juniper exams Juniper
LPI exams LPI
McAfee exams McAfee
Microsoft exams Microsoft
Oracle exams Oracle
PMI exams PMI
Riverbed exams Riverbed
SNIA exams SAP
Sun exams SAS
Symantec exams Symantec
VMware exams VMware
All certification exams

IBM 000-142 Exam - Cheat-Test.com

Free 000-142 Sample Questions:

1. XML data is stored and retrieved within a relational database for a data­centric application by means of mapping XML schema elements to database tables. There are concerns that the queries and updates to this database are slow due to the number of joins required in the SQL. What is the best option for improving the storage and retrieval of this XML data?
A. Transform XML documents into canonical form before persisting.
B. Modify the current XML schema by converting elements to attributes where possible and re­map to tables in order to reduce the number of tables and therefore the number of joins required.
C. Store the XML data as CLOBs without decomposing them into relational tables and provide an 'id' based lookup.
D. Modify the current XML schema by merging all of the XML documents into a main XML document and query using XPath.
Answer: B, D

2. A developer wishes to make an XSLT template more robust by checking a parameter passed to it for errors and boundary conditions. The template accepts a parameter of type number. What condition will NOT have to be checked?
A. number greater than allowed range
B. value of 0
C. type of the parameter value
D. Integer numbers
Answer: C

3. Calculating sub­totals from an XML document using XSL transformation requires special considerations. Which of the following options is the best solution to solve this problem?
A. Create a fragment variable containing the values to total, and then use the node­set() XSLT extension and the XPath "sum()" function to calculate the value.
B. Create a special XSLT variable that contains the results of an XPath query that performs a "sum()" of the values to be totaled.
C. Use XSLT recursion to define a variable value that calculates the "value­of" the elements to be sub­totaled.
D. Use XSLTC to precompile a custom Java translet that will extract the values to be totaled and returns the sum of those values. This return value is then used in an XSL variable for output.
Answer: A

4. Analyze the following XML and DTD fragments that implement ID, IDREF and IDREFS used to link manager and subordinate relationships. Where is the error in the implementation of this logic? employees.dtd:
<!ATTLIST employee empid ID #REQUIRED>
<!ATTLIST employee mgrid ID #IMPLIED>
<!ATTLIST employee mgr IDREF #IMPLIED>
<!ATTLIST employee subs IDREFS #IMPLIED>
employees.xml:
<employees>
<employee empid="e1" mgrid="m1" subs="e2"><name>Bob Smith</name></employee>
<employee empid="e2" mgrid="m2" mgr="m1" subs="e3 e4"><name>Carol Jones</name></employee>
<employee empid="e3" mgr="m2"><name>Keith Martin</name></employee>
<employee empid="e4" mgr="m2"><name>Monica Williams</name></employee>
</employees>
A. The subs IDREFS is formatted improperly for the second employee record.
B. The mgrid must be defined as "#REQUIRED" in the DTD.
C. The empid and mgrid attributes conflict as an element may only have a single ID attribute.
D. First two records are invalid as each employee record may have either empid or mgrid attribute, but not both.
Answer: C

5. Consider the following XML document:
<?xml version="1.0" encoding="UTF­8"?>
<Books>
<Book ID="001">
<Title>Finding New World</Title>
<Author>Jone Smith</Author>
</Book>
<Book ID="080">
<Title>How to Programming</Title>
<Author>Tom Alston</Author>
</Book>
</Books>
An XML developer wants to generate a HTML document that lists the ID, title and author of a book in a
HTML table. Which of the following stylesheets can achieve the desired result?
A. <?xml version="1.0" encoding="ISO­8859­1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="Books">
<html>
<body>
<table width="100%" border="1">
<xsl:for­each select="/">
<tr>
<td><xsl:value­of select="@ID"/></td>
<td><xsl:value­of select="Title" /></td>
<td><xsl:value­of select="Author" /></td>
</tr>
</xsl:for­each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
B. <?xml version="1.0" encoding="ISO­8859­1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table width="100%" border="1">
<xsl:for­each select="Books/Book">
<tr>
<td><xsl:value­of select="@ID"/></td>
<td><xsl:value­of select="Title" /></td>
<td><xsl:value­of select="Author" /></td>
</tr>
</xsl:for­each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
C. <?xml version="1.0" encoding="ISO­8859­1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<table width="100%" border="1">
<xsl:for­each select="Books/Book">
<tr>
<td><xsl:value­of select="ID"/></td>
<td><xsl:value­of select="." /></td>
</tr>
</xsl:for­each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
D. <?xml version="1.0" encoding="ISO­8859­1" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="Books">
<html>
<body>
<table width="100%" border="1">
<xsl:for­each select="Book">
<tr>
<td><xsl:value­of select="ID"/></td>
<td><xsl:value­of select="Title" /></td>
<td><xsl:value­of select="Author" /></td>
</tr>
</xsl:for­each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Answer: B

6. Given the following DTD line, which of the following XML documents is valid?
<!ATTLIST employee empNum ID #REQUIRED>
A. <employee empNum="abcde"/>
B. <employee empNum="12345"/>
C. <employee empNum=""/>
D. <employee empNum="abcde"/> ... <employee empNum="abcde"/>
Answer: A

7. What will the following XSLT snippet return, if the value of parameter i is "redivider"?
<xsl:template name="Do">
<xsl:param name="i"/>
<xsl:variable name="j" select="string­length($i)"/>
<xsl:choose>
<xsl:when test=" $j < 2 ">
<xsl:value­of select="$i"/>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="k" select="floor($j div 2)"/>
<xsl:call­template name="Do">
<xsl:with­param name="i" select="substring($i, 1, $k)"/>
</xsl:call­template>
<xsl:call­template name="Do">
<xsl:with­param name="i" select="substring($i, $k+1, $k+1)"/>
</xsl:call­template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
A. rreeddiivviiddeerr
B. rediv
C. redivider
D. rdvdr
Answer: C

8. What is the result of the following XSLT template if the value of k is the string 'foo'?
<xsl:template name="Do">
<xsl:param name="j" select="3"/>
<xsl:param name="k"/>
<xsl:if test="$j">
<xsl:value­of select="$k"/>
<xsl:call­template name="Do">
<xsl:with­param name="j" select="$j ­ 1"/>
<xsl:with­param name="k" select="$k"/>
</xsl:call­template>
</xsl:if>
</xsl:template>
A. 'foo'
B. 'foo' (repeated until stack overflow)
C. 'foofoofoo'
D. 'foo foo foo'
Answer: C

9. In a museum, XML data stored on powerful servers is served to customers through Web browsers running on network­connected computers. The performance of those computers is limited. Which of the following approaches will best suit the XML transformation?
A. Pass both the XML data and stylesheets to web browsers.
B. Output XHTML via a server­side XSL transformation.
C. Use only a subset of the XHTML and use Format Objects to apply style.
D. Transform the XML data into the open format document and display.
Answer: B

10. Which XPath axis below may be described as "all nodes that contain the context node, but not the context node itself?"
A. ancestor::
B. ancestor­or­self::
C. namespace::
D. preceding::
Answer: A

11. An Intranet Web application provides news for thousands of users inside one company. The application gets XML data from a database and then transforms the data into HTML with server­side XSLT. Currently the web application performs poorly. Which of the following actions should the application developer take to address the problem?
A. Update the database to a higher version.
B. Use well formed XHTML tags in the application.
C. Supply the XML data and the stylesheet to Web browsers.
D. Use XSL­FO to make the transformation.
Answer: C

12. Which of the following is a trait that distinguishes XSLT 2.0 from XSLT 1.0?
A. xsl:for­each in XSLT 2.0 supports arbitrary sequences in addition to node sets.
B. xsl:value­of in XSLT 2.0 includes an attribute called "delimiter" that allows delimited sequences.
C. xsl:variable in XSLT 2.0 includes an attribute called "type" to indicate type.
D. xsl:with­param in XSLT 2.0 does not throw an error if that parameter is not defined in the called template.
Answer: A

13. An online bookstore offers services that enables customers to view the online eBooks with a variety of Web browsers and order high quality hard copies on demand. If the bookstore stores all the book contents with XML format, which of the following rendering approaches is the most suitable?
A. When browsers request and customers order hard copies, transform the XML data with XSL­FO and then convert the file into PDF for viewing and printing.
B. When browsers request and customers order hard copies, render the XML data with CSS and then use the file for viewing and printing.
C. When browsers request, render the XML data with CSS. When customers order hard copies, transform the XML data with XSL­FO and then convert the file into PDF for printing.
D. When browsers request, render the XML data with XSL­FO and then convert the file into PDF for viewing. When customers order hard copies, transform the XML data with CSS and then use the file for printing.
Answer: C

14. The link element in the following XML fragment is the context node. Its target attribute is stored within the xsl:variable linkTarget. What XPath expression will find the page element whose id attribute value is described by the value of linkTarget?
<site>
<page id="000"/>
<page id="001">
<page id="001_000">
<link target="003_000"/>
</page>
<page id="001_001"/>
</page>
<page id="002"/>
<page id="003">
<page id="003_000"/>
<page id="003_001"/>
</page>
</site>
A. ..//page[@id = $linkTarget]
B. ../../page[@id = '003']/page[@id = linkTarget]
C. //page[@id = $linkTarget]
D. ancestor::page/ancestor::page/child::page/child::page[id = $linkTarget]
Answer: C

15. Which of the following statements regarding CSS transformation of XML is valid?
A. It can be used to render XML into PDF.
B. It can render XML into a format appropriate for printing.
C. It may only be applied to well formed XHTML documents.
D. It can merge multiple XML documents into a single XHTML for browser rendering.
Answer: B

16. Which two of the following may NOT be nested within a CDATA section?
A. HTML documents
B. Javascript source
C. Other CDATA sections
D. The XML escape characters (<, >, &, ', and ")
E. XSLT that needs to be processed
Answer: C, E

17. Which of the following answers best defines the XForms design goal?
A. Utilizes external DTD for field types and value limits.
B. Encapsulates all JavaScript code within data elements.
C. Defines complex input controls based on assigned Schema.
D. Separates the forms content from presentation.
Answer: D

18. What is the correct value for the match attribute of the xsl:template below to select all elements within an XML document?
<xsl:template match="">
<xsl:value­of select="name()"/>
<xsl:value­of select="@id"/>
<xsl:apply­templates/>
</xsl:template>
A. node()
B. */*
C. //
D. /
Answer: A

19. An application needs to process XML documents containing data retrieved from a legacy system. Some of the documents use character sets which are not supported by the XML parser. Which of the following is the best solution to address this problem?
A. Implement a custom parser to handle the legacy character sets.
B. Implement a pre­processor to convert documents with unsupported characters sets to UTF­8.
C. Define two XML Schema documents for each of the character sets.
D. Add the definitions of the legacy character sets to the parser's configuration file.
Answer: B

20. Which of the following is NOT included within a generated JAXB 2.0 package?
A. A name, which may be derived directly from the XML namespace URI.
B. A set of Java element interfaces representing element declarations occurring with the DTD.
C. An ObjectFactory class containing an instance factory method for each Java content and element interface.
D. A Javadoc for the package.
Answer: B

21. Data contained in an XML document must be rendered into HTML for display in a client's Web browser. Portions of the data are restricted. Restricted data must never be sent to a user that does not have privilege to access it. Using XSLT, what is the best approach to rendering the data?
A. Use XSLT on the server to remove the restricted data and transform the XML to HTML on the client side.
B. Use XML security to secure the parts of the XSLT document that transform the restricted data.
C. Use XSLT to transform the XML to HTML on the client side.
D. Use XSLT on the server to remove the restricted data and transform the XML to HTML on the server side.
Answer: D

22. Applying a digital signature to an XML document consists of which action?
A. Encrypting the document using a public key from a Certificate Authority (CA).
B. Encrypting the document using a private key.
C. Calculating a hash of the document and encrypting the hash value using a private key.
D. Associating the document to a custom PGP namespace.
Answer: C

23. An application parses large XML documents received via an HTTP connection. The data does not need to be modified. The volume of traffic is high and performance is an issue. Which of the following technologies should be used to parse the incoming document?
A. DOM
B. SAX
C. XPath
D. XSLT
Answer: B

24. Which two of the following characteristics of processing XML documents will lead a developer to use SAX instead of DOM in order to achieve good performance?
A. The document structure is changed.
B. The document size is large.
C. Documents must be merged.
D. Validation rules are complex and detailed.
E. Parsing speed is critical.
Answer: B, E

25. Two trusted applications exchange a high­volume of data as XML. The content of the elements in the XML document is unstructured text and the document must be validated. Which of the following will produce the best performance?
A. Namespaces should be used that clarify the meaning of each element.
B. The document should use attributes instead of elements wherever possible.
C. The structure of the document should be defined using DTD.
D. The structure of the document should be defined using XML Schema.
Answer: C

26. Which two of the following should a developer consider to improve the performance of web applications that transform XML documents?
A. Use SAX instead of DOM.
B. Use XSLTC.
C. Use a binary search of the SAX document tree.
D. Use namespaces.
E. Do not validate instance documents from external sources.
Answer: A, B

27. A Java­based application receives manually­written XML documents in different formats. Each different format is well documented using XML Schema. Upon receiving a document, the application:
­ Transforms the document into a common format
­ Parses the document with a validating parser
­ Verifies the structure of the document
­ Transforms the document into a legacy format and sends to a separate legacy system for further processing
Which of the following steps is LEAST necessary?
A. Transforming the document to a common format.
B. Validating the document.
C. Verifying the structure of the document.
D. Transforming the document into the legacy system's format.
Answer: C

28. An application saves and restores internal program state across invocations. The offline state resides in an XML file. Only that one application reads and writes the file. The designer wrote a constraint schema for the XML, and had the application validate the state file upon input. Which of the following indicates why?
A. To detect data corruption.
B. To automatically convert string fields to numeric.
C. To optimize parsing.
D. To bind the file to a set of state objects.
Answer: A

29. A DTD, as opposed to an XML schema, often provides a sufficient level of validation for which of the following?
A. A narrative document.
B. An application record.
C. A CSS stylesheet.
D. An XSLT stylesheet.
Answer: A

30. A schema written in W3C Schema Language defines a person's full name as a complex type composed of three child elements: first name, middle name, and last name. How should the schema author specify the middle name element as optional?
A. Set attribute minOccurs="0" on the element.
B. Set attribute maxOccurs="­1" on the element.
C. Set the minimum length of the element's string type to zero.
D. Use the ? operator in the element declaration.
Answer: A


© 2014 Cheat-Test.com, All Rights Reserved