Sample Q Test 142

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Sample Q Test 142 as PDF for free.

More details

  • Words: 1,900
  • Pages: 15
Below are some sample questions.please help in finding teh answers with reasons (if known). 1)An XML-aware database is used to store customer information as XML. An application needs to access these documents and create a list of all the cities in which the customers are based. Which of the following represents the best way to achieve this task?

A. Parse the documents in the database using a SAX parser. B. Parse the documents in the database using a DOM parser. C. Use XQuery to extract the required information from the database. D. Load each document into DOM, and use XPath to extract required information. 2)The following XML instance document for a warehouse inventory is processed using DOM to replace the price references with the current prices from the database to create a new catalog mailing document: Wood Guitar <price dbref="g3905778/price"/> ... (1000 items) Which step can be done to enhance performance?

A.

Use SAX instead of DOM to replace the prices as the items are parsed. B. Route s to parse to different DOM parsers. C. Use XPath to query the content in a more direct fashion. D. Use XSL Transformations to replace the prices. 3)An application is required to parse a complex document. Extracting the required information from the document will require multiple passes with a SAX parser. The application designer wants to avoid parsing the document multiple times. Which of the following approaches should be considered?

A. Use XSLT to transform the document into a structure that can be parsed in one pass. B. Use multiple parser instances to concurrently parse sections of the document. C. Write more elaborate XPath statements to extract the information using the parser. D. Use XML namespaces to extract the required information in a single pass. 4)Which of the following statements about XML Encryption is true?

A. Can encrypt all or a portion of an XML document. B. Is only applicable to Schema-validated XML files. C. Once encrypted, is safe from Schema/DTD changes. D. Once decrypted, is an exact reproduction of the source document. 5)A Java application constructs an XML document, constrained by XML Schema, and securely passes it to another application. Why does the receiving application need to validate the document?

A. The document may have been tampered with during transmission. B. Some of the restrictions in the XML Schema document might not be enforced by the Java application. C. Schema errors could easily lead to XML documents which are not wellformed and valid. D. Differences in character sets between the two systems could lead to incompatibilities. 6)) An HR system will store employee data as XML in a database. Web users will search, update and display those employee records. Which of the following is the most important issue to take into

consideration?

A. An XML-aware database should be used to facilitate data lookup. B. Any data transformations should be performed as close as possible to the database. C. The data in the document should be structured as a relational table as much as possible. D. The XML should be transformed into XHTML and then stored in a database. 7)A Java application is experiencing memory problems with DOM, complexities with SAX, and performance problems with XSLT. Which two of the following alternatives are available to alleviate these problems? (Choose 2)

A. ebXML B. XLink C. XSLTC D.

JAXB E. XSL-FO 8)Assume that a W3C XML Schema Language document uses the following prefix declaration: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> How does a schema designer enforce that locally declared attributes must be namespace-qualified within XML instance documents?

A. <xs:schema .... localAttributes="qualified"> B. <xs:schema .... attributeFormDefault="qualified"> C. Locally-declared schema attributes are always namespace-qualified. D. Declare the attributes within namespace-qualified elements. 9)Consider the following XML document: a Node <SubNode xmlns="http://www.ccompany.com/namespace">a sub node When a namespace-aware XML SAX2 application parses this document, what will the qualified name be for the element Node?

A. http://www.acompany.com/namespace:Node B. http://www.bcompany.com/namespace:Node C. http://www.ccompany.com/namespace:Node D. Node 10)Why is a DTD, rather than an XML Schema, sufficient for defining the constraints of XML documents with text data such as OpenOffice, DocBook, and TEI?

A. A DTD provides sufficient numeric data typing for section numbering. B. W3C Schema places a content length limit on character data contained in an element. C. W3C Schema has explicit namespace support. D. Such documents tend to have no typed data. 11)Assume that a W3C XML Schema Language document uses the following prefix declaration: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> How could the schema's developer designate a potential root element?

A. Place an xs:root element at the top level of the schema, specifying name and type attributes. B. Place an xs:element element at the top level of the schema, specifying name and type attributes. C. Specify a root="true" attribute on one and only one xs:complexContent element. D. Specify a root="true" attribute on one and only one xs:group eleme 12)A developer can use an XML schema or a DTD to govern which of the following XML document validation requirements?

A. Constrain an element to occur only 49 times. B. Specify a type grammar for one element. C. Specify a default value for an optional attribute. D. Constrain an element to any numeric value. 13)An application will access data that will reside in XML documents stored in an RDBMS. What are two vendor-independent choices for storing each document in the RDBMS?

(Choose 2) A. In a table view. B. As a SOAP envelope. C. In a table's CLOB column. D. As RDBMS meta-data. E. Decomposed into various columns or tables. 14)A back office application receives bank statements from remote servers in XML format for archival purposes. They should be available on demand in PDF format. The request rate for statements in PDF format is low. What is the BEST approach to persist these statements in RDBMS?

A. Convert each received statement to PDF and persist as a BLOB into the RDBMS. B. Persist the XML as a CLOB into the RDBMS, and convert to PDF on a per request basis. C. Decompose XML to relational data, persist relational data in RDBMS, convert to PDF as requested.

D. Convert each received document to PDF, and persist both the PDF and XML into the RDBMS. 15)What are the typical steps using JAXP to create a SAX parser to process XML documents?

A. DocumentBuilder-> SAXParser->XMLReader->DefaultHandler B. DocumentBuilder-> XMLReader ->SAXParser->DefaultHandler C. SAXParserFactory->SAXParser->XMLReader->DefaultHandler D. SAXParserFactory-> XMLReader ->SAXParser->DefaultHandler 16)An XML instance document will be parsed by a SAX parser with validation turned on. Which two of the following actions must a developer take to stop processing if a validation error occurs? (Choose 2) A. Call XMLReader.setContentHandler(). B. Call XMLReader.setErrorHandler(). C. Implement a callback() method that throws an Exception.

D. Implement an error() method that throws an Exception. E. Create a catch block for SAXExceptions. 17)An XHTML document that contains a large amount of dynamic content, and static embedded style information and JavaScript is several hundreds of kilobytes in size. The document is served by a J2EE web application over HTTP. The end-user performance is unacceptable due to the time taken to download the document because of its size. Which of the following solutions is most likely to improve performance?

A. Break the document into several smaller fragments and enable HTTP parallel rendering to re-join them on the client. B. Create a stub XHTML file to load onto the browser and then use AJAX calls to retrieve the remainder of the document in the background. C. Enable browser caching of the document using directive <META HTTPEQUIV="CACHE-CONTROL" CONTENT="PRIVATE"> D. Extract all style and JavaScript information into an external file for CSS and JavaScript each to enable browser caching. 18)A company HR application back-end is based on XML technology. Employees can view all their personal information via Web browsers. Also employees can customize the views based on their interests. Where is the best place to transform the XML data? A.

XML data is transformed on server-side when client browser requests. B. Transfer both XML data and sytlesheet to client browser. C. It doesn't matter where to transform the XML data. D. Within the Database, transform the XML data into HTML. 19)What is the result of the following XSLT template? <xsl:template name="Do"> <xsl:param name="j" select="1"/> <xsl:if test="$j <= 5"> <xsl:value-of select="$j"/> <xsl:call-template name="Do"> <xsl:with-param name="j" select="$j + 1"/>

A. 01234 B. 12345 C. 15 D. 12345 20)How should an XForm be configured to handle a date type input

control?

A. Define the field as a schema type xsd:date and the browser styles the date selector. B. Define a custom date selector plugin based on browser type. C. Assign the field as an input type "" to signal the browser to use a custom date selector widget. D. There are no specific provisions defined in XForms to handle date types 21)An online Web application serves thousands of people that use a variety of Web browsers. The application stores the information as XML into a database. Which of the following statements reflect the best approach for rendering XML data to support almost all the browsers and acquire better performance? A. Render the XML using the XSL-FO on the server-side and then covert to PDF. B. Render the XML into the HTML including all style information using XSLT on the server-side. C. Render the XML into the HTML with XSLT on the server-side then supply the CSS to clients. D.

Send XML data and stylesheets to the Web browsers to let the client process the stylesheets. 22)In XML Schema, a complex element type may be extended by other schemas using the <xsd:extension> tag. What is the proper procedure to force all derivative schemas to maintain certain required elements?

A. The base schema should wrap the required elements within the complex type with an <xsd:restriction> tag. B. Required elements within the complexType of the base schema must include a "xsd:final='true'" attribute. C. The base schema should contain a "final='extension'" attribute within the <xsd:complexType> tag. definition D. Nothing is required as all elements within a complex type defined in the base schema are immutable by definition 23)Which of the following is NOT a concern when refactoring the STRUCTURE of an XML document?

A. Element naming convention. B. Ease of Authoring. C.

Ease of Processing. D. Levels of element nesting. 24)A developer wants to make an XSLT template robust by checking that the parameter x has been passed in. What is the best way to check for this?

A. Initialize x to an illegal value via a select attribute within the xsl:param tag, then test for this value later in the template. B. Set the value of x via declaring a xsl:variable using the value passed to the xsl:param tag. C. Test the value of x for NaN (by comparing its value to 0 div 0), then set a default value if needed. D. Test the value of x with the XPath function not($x), then set a default value if needed. 25)A developer is designing a new schema so that an element's attribute is both required and unique. Which of the following will enforce this rule?

A. Use the <xs:unique xs:key="{xpath selector}"> tag inside the attribute definition. B. Use the <xs:key> tag around the attribute definition.

C. Use the <xs:key> tag inside the element definition that references the attribute with a <xs:field> tag. D. Use a combination of <xs:unique> and <xs:key> tags around the attribute definition.

Related Documents

Sample Q Test 142
November 2019 14
Sample Test
June 2020 17
Sample Test
June 2020 23
142
November 2019 35
142
November 2019 37
142
December 2019 37