PRX301 - XML Fix

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

In a 3-tier model identify the front-end, middle-tier and back-end

Browser, WebServer, Database Server

Schemas can be documented in human readable format by using

Comments

What does CGI stand for

Common gateway interface

xmlDoc.async= false mean:

Complete document must be loaded before futher processing

Identify the type of content of the PRODUCT element in the following XML code fragment. <PRODDET> <PRODUCT> <PRODID="P001"></PRODID><font face="fnt__2013101081549_0" size="14" color="#000000" letterspacing="0" kerning="1"> <PRODDESC>Baby Food </PRODDESC><font face="fnt__2013101081549_0" size="14" color="#000000" letterspacing="0" kerning="1"> <PRICEPERUNIT> 12 </PRICEPERUNIT> </PRODUCT> </PRODDET>

ComplexType

What does the following statement do?<SPAN ID = "colorName" STYLE = "font-family: monospace" DATASRC = "#Colors" DATAFLD = "ColorName"></SPAN><BR>

It assigns the TDC control named Colors to a span element for display purposes.

SAX is

D. An XML parser

The ________ attribute is added to a TABLE element's opening tag to bind a data island to a table

DATASRC

Which operation cannot be performed on XML schema collection ?

DELETE

An MNC receives at its headquarter from its subsidiaries, XML documents containing various reports of that subsidiary. These reports need to be displayed to the person responsible at the headquarter for that subsidiary in a userfriendly manner (allowing searches through the document) and the person is allowed to make any changes/comments that he/she desires. Once the user is done with all the changes/comments the information needs to be fed into the central database. Which of the following is MOST appropriate for processing these XML documents?

DOM

Builds the document as a in-memory data structures?

DOM

Treating a document as an object, extracting information, making changes and querying the document through code is termed as:

DOM

Which XML parser supports XPath capability?

DOM

Which of the following types of parsers is used for object-based parsing?

DOM

A small retailer maintains inventory data in an XML document. This inventory data is read by an application.

DOM Parser

Which of the following is/are optional in the creation of an XML file?

Entities

Which of the following statements is not true?

Entities that appear anywhere in an XML document are referred to as Parameter entities

Which is the CORRECT statement?

Entity beans represent persistent state objects (things that dont go away when the user goes away)

Which of the following statement is true about the Entity class?

Entity class must be declared as top level class

In SAX, to provide customized DTD handling, application need to implement

EntityResolver

A valid SOAP message should contain which of the following XML elements ?

Envelope, Body

The most common way to assign a value to a variable is by using what?

Equals sign

For what reason does the following JSP fail to translate and compile? <html><body><%! int x; %><%=x ; %></body></html>

Error in JSP Expression

HTML code:<B> Customer </B><p>Michelle Abraham <br> Salmonella Apartments<br> Programmer<br></p>Peter is asked to represent the information given in the HTML code snippet above in XML. He represents the information as follows: <CUSTOMER> <NAME> Michelle Abraham <ADDRESS> Salmonella Apartments </NAME> </ADDRESS> PROFESSION> Programmer </PROFESSION> </CUSTOMER> Identify the error in the above code and suggest a solution for the same.

Error on line: <NAME> Michelle Abraham <ADDRESS> Salmonella Apartments </NAME> </ADDRESS> . Solution: The closing tag of the Name element should be written before the ADDRESS element.

Namespaces ensure that there is no conflict within element names and also determines how to process them.

False

Only a browser can access a result document.

False

SaxonB is the only software that can process an XQuery.

False

Sorting, filtering, pattern matching are few of the things that XSL cannot be used for.

False

The 'border' is used to set the width, color and style of the two borders.

False

The SAX parser is able to transverse an XML document

False

The data() function returns the text value of a variable.

False

The element contains only XSL elements.

False

The element instructs the CSS to evaluate a condition before extracting an element.

False

The roundhalftoeven() function rounds half the value returned by a function.

False

The same version of a DOM parser must be used on all computers.

False

The three versions of XHTML 1.0 are XHTML 1.0 Transitional, XHTML 1.0 Frameset, and XHTML 1.0 Strict.

False

The width attribute has a default value of 1.

False

The xsl:value-of element can only be used to retrieve the value of the xml elements; attributes must be retrieved with the xsl:attrib-value element.

False

To assign the same style rule to different elements, we apply the same number of declarations as the number of elements to several selectors.

False

To expose methods from a Web service and make them accessible outside the service, you use the <WebMethod()> attribute.

False

URL includes URI and URN.

False

Unlike XML documents, XSLT documents do not need to include an XML declaration statement at the top of each XSLT document.

False

Using the xsl:prefix before every XSL element is recommended by NOT required.

False

Verify the snippet given below: <?xml version="1.0" ?> <img src=bullet_d.gif></img

False

XML allows creation of multiple root elements

False

XML can only be transformed into HTML or XHTML.

False

XML cannot be used with HTML.

False

XML defines the way elements relate to one another within the documents tree structure, and specifies the attributes

False

XML documents can be formatted using text editors.

False

XML elements cannot be empty.

False

XML stores data in fixed lengths.

False

You avoid conflict between an XML special character and information in an XML document by using a comment.

False

You can repeat lines of code within the XSL stylesheet by defining an apply template.

False

You can use the node's getNodeType method and check the results it returns against fields such as Node.ELEMENT_NODE, Node.TEXT_NODE, and so on.

False

You cannot set valid options when declaring an attribute.

False

You must use a parser to read an XML document.

False

small-caps' is a value supported by font-style.

False

xml:stylesheet is a special declaration for linking XML documents wit XSLT stylesheets, and it must be placed before your xml declaration to successfully link your XML file to your XSLT code.

False

he ones we discussed today are that an XML document must contain one or more elements. One element, the root element, must contain all the other elements.

Finally, each element must nest inside any enclosing elements correctly.

fi/catalog/cd[@upc=fi + upc + fi] means

Find the upc attribute that matches the value of the upc variable in the cd element

In which of the following scenario,using XML native storage would be inappropriate?

Fixed schema

The statement states

For each customer element of the source document thats a child of customers

Consider the following HTML code. <HTML> <SCRIPT LANGUAGE = "JavaScript"> <!-- document.writeln("Hello World"); // --> </SCRIPT> </HTML> What would a browser capable of scripting display when executing this code?

Hello World

An attribute gives you more information, and is always assigned a quoted value in XML.

Here's how you might add an attribute named language to this element: <greeting language = "en">hello</greeting>.

The Document Object Model

Is an XML parser

In a B2B organization, it is required to exchange XML messages conforming to a single vocabulary

Is the parser at the receiving end a validating parser? Does the parser handle XML Schemas or DTDs? Does the document instance override the internal DTD subset?

What does the following statement do? <SPAN ID = "colorName" STYLE = "font-family: monospace" DATASRC = "#Colors" DATAFLD = "ColorName"></SPAN><BR>

It assigns the TDC control named Colors to a span element for display purposes.

In case of 3 style sheets containing a reference to the same element, then identify the style sheet used.

Last

Default Fetch Behavior for Many-To-Many

Lazy

Default Fetch Behavior for One-To-Many

Lazy

Identify the line/s containing an error 1)<?xml version="1.0"?> 2)<note date=12/11/99> 3)<to>Ravi</to> 4)<from>Amit</from> 5)<heading>Reminder</heading> 6)<body>Make good food please</body> 7)</note>

Line 2

Given: 1. <?xml version="1.0"?> 2. <note date="12/11/99"> 3. <to>Ravi</to> 4. <from>Amit</from> 5. <heading>Final Exam</Heading> 6. <body>Try yourself<body> 7. </note> Choose the correct statement

Line 6 contains error

A model applied to static document objects is:

Linear Model

CDATA is text that will be parsed by parser. Identify whether the statement is valid.

Not Valid

What is wrong with the following VBScript code? If (s = t) Then u = s + t ElseIf (s > t) Then u = r Else u = n End If

Nothing

What is wrong with the following line of code? <P><FONT SIZE='5'>This is a test.</FONT></P>

Nothing

What gets printed when the following JSTL code fragment is executed? Select the one correct answer.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="item" value="2"/> <c:if test="${var==1}" var="result" scope="session"> <c:out value="${result}"/> </c:if>

Nothing gets printed.

What would the browser display if the following script was executed? <SCRIPT LANGUAGE = "JavaScript"> for( int i = 0; i < 5; i++ ) document.write("X"); </SCRIPT>

Nothing, the script would generate an error

What is wrong with the following VBScript code? 1 Select Case x 2 Case 1 3 Call MsgBox("1") 4 Case 2 5 Call MsgBox("2") 6 Case Else 7 Call MsgBox("?") 8 End Select

Nothing.

What is wrong with the following VBScript code? Select Case x Case 1 Call MsgBox("1") Case 2 Call MsgBox("2") Case Else Call MsgBox("?") End Select

Nothing.

Event ________ fires constantly whenever the mouse is in motion.

ONMOUSEMOVE

When the mouse moves over an element which of the following is triggered?

ONMOUSEOVER

The model which is identified as a collection of objects used to access and manipulate data stored in an XML document is an:

Object Model

Which of the following is false?

Objects do not have the property of information hiding.

Use the ____ request when sending data to the server

POST

Order by

Places all return values in ascending order by default

Which of the following nodes in a DOM tree are always leaf nodes (nodes with no children)?

Processing Instruction Notation CDATA Section

Which of the following statements regarding processing instructions are true ?

Processing instructions can be used as a mechanism for extending schemas that cannot otherwise be modified, The target for a processing instruction must be a valid XML name

Contents of sys.xml_schema_collections are :

Predefined namespaces

An XPath _________ is similiar to a programming if...then conditional statement that allows you to select elements based upon certain criteria.

Predicate

Which of the following can be considered a valid element name?

Product$Name

Which of these is not a valid value for dispatcher element of filter-mapping. Select the one correct answer.

RESPONSE

What are the two prevailing styles of web services

RESTFUL and SOAP

Which of the following is NOT done with JavaScript?

RGB Colors

Which of the following is NOT a type of popup box?

Radio

What does REST stand for

Representational State Transfer

Theasync = false means

Statements will not execute until the XML document is being loaded.

Which of the following feature of SQL Server was used before XML technology for semi structured data?

Stored Procedure

In Xpath, which node has a parent node and it may have child node too

Text

Which of the following is true?

Text qualifiers encapsulate the data in a field.

What is the purpose of the line beginning with A.nodec in the following script?

The .nodec appended to A is an extension of class styles and will apply only to A elements that specify nodec as their class

Which of the following is/are optional in the creation of an XML file?

The <?xml version="1.0"?> statement

The asterisk at the end of an element name in a DTD means its

The DTD contains zero to many of this element

A DTD is written for the above XML document such that the above XML document is validated successfully

The DTD needs to declare xml:space as an attribute of the root element

Which statements are true?

The DTD specifies ... + The DTD contains the list of tags allowed within the XML document, and their types and attributes.

Consider the Formal Public Identifier -//W3C//DTD 1.8//IND Choose the correct answer

The Formal Public Identifier is not valid because the fourth field is not valid

Which of the following statement is correct. Select the one correct answer

The HttpServletResponse defines constants like SC_NOT_FOUND that may be used as a parameter to setStatus method

What gets printed when the following JSP code is invoked in a browser. Select the one correct answer. <%= if(Math.random() < 0.5) %> hello<%= } else { %> hi <%= } %>

The JSP file will not compile.

Which of these are true. Select the two correct answers

The default value of isThreadSafe attribute of page directive is true .When isThreadSafe attribute of page directive is set to true, a thread is created for each request for the page

<?xml version=1.0 encoding=UTF-8?> <aaa> <bbb>ccc</bBb> </aaa> Choose the correct answer

The document is not well-formed

Given: <?xml version="1.0" encoding="UTF-8"?> <email> <to>Joe</to> <from>John</from> <heading>Final Exam</heaDing> <body>Try your self</body> </eMail> Choose the correct statement Choose one answer.

The document is not well-formed

Which of the following statement explain the characteristics of the methods used to modify nodes in a DOM tree?

The getChildNodes() returns a list of nodes containing all the child nodes of specific node

Identify the attribute applied to a property to give it precedence over other properties.

!important

A good choice would be the <Contributor> element.

.

DATASRC and DATAFLD are the two HTML attributes you normally use to bind an HTML control to a DSO.

.

Every <p> element needs a closing tag, </p>.

.

Here's one solution: let $name := local-name($elem)

.

Here's one way to do it: define global $data {treat as document data (glx:document-validate("data.xml", "document"))}

.

In Java 1.4 or later, you can use a Java DocumentBuilderFactory object to create a DocumentBuilder object. Then you can use the DocumentBuilder object's parse method to parse an XML document and create a Java Document object.

.

In XHTML, every XHTML document must have a <head> element, and every <head> element must contain at least a <title> element.

.

One way is to use the DATASRC attribute of the <TABLE> element to connect to a DSO and the DATAFLD attribute of a <SPAN> element in each <TD> element.

.

SAXParserFactory object to create a new SAX factory. You create a SAX parser by using the SAXParserFactory object, call its

.

The <Header>, <Body>, and <Fault> elements are the three child elements you can use in a SOAP envelope.

.

The <table> element is supported in both XHTML 1.0 Strict and XHTML 1.1.

.

The W3C suggests that you use style sheets instead of the <frame> and <frameset> elements. To replace frames, you can often use a <div> element and position it where you want it.

.

The namespace is ">http://www.w3.org/1999/xhtml".

.

The possible values you can assign to the xlink:type attribute, which sets the type of the XLink, are "simple", "extended", "locator", "arc", "resource", "title", and "none".

.

This is a trick question. You can't use standalone attributes in XHTML. Every attribute must be assigned a quoted value.

.

You also need to set the ref attribute of the input control to "/data/input".

.

You can access it as dso .recordset("address"), where dso is the name of the DSO

.

You can call a Document object's getElementsByTagName method like this: document.getElementsByTagName("senator")

.

You can call xmlDocumentObject.getElementsByTagName("senator") to get a list of all the <senator> elements in a document.

.

You can check the XMLTextReader object's NodeType property, which you can compare to fields such as XmlNodeType.XmlDeclaration and XmlNodeType.ProcessingInstruction.

.

You can use XML like this: <xforms:instance> <data xmlns=""> <input>Hello!</input> </data> </xforms:instance>

.

You need to add to the Windows application a Web reference to the Web service, and you need to create an object corresponding to that service. Then you can call the Web service's members by using that object.

.

createTextNode method, append the text node to the <child> element by using the element's appendChild method, and append

.

parse method, and implement the SAX methods you want (for example, the startElement method)

.

starting position in the array. The length of the text is also passed to you

.

the <child> element to the <element> element by using the <child> element's appendChild method

.

Whenever you need to select an element and use a predicate on that same element, you will need to use a ______ to access that element's value.

. (period)

What is stored inside the variable value after the following line of code is executed?

. The navigator object does not contain an attribute named version

In an XPath expression, if you put _______ where an element would normally go, you can select the parent element.

.. (2 periods)

Which of the following snippet deletes an attribute of an Element node

... root.removeAttributeNode(attr);

External style sheets are saved with the ________ extension.

.css

XSLT files must be save with _______ extension.

.xsl

Identify the operator used to search across any number of levels of the hierarchy from the root of the document.

//

With XPath expressions, _______ are used to select the descendants of an element.

// (double forward slashes)

Name the location of compiled class files within a war file? Select the one correct answer

/WEB-INF/classes

In what year did the World Wide Web Consortium release its draft of XML?

1996

What is the value of i after the following statements? i = 2; i += 25;

27

Apple Safari supports XML and XSLT from version _____.

3

Firefox supports XML, XSLT, and XPath from version _____.

3

How many parameters are there for replaceData() method ? (start, length,string)

3

The DOM is separated into how many different parts?

3

What is index type for XML index entries ?

3

What is the value of i after the following statements? i = 2; i++;

3

Which of the following statements will you use to declare an unrestricted element called DESCRIPTION which can contain any element declared elsewhere in a DTD?

<!ELEMENT DESCRIPTION ANY>

Identify the correct syntax

<!ELEMENT element-name (child-element-name,child-element-name,....>

For declaring a child element 'message' to occur zero or more times inside the 'note' element, identify the correct syntax

<!ELEMENT element-name (child-name*)>

Syntax for element declaration is

<!ELEMENT element-name (element-content type)>

An element declaration has the following syntax:

<!ELEMENT elementname category>

Which of the following Document type definitions will validate the below XML document successfully ?

<!ELEMENT root EMPTY><!ATTLIST root rootattr CDATA #FIXED "value">,<!ELEMENT root (#PCDATA)>,<!ELEMENT root ANY><!ATTLIST root rootattr CDATA "value">

For the XML parser to ignore a certain section of your XML document, which syntax is correct?

<![CDATA[ Text to be ignored ]]>

Which syntax is correct for JSP Scriptlets?

<% code %>

Example JSP scriptlet

<% for () {} %>

Which of the following are valid iteration mechanisms in jsp?

<% int i = 0; for(;i<5; i++) { %> "Hello World"; <% i++; } %>

Assume that you need to write a JSP page that adds numbers from one to ten, and then print the output.<% int sum = 0;for(j = 0; j < 10; j++) { %>// XXX --- Add j to sum<% } %>// YYY --- Display the sum Which statement when placed at the location XXX can be used to compute the sum. Select the one correct statement

<% sum = sum + j; %>

Example JSP scriptlet Declaration

<%! ... %>

Which syntax is correct for JSP Declarations?

<%! code %>

Example JSP expression. This expression is evaluated and turned into a string

<%= string %>

Now consider the same JSP example as last question. What must be added at the location YYY to print the sum of ten numbers. Select the one correct statement

<%= sum %>

Your jsp page uses classes from java.util package. Which of the following statement would allow you to import the package? (Choose one)

<%@ page import="java.util.*"%>

The page directive is used to convey information about the page to JSP container. Which statement is legal page directive. Select one correct statement

<%@ page info="test page" session="false"%>

The page directive is used to convey information about the page to JSP container. Which of these are legal syntax of page directive. Select the two correct statement

<%@ page info="test page" session="false"%> <%@ page session="true" %>

The declaration is used to declare the xml tag library using in JSP as

<%@ taglib prefix=x uri= http://java.sun.com/jsp/jstl/xml %>

You can set a page to be an error page either through web.xml or by adding a page directive _____

<%@page errorPage="errorPage.jsp" %>

Which of the following is legal JSP syntax to print the value of i. Select the one correct answer

<%int i = 1;%> <%= i %>

Which is not a correct name for an XML documents?

<1dollar>

All processing instructions begin and end with

<? ... ?>

What is the correct declaration syntax for the version of an XML document

<? xml version="1.0"/?>

Syntax for an XML declaration is

<?xml version="1.0"?>

Which of the following XML documents are NOT well formed ?

<?xml version="1.0"?><root attr1="val1" attr2="" attr1="test"><root/></root> </root>, <?xml version="1.0"?><root attr1="1value" attr2=""><root> 5 is < than 4 </root> </root>

Which of the following lines can be used in an XML document named Test.xml to associate it with a stylesheet named Test.css

<?xml-stylesheet href="Test.css" type="text/css"?>

Syntax for referencing a cascading style sheet in an XML document is:

<?xml-stylesheet type="text/css" href="url"?>

Which of these is the correct syntax to link a CSS file to an XML document?

<?xml-stylesheet type="text/css" href="url"?>

Which of these is the correct syntax to link an XSL file to an XML document?

<?xml-stylesheet type="text/xsl" href="candidate.xsl"?>

Identify the correct syntax

<?xml-stylesheet type="text/xsl" href='url'?>

Identify the correct syntax used by the XML document for displaying a stylesheet.

<?xml-stylesheet type="txt/css" href="abc.css"?> + <?xml-stylesheet type='txt/css' href='abc.css'?>

What is a correct way of referring to a stylesheet called "mystyle.xsl?

<?xmlstylesheet type="text/xsl" href="mystyle.xsl"?>

Which of the following XML code snippets is/are correct?

<BOOK> <AUTHOR> abc</AUTHOR> </BOOK>

Which of the following code snippet of HTML document are correct structured?

<HTML><HEAD><TITLE>...</TITLE>...</HEAD><BODY ...>...</BODY></HTML>

In which of the following do you set the MIME type of the external style sheet?

<LINK></LINK>

Which of the following selections is the proper way to apply this CSS rule: .blue { color: blue }

<P CLASS = "blue">

Which of the following is not a valid PARAM setting for TDC controls?

<PARAM NAME =CLASSID: CLSID:333C7BC4-460F-11D0-BC04-0080C7055A83>

The \n,\t, \r escape sequences do not affect HTML rendering unless they are used between which tags?

<PRE></PRE>

Setting an element's position to relative is done within which of the following

<STYLE></STYLE>

Which of the following line of code are correct namespace declarations?

<Title:catalog xmlns:book="http://www.fpt.edu.vn">

You can create an XML island that makes the XML data in a document named data.xml available as a DSO named data by using this HTML element:

<XML SRC="data.xml" ID="data"></XML>

To prevent a type from being derived for defining new types you can specify

<complexType name="Address" final="restriction" />

Which of the following entries in an XML document will cause an application reading the document to use null values for the field named "customerAddress"?

<customerAddress xsd:nill="true"/>

Which of the following defines what is meant by a valid document?

A document which conforms to the rules of a DTD

What is address, phone in the declaration ?

A group

To refer to a particular location or element in the array, we specify the name of the array and the ________ of the particular element in the array.

position number

If an element's position is declared as absolute then ________ .

positioning is set according to the margins of its parent element

The ____________________class makes every entity bean different.

primary key

The binding of TDC to a table requires setting the DATASRC property in the ________.

table element

Which of the following XPath function calls will return the value 10 when invoked ?

string-length("XML-Schema")

How do you read the first character in a string?

stringName.charAt(0);

Which method is used to search for a substring?

stringVariable.indexOf(subString)

Which of the following is not a JavaScript keyword?

sub

The ________ multiple selection structure is used to handle multiple decisions making and can be used to replace multiple if and if/else statements.

switch

The space use of XML indexes can be found in the table-valued function named?

sys.dm_db_index_physical_stats

<elemencName xmlns=' URL' > is the correct syntax for declaring a default namespace

t

A CSS style sheet is associated with an XML document using the processing instruction xml-stylesheet.

t

A Markup Language is defined as a set of rules adding some meaning to the content and structure of documents.

t

A default namespace applies to the element on which it was defined and all descendants of that element

t

A default value is the value that is assigned automatically to the element when there is no other value specified

t

A namespace is a collection of names that can be used as element names or attribute names in XML document

t

A node-set is an unordered group of nodes from the input document.

t

An XML Schema defines how many child elements can appear in an XML document?

t

An XML Schema defines the structure of an XML document

t

An XML document can be displayed in different formats in different display devices such as computer, printer, and the like

t

By default the white space in elements is not truncated.

t

CDATA starts with "<[!CDATA[" and ends with "]]>".

t

CSS is a simple, styling-based approach that does not require advanced programming skills

t

Cascading Style Sheets derived the term cascade from the ability to mix and match rules from different sources

t

Characters like ">" and "&" can be used in CDATA sections.

t

Client reduces the server load by sending large amount of information in one XML document to the server.

t

DOCTYPE declarations are specified in the prolog of the XML document

t

DOM is a W3C standard.

t

DOM parser allows random access to document.

t

DTD doesnt support namespaces.

t

DTDs are used to validate XML documents

t

DTDs contain declarations for elements and entities

t

Data in HTML cannot be structured.

t

Declarations are sorted by the order specified

t

Declarations are sorted by weight and origin

t

Document Object Model allows programs and scripts to access and update content, structure and style of documents in a standard way

t

Document Object Model treats a document as an object?

t

Document object is the only object that is created.

t

Document prolog can consist of version declaration, DTD comments and processing instructions.

t

Element content cannot have attributes.

t

Elements of simple type describe the content and data type of an element

t

Elements with complex type may contain nested elements and have attributes

t

Elements, attributes and entities can be declared in any order

t

For each node it processes, it will look in the table for the best matching rule to apply

t

ID selector match elements which have an id attribute.

t

ID selectors are used to define style rules for unique elements.

t

If an application supports DOM it is irrelevant whether the program is written in VB or C.

t

If the value of maxOccurs attribute is kept unbounded, it means that the element can appear unlimited number of times

t

If you "import" a stylesheet, the templates in it have lower precedence than those in the current stylesheet.

t

In simple selectors you define same property declarations for multiple elements by specifying a comma separated list of element names

t

Inheritance enables one entity to acquire the properties of another entity

t

Inheritance of a style is a property in which a style rule for an element also applies to the element it contains.

t

Internal DTDs specify the DTD within square brackets in the declaration itself

t

It is possible to have a property with multiple values

t

Object Model is a collection of objects for accessing and manipulating the XML data?

t

Processing instructions are application specific.

t

Processing instructions are passed to the target,

t

SAX includes functions that are not supported by DOM.

t

SAX is developed by XML-DEV mailing list

t

StAX parser has no built-in document navigation support

t

Starting from the root node, the XSLT engine finds rules, executes them, and continues until there are no more nodes in its context node set to work with

t

Style sheets contain one or more rules about the appearance of data

t

The XSLT engine begins by reading in the XSLT stylesheet and caching it as a look-up table

t

The all element requires that each element in the group must occur at most once

t

The child axis (XPath) can select only element nodes.

t

The floor (num) function returns the largest integer that is not greater than the number argument.

t

The hierarchical structure of the XML document is known as the XML Tree and it consists of root, nodes and leaves?

t

The local-name () function returns the name of the current node or the first node in the specified node set - without the namespace prefix

t

The logical structure gives information about the elements and the order in which they are to be included in the document

t

The prefix used in an attribute is used as a reference to the namespace.

t

The root nodes can make multiple appearances in the document.

t

The translate () function returns the first argument string with occurrences of characters in the second argument string replaced by the character at the corresponding position in the third argument string.

t

Though the tree model is a dynamic model if there arises any change in the document a major part of the tree requires to be redrawn,

t

Well-formedness of XML documents means that each starting tag has a matching end tag

t

XML allows data exchange as it has no formatting instructions

t

XML can be implemented as middle-tier for client server architectures

t

XML consists of rules to identify and define different parts of the document

t

XML data can be embedded in HTML.

t

XML declaration informs the processing agent about the version of XML being

t

XML document is edited by keeping DTD in mind

t

XML documents are stored with xml extension

t

XML forms the basis to create languages like WAP and WML.

t

XML offers a standard way to add markup to documents

t

XML parser is a software package, library or module that reads XML document

t

XML parser is calculated against its speed and performance

t

XML parser reads the document after it is created.

t

XML syntax is colored

t

XML tags are case sensitive

t

XML was designed to describe data.

t

XPath is used to navigate through elements and attributes in an XML document

t

XPath provides a common syntax for features shared by XSLT and XQuery

t

XSL describes how the XML document should be displayed,

t

XSL elements can be used to perform complex calculations

t

XSLT allows any kind of data to be transformed into a boolean value

t

XSLT and CSS are compatible standards.

t

new ActiveXObject(Microsoft.XMLDOM); creates an XML document object.

t

ownerDocument attribute associates a child node with the parent node

t

the xsl:if, xsl:else and xsl:else-if elements can be used to control program flow.

t

Name the element within the tag element that defines the name of the class that implements the functionality of tag. Select the one correct answer

tag-class

XSL processors do parses the XML source and tries to find out the matching _______ rule.

template

You can select Project, Add Item in Visual Studio .NET to open the Add new Item dialog box. Then you select the XML File

template in the Templates box, give the new document a name, and click the Open button.

Instructions that control how an element and its content should be converted in XSL style sheets, are called:

templates

Given: Xml fragment document <aaa><bbb/></aaa> XSL fragment <xsl:import href="aaa.xsl"/> <xsl:import href="bbb.xsl"/> The aaa.xsl fragment <xsl:template match="bbb">testA</xsl:template> The bbb.xsl fragment <xsl:template match="bbb">testB</xsl:template> Choose the correct statement

testB

A simple element is an XML element that can contain only

text

The @ character is referred to as a________.

text qualifier

Text style sheets use which of the following MIME types

text/css

The first XSL-FO element you must use in an XSL-FO document is

the <fo:root> element.

What is the "Document Type Declaration" ?

the DOCTYPE declaration

parseError' is identified as a method due to which if an error is detected:

the document is not loaded

The JavaScript keyword this always refers to ________.

the element in which the statement resides.

Parameter entities are:

used only in DTDs + always parsed entities

Which of the following statements related to the TranformerFactoty class and its methods are false?

The getFeature(String name) method permits the user to set values for specific attributes

Giving a local function variable the same name as a global variable will result in which of the following?

The local variable will "hide" the global variable.

What is stored inside the variable value after the following line of code is executed? var value = navigator.version;

The navigator object does not contain an attribute named version.

A JSP page called test.jsp is passed a parameter name in the URL using http://localhost/test.jsp?name="John". The test.jsp contains the following code. <%! String myName=request.getParameter();%><% String test= "welcome" + myName; %><%= test%>

The program gives a syntax error because of the statement <%! String myName=request.getParameter();%>

To cap values, you can use the maxIncusive and maxExclusive facets.

To constrain values to be one of a set, you can use the enumeration facet.

An XML based web application to process audio files which are binary in nature needs to be written.

UDDI

UDDI stands for which of the following

Universal Description Discovery and Integration

What does UDDI stand for

Universal Description, Discovery and Integration

A University wants to unify all their applications from the various departments in order

Use an XSLT stylesheet to convert the incoming or outgoing XML document into the format used within the division

Which of the following is an XMLbased service IDL that defines the service interface and its implementation characteristics.

WSDL

Which of the following statements regarding WSDL are true ?

WSDL can be used to indicate the operations that are considered valid and supported for a given service, To specify where a particular service is implemented

What are the types of errors handled defined by the SAX ErrorHandler interface?

Warning, Error, Fatal-Error

What does WSDL stand for

Web service Description Lanaguage

An XML document, which conforms to its DTD, is called a:

Well formed Document

An _____ XML document conforms to the rules of a Document Type Definition ( DTD.

Well-formed

Which of the following lines of code, in the doPost() method of a servlet, uses the URL rewriting approach to maintaining sessions? (Choose one)

a. out.println("<a href=' "+response.encodeURL("/servlet/XServlet")+" '>Click here</a>"));

You have to send a gif image to the client as a response to a request. Which of the following calls will you have to make? (Choose one)

a. response.setContentType("image/gif");

If the string passed to parseInt contains text characters, parseInt will ________.

a. return NaN

JSP __________ let you insert arbitrary code into the servlet's _jspService method (which is called by service).

a. scriptlets

Which of the elements defined within the taglib element of taglib descriptor file are required? Select one correct answer.

a. taglib-location

a_____ instruction do contains the template, which is been applied to each node selected with the select attribute

a. xsl:for-each

a++; is the same as which of the following

a=a+1

The master-reference attribute

abcdef

Identifiers which have static duration ________.

are globally accessible to the script

Which of the following is INCORRECT statement about implicit objects and scope?

application can't be used to access other web application resources

The chroma filter is used to ________.

apply transparency effects dynamically

Which statement is true?

When isThreadSafe attribute of page directive is set to true, a thread is created for each request for the pag

Which of these is true about include directive. Select the one correct answer

When using the include directive, the JSP container treats the file to be included as if it was part of the original file

Which is the BEST case use Container-managed persistent (CMP)?

When you require some kind of special bean, like multi-tables, that cannot be completely realized with a single bean

Given some statement (a) window.handleError (b) window.status = "Error: " + errType + " on line " + errLineNum; (c) window.onHandleError (d) window.onError Which of these is the command to enable error handling on a Web page?

d

Identify the correct statements:

XML documents can be sent + XML documents, which are not displayed to the users, do not require stylesheets.

display

XML documents do not carry information about how to __________ the data

root element

XML documents must contain a ______________

nested

XML elements must be properly __________

Which of the following resources can be signed using an XML signature?

XML encoded data specific section of an XML file Binary encoded data

no

XML has __________ predefined tags

complement

XML is a _______________ to HTML

independent

XML is a software and hardware __________ tool for carrying information

Which statement is used to describe about multi-pipeline?

XML is mapped to Bean object, then it applied to many JSP

data transmissions

XML is the most common tool for __________ between all sorts of applications

xml, variation

XML name cannot start with the letters __________ or any __________ of them

letters, numbers, other characters

XML names can contain __________, __________, and __________

spaces

XML names cannot contain __________

number, punctuation character

XML names cannot start with a __________ or a __________

What would the browser output if the following script is executed? < SCRIPT LANGUAGE = "JavaScript" > var array = [ [ 1, 2, 3 ], [ 1, 2, 3 ] ]; for ( var i in array ) { for ( var j in array[ i ] ) document.write( array[ i ][ j ] + " " ); document.writeln("<BR>"); } < /SCRIPT >

d) 1 2 3 1 2 3

Which of the following is false?

d) Filters and transitions cannot be adjusted dynamically.

What is the underscore character used for in VBScript?

d) It is used as a line continuation character

Which of the following is true regarding VBScript classes?

d) The Property Let method is used for non-object subtypes

Consider the following HTML document. 1 <HTML> 2 <HEAD> 3 <TITLE>Children Collection</TITLE> 4 <SCRIPT LANGUAGE = "JavaScript"> 5 </SCRIPT> 6 </HEAD> 7 <BODY> 8 <P></P> 9 </BODY> 10 </HTML> Select the true statement.

d) The SCRIPT element is a direct child of the HEAD element.

Which VBScript function returns an integer indicating the variant subtype?

d) VarType

How a data source is displayed by the browser depends on the ________.

d) element that the data source is bound to

If the HTML form game has a text field named point in it, what is the proper way to set the text associated with point to 10?

d) game.point.value = "10"

Which of the following methods would you use to search a character for a specific string?

d) indexOf

Call-by- ________ is the method of passing the argument's actual location in memory to a function.

d) reference

The first two parameters in the addPoint method ________.

d) sets the point source of the light

When the TDC is bound to an element, the element's DATASRC attribute should be set to ________.

d) the name of the TDC object preceded by a #

Which statement about an entity instance lifecycle is correct?

d. A managed entity instance is the instance associated with a persistence context.

All Biztalk documents have the root element ________.

d. BizTalk

A Java developer needs to be able to send email, containing XML attachments, using SMTP. Which JEE (J2EE) technology provides this capability?

d. JavaMail

What is the purpose of JNDI?

d. To access various directory services using a single interface

The World Wide Web Consortium (W3C) started to develop XSL because there was a need for:

d. XML-based Stylesheet Language

Which of the following is true?

d. for loops increment after the body statement is performed and while loops increment in either condition or body

If the string passed to parseInt contains a floating-point numeric value, parseInt will ________.

d. truncate the floating-point part

You can also use a DTD to verify your own

data

implemented is called ________.

data abstraction

One of the greatest strength of XML Schemas is the support for

data types

Which of the following statements about XML signatures are true ?

XML signatures have support for non-repudiation of the data that they sign, XML signatures can be used for XML data authentication

LF

XML stores a new line as __________

invented

XML tags are __________ by the author of the XML document

case

XML tags are _____________ sensitive

Which statement is true?

XML tags are case sensitive XML documents must have a root tag XML elements must be properly closed.

valid

XML validated against a DTD is __________ XML

structure, store, transport

XML was created to _______, ________, and ________ information

well formed

XML with correct syntax is __________ XML

What are difference between XML-Enabled and XML Native?

XML-Native are supported the query with XQuery and XPath but the XML-Enabled are supported the query with SQL embedding XPath or XQuery

Represents a collection of attribute nodes

XMLDOMNamedNodeMap

In order to sort numeric values, you must set the to

datatype=finumberfl

In a switch structure, the ________ case clause is used to process exceptional conditions and is usually listed last.

default

The xsl:template is used to

define a template that can be applied to a node to produce desired output

Which of these are not supported by XML Schema?

defines which files are child elements

Most DOM objects such as XMLDOMAttribute, XMLDOMElement, XMLDOMEntity, XMLDOMComment etc have several common methods and properties since they are inherited from a common object. Which object is it?

XMLDOMNode

Most DOM objects such as XMLDOMAttribute, XMLDOMElement, XMLDOMEntity, XMLDOMComment etc, have several common methods and properties since they are inherited from a common object. Which object is it?

XMLDOMNode

Method getElementsByTagName return a node of list which will be stored as

XMLDOMNodeList object

Which exception is used to catch Exception when the XMLEventReader is used?

XMLStreamException

Which of the following following is used for retreiving XML Schema Collections?

XML_SCHEMA_NAMESPACE

is an XML-related technology that is used to find elements, attributes, and other information in your XML document.

XPath

Instructions for transforming an XML document are contained in the

XSL stylesheet

XSL provides a transformation language called:

XSLT

eXtensible Stylesheet Language Transformation

XSLT (acronym)

displayed by a browser

XSLT can be used to transform XML into HTML, before it is __________

sophisticated

XSLT is far more __________ than CSS

Which of the following options describing the feature of XML transformations?

XSLT stylesheets use XPath to navigate between XML as SAX and DOM

XSL consists of three parts. Which are

XSLT, Xpath, XSL-FO

With XML Schemas, the senders can ________ the data in a way that the receiver will understand.

describes

XSL ________ how the XML document should be displayed

describes

The ________ of a variable is the period during which it exists in memory.

duration

What does XSL stand for?

eXtensible Stylesheet Language

In schema, the ALL element requires that

each element in the group must occur at most once

This DTD uses a choice for the <employee> element, and the choice says that the document can contain

either <hiredate> elements or <name> elementsbut not both.

The question mark (?) operator indicates

either zero or one occurrence

Is it possible to share aHttpSession object between a Java Server Page and Enterprise Java Bean?

Yes, you can pass the HttpSession as parameter to an EJB method, only if all objects in session are serializable

The 'standalone' attribute can be set to

Yes/No

How can you determine the text in a text node by using SAX?

You can implement the characters method and extract the text node's text from the character array passed to you, using the starting position in the array

What SAX method(s) do you implement to handle elements?

You can implement the startElement and endElement methods to catch the starting and closing tags of elements

You can use this CSS property/value pair: font-size: 36pt

You can use this CSS property/value pair: display: block

You can use this CSS property/value pair: text-align: center

You can use this CSS property/value pair: text-decoration: underline. You can use this CSS property/value pair: margin-top: 10.

Use untyped XML data type in the following situations:

You do not have a schema for your XML data

XML View Technology is useful in the following situations:

You want to bulk load XML data and decompose them into the underlying tables by using the XML view

______and _______methods do not apply to stateless session beans.

ejbActivate()

You can escape < and > like this: <message>This is a &lt;message&gt;

element.</message>

The technique of developing and maintaining a large program by constructing it from small, simple pieces is called ________.

a) divide and conquer

Which is the proper method to set the mask color?

a) filter: mask( color = #CCFFFF )

Initializing an array directly involves using the ________ control structure.

a) for loop

The third parameter in the addPoint method ________.

a) sets the height of the point source

TThe java sort method uses ________ to sort the array passed to it

a) string comparison

Which of the following can be declared as a direct child of a XML Schema element ?

element + attribute

Match the correct entity names with the respective characters a) &amp; 1) < b) &gt; 2) ' c) &quot; 3) > d) &lt; 4) " e) &apos; 5) &

a-5 ,b-3 ,c-4 ,d-1 ,e-2

Match the following Absolute units & Relative units with their respective values a)Ex 1)Inches b)In 2)Pixel c)Px 3)Pica d)Em 4)Fonts height e)Pc 5)Height of the letter 'x'

a-5,b-1,c-2,d-4,e-3

What is the result of attempting to access the following JSP page?<question><html><question><body><question><%! public String methodA() {<question> return methodB();<question>}<question>%><question><%! public String methodB() {<question> return "JAD Final Test";<question>}<question>%><question><h2><%= methodA() %></h2><question></body><question></html>

a. "JAD Final Test" is output to the resulting web page.

What is the value of num after the following statement is performed? num = 2 * Math.pow( 2, 3 );

a. 16

Which of the following is a correct JSP declaration for a variable of class java.util.Date?

a. <%! Date d = new Date(); %>

Which of the following are correct JSP expressions

a. <%= new Date() %>

Which of the following statement is a correct JSP directive?(Choose one)

a. <%@ tagliburi="http://www.abc.com/tags/util" prefix="util" %>

A JSP page needs to generate an XML file. Which attribute of page directive may be used to specify that the JSP page is generating an XML file?

a. <%@page contentType ="text/xml">

Select the correct directive statement insert into the first line of following lines of code (1 insert code here):

a. <%@page import='java.util.*' %>

Which of the following is equivalent <%! ? (Choose one)

a. <jsp:declaration

Which of the following is the proper method to apply a transition effect?

element.filters( "blendTrans" ).apply();

The format for writing an attribute-related predicate is:

element[@element's attribute some test here]

Which of these are not kinds of complex elements?

elements that contain only numbers

Identifiers that represent local variables in a function ________.

b) exist while the function in which they are declared is still active

All variables declared in function definitions are ________.

b) local variables

The ________ object contains information about the Web browser that is viewing the page.

b) navigator

In order for elements to be floated, position must be ________.

b) not absolute

The last parameter in the addPoint method ________.

b) sets the strength percentage

The VBScript '&' operator is used for ________.

b) string concatenation

Which statement describe about Message-Driven Beans is correct? (Choose one)

b. An EJB 3.0 message-driven beans can itself be the client of another message-driven beans

How can you ensure the continuity of the session while using HttpServletResponse.sendRedirect() method when cookies are not supported by the client?

b. By enconding the redirect path with HttpServletResponse.encodeRedirectURL() method.

Which is disadvantage of using JEE (or J2EE) server-side technologies in a web-based application?

b. Complexity

Which security mechanism proves that data has not been tampered with during its transit through the network?

b. Data integrity

Which statements are BEST describe <jsp:include> Action?

b. Dynamically includes another resource in a JSP. As the JSP executes, the referenced resource is included and processed.

A stateful session bean must commit a transaction before a business method

b. False

Which Java technology provides a standard API for publish-subscribe messaging model?

b. JMS

Which statement describe about JMS is NOT true?

b. JMS enhances access to email services

Which Java technology provides a unified interface to multiple naming and directory services?

b. JNDI

According to Bohm and Jacopini, which of the following does not follow structured programming?

b. Nested building blocks

Can we use the annotation @PrePassivate for more than one method in a Entity bean?

b. No

Microsoft's version of scripting that uses the Java syntax is called ________.

b. None of the others

Which component can use a container-managed entity manager with an extended persistent context?

b. Only stateful session beans

Which is true about RMI?

b. RMI allows objects to be send from one computer to another

Every switch structure must have ________ labels which are separated by the keyword break.

c. case

You need to make sure that the response stream of your web application is secure. Which factor will you look at? (Choose one)

c. data integrity

Which of these is legal attribute of page directive?.

c. errorPage

Which of the following is declared correctly and will not result in an error assuming x = 2 and y = 30?

c. for ( var j = x; j <= 80 * y; j += 5 / x )

Which of the following contradicts the notion of structured programming?

c. goto

The word top in the term top-down stepwise refinement refers to which of the following

c. the single statement that completely represents the program

Which of the following elements is not valid inside a group element in an XBRL document?

c. value

The CascadeType is defined as a Java ___

enumeration

Which facet of the string data type can be used to specify a set of values that a data type can accept?

enumeration

Attributes belonging to a particular elements within some namespace is also a part of the same namespace

f

Browser displays the content directly after the parser passes the data.

f

CSS uses complex elements to format the documents

f

Cascading Style Sheets lack support to define spacing between data,

f

Character data is treated as regular text

f

Comments appear only in the document prolog.

f

Comments are processed by the processor.

f

Crimson and Xerces are some of the browsers

f

DOM parser is used for navigating the document recursively

f

DOM supports go-forward only when traversing the XML documents.

f

DTD checks for the structure and content of the XML document

f

DTD declarations from the external subset have priority over the declarations from the internal subset

f

DTDs are made up of three blocks of declarations and the DOCTYPE declaration

f

Document Models can be hierarchical model, non-linear model or object model?

f

Document Object Model allows programmers to write different set of code for interpreting document running on any platform?

f

Element content means a complex type element that contains only elements

f

Element node is the starting point of the DOM tree

f

Elements of simple type constitute the structure of an XML document

f

HTML linking is one to one and is hardcoded in the HTML file. This indicates that HTML has a robust linking mechanism which is an advantage of using HTML.

f

HTML provides the advantage of creating customized tags making it easier for the users to create their own tags.

f

In XML, elements are distinguished by using DTD

f

In XPath, the structure of an XML document is viewed conceptually as a pyramid,

f

In XSLT, a string is a sequence of one or more Unicode character

f

In a substring o function, the index of the first character is 0.

f

Leaf nodes have child nodes under them?

f

Linear Model is applied to dynamic document object?

f

Mixed content means that an element whose structure is the complex type can contains elements with attributes

f

Root element must not be a nonempty tag.

f

SAX parser has high memory consumption

f

SAX requires the entire document to be stored in the memory

f

Schema checks for the validity of the XML document?

f

Simple selectors match occurrence of an element based on a condition

f

StAX parser parses the XML document once.

f

Style sheets allow you to mix presentation markup with data

f

The choice element cannot mention the minOccurs and maxOccurs attribute

f

The default value for the minOccurs attribute is 0

f

The descendant has the same namespace as the parent element even if it has a new namespace definition

f

The numbers like 43 or -7000 that look like integers are stored as float

f

The only allowed operation in a result tree fragment is on a number

f

The order and the number of elements that appears in the mixed content cannot be specified in the schema

f

The sequence element provides an XML representation for describing a selection from a set of element types

f

There is always only one style rule defined for every element

f

Universal selectors match every occurrence of parent and child elements

f

When a minOccurs attribute is used, there cannot be a maxOccurs attribute in the same line

f

XML describes its data along with its presentation

f

XML is not validated.

f

XML parser can perform operations on input of any data type

f

The Copy and _______ constructs are used for the nodes copying.

copy-of

XML parser does its work after the processor converts the document into a data

f

XML syntax is used as the basis to create a schema, so it can be stored with the same extension .xml (dot XML).

f

XML tags are predefined

f

XML uses only XSLT to be transformed to HTML

f

XPath provides multiple syntax that can be used for queries, addressing and patterns

f

XSL in Internet Explorer 5.0 is 100% compatible with the latest released W3C XSL standard.

f

XSL is a stylesheet application specifically for HTML,

f

XSLT can also be called as XSLT document or transformation script

f

XTLRuntime,XMLDOMNotation are exceptions that do not inherit methods and properties from the XMLDOMNode object.

f

load() method is used to load a string

f

loadXML() method is used to load an XML file

f

xmlns:localname="value" is the correct syntax for including a attribute in a namespace.

f

Restrictions on XML elements are called

facets

Ability to create one's own tags is XML's greatest disadvantage?

false

Browser has the ability distinguish duplicate element names in an XML document?

false

Document Object Model is platform-dependent?

false

External DTDs use the keyword URL to specify the location of the DTD?

false

Is this statement true or false. The deployment descriptor of a web application must have the name web.xml . In the same way the tag library descriptor file must be called taglib.xml

false

Parameter entities use ampersand (&) and semicolon (;) as delimiters?

false

SAX support random access:

false

A bean present in the page and identified as 'mybean' has a property named 'name'. Which of the following is a correct way to print the value of this property?

a. <jsp:getProperty name="mybean" property="name"/>

Action _______has the ability to match request parameters to properties of the same name in a bean by specifying "*" for attribute property.

a. <jsp:setProperty>

Which of the following techniques would correctly put a bean into application scope? (You can assume that any necessary page directives are present and correct elsewhere in the JSP page.)(Choose one.)

a. <jsp:useBean id="app1" class="webcert.ch07.examp0701.AddressBean" scope="application" />

Which of the following element are required for a valid <taglib> tag in web.xml?(Choose one)

a. <taglib_uri>

Which option can be used to predefine Java Persistence queries for easy use?

a. @NamedQuery annotation

Which statement about entity manager is true?

a. A container-managed entity manager must be a JTA entity manager.

To construct a relative path expression to select every count element, what would the correct expression look like?

count

Which element defined within the taglib element of taglib descriptor file is required? Select one correct answer.

a. Tag

a_____ function returns number of nodes present in an argument node-set

count

The default value for the minOccurs attribute in Schema is 0

false

Tree model is applied to static documents?

false

What is the effect of evaluation of following expression? Select the one correct answer. ${(5*5) ne 25}

false

Which statements are BEST describe name attribute of <jsp:setProperty name=.... /> action?

a. The ID of the JavaBean for which a property (or properties) will be set.

Which statements are BEST describe property attribute of <jsp:setProperty property=.... /> Action?

a. The ID of the JavaBean for which a property (or properties) will be set.

Which statement is correct about Java EE client of a message-driven beans?

a. The client can use JNDI to obtain a reference to a message destination

Consider the following java code://in file Book.java package com.bookstore;public class Book{private long isbn; public Book(){ isbn = 0; }public long getIsbn(){ return isbn; }public void setIsbn(long value){ this.isbn = value; }}Code for browse.jsp:<jsp:useBean class="com.bookstore.Book" id="newbook" />LINE 1 : <jsp:setProperty name="newbook" property="isbn" value="1000"/> Which of the following statements are correct?

a. The isbn property of newbook will be set to 1000.

Which statements are BEST describe id attribute of <jsp:useBean id=..... /> Action?

a. The name used to manipulate the Java object with actions <jsp:setProperty> and <jsp:getProperty>. A variable of this name is also declared for use in JSP scripting elements. The name specified here is case sensitive.

Which statement is true about management of an EJB's resources?

a. The reference to home object is obtained through JNDI to improve maintainability and flexibility.

Which is NOT belonging to basic three types of EJB?

a. Transfer object

Each page has its own instances of the page-scope implicit objects.

a. True

GET requests and POST requests can both be used to send form data to a web server.

a. True

HttpSession objects have a built-in data structure that lets you store any number of keys and associated values.

a. True

Objects with application scope are part of a particular Web application.

a. True

Servlet methods are executed automatically.

a. True

The HttpSession method getAttribute returns the object associated with a particular name.

a. True

The following statement is true or false? "If the isThreadSafe attribute of the page directive is true, then the generated servlet implements the SingleThreadModel interface."

a. True

The following statement is true or false? <question>oeIf the isThreadSafe attribute of the page directive is true, then the generated servlet implements the SingleThreadModel interface.

a. True

The same servlet class can be declared using different logical names in the deployment descriptor.

a. True

To read the cookies that come back from the client, you call getCookies on the HttpServletRequest.

a. True

Which is NOT a technique that can be used to implement 'sessions' if the client browser does not support cookies?

a. Using Http headers.

Which of the following XSLT functions returns the number of nodes present in the nodeset, passed as an argument

count()

Which DOMDocument method is used to create a new attribute?

createAttribute

You can create the <child> element by using a Document object's ______________ method.

createElement

The _____ method creates the new element node

createElement()

You can create the text in it by using the ___________ method.

createTextNode

You can create the <child> element by using a Document object's createElement method, create the text in it by using the

createTextNode method

Which of the following methods creates a node for inserting textual content in to it?

createTextNode()

Which of the following XSLT functions can be used to return a nodeset with the current context node?

current()

A .................... manages the threading for the servlets and JSPs and provides the necessary interface with the Web server.

a. Web Container

The line window.alert("Hello world") will display output in ________.

a. a dialog box

What is the implementation specification of EJB 3 session bean classes?

a. a session bean class must be marked with @Stateless or @Stateful

Which is NOT a scope of implicit objects of JSP file?

a. application

Which of the following elements defines the properties of an attribute that a tag needs?

a. attribute

Given a stateless session bean with container-managed transaction demarcation, from which method can a developer access another enterprise bean?

a. business method from the business interface

Consider the following HTML code. Which method of MyFirstServlet will be invoked when you click on the url shown by the page?

a. doGet

Which method of ReportGeneratorServlet will be called when the user clicks on the URL shown by the following HTML. Assume that ReportGeneratorServlet does not override the service(HttpServletRequest, HttpServletResponse) method of the HttpServlet class. (Choose one)

a. doGet(HttpServletRequest, HttpServletResponse);

Identify the method used to get an object available in a session.(Choose one)

a. getAttribute of HttpSession

Which statement is true about EJB 3.0 containers?

a. javax.naming.initialContext is guaranteed to provide a JNDI name space

________ is the well-known host name that refers to your own computer.

a. localhost

What would the browser display if the following code was executed in a script? var product = 0; while ( product <= 25 ); product = 2 + product;

a. nothing, the script would result in an error

When implementing a tag, if the tag just includes the body verbatim, or if it does not include the body, then the tag handler class must extend the BodyTagSupport class. Is this statement true of false.

false

XML is transformed only via XSLT?

false

Which of the following will evaluate to false?

false && false

The character is referred to as a________.

field delimiter

Struts2 flow of controler (5 things)

filter dispatcher, web.xml, intercepterors, actions, resulting JSP

The TDC Filter property allows you to ________.

filter out all records that do not have a cell matching the text you specify.

Identify the valid font properties and font related options are:

font-family + font-variant

Which of the following settings can be altered to change the darkness of the font

font-weight

How does a "for" loop start?

for (i = 0; i <= 5; i++)

Which of the following are declared correctly?

for (var i=0;i<100;++i ) { statement;}

dash, period, colon

for XML best naming practices, what three characters should you avoid?

Which of the following is not a JavaScript selection structure?

for/in

When creating our XPath statement, each element is separated by a _________.

forward slash

The ________ property of the wave filter determines how many waves will be applied in the affected area.

freq

Which of the following methods would you use to convert a list of Unicode values into a string containing the corresponding characters?

fromCharCode

To keep the browser from performing a script as soon as it is loaded you need to write the script as a what ?

function

Modules in JavaScript are called ________.

functions

In the following statement, the range of the variable element is ________. for ( var element in theArray ) total2 += theArray[ element ];

g) 0 to the array length - 1

Which of the following XSLT functions can be used to generate a string that can be used as the value of an ID type attribute?

generate-id()

The ________ method can be used to display the value of the specified attribute.

getAttribute()

Which method is used to get all descendant of current element in traversing DOM tree?

getChildNodes

The ________ method returns a node list that contains all elements with the specified tag name in the same order as they appear in the source document.

getElementsByTagname()

You can use the node's ___________ method and check the results it returns against fields such as Node.ELEMENT_NODE,Node.TEXT_NODE, and so on.

getNodeType

You can use the getNodeName method to get a node's name and its _____________ method to get its value.

getNodeValue

To send binary output in a response, the following method of HttpServletResponse may be used to get the appropriate Writer/Stream object. Select the one correct answer.

getOutputStream

Which of the following is not one of Bohm and Jacopini's three control structures?

goto-less structure

Which of these axes which are used in XSL?

grandparent

There are no processing instructions built into XML already, although some, like <?xml-stylesheet?>

have been generally agreed upon by browser manufacturers.

What is the result of writing the keyword var in a function parameter list

he result would be a JavaScript runtime error

Microsoft's Internet Explorer Web browser contains a ________ that executes VBScript code

interpreter

What is NOT true about StAX?

it is a "push" parser

attributes

it is the advice of w3schools to use tags rather than __________

What are the three JSP Servlet Methods

jspInit()

During the redesign of a legacy system, it is decided to use XML as the data exchange format between

key/keyref

Which of the following statements correctly describe the differences between key/keyref and ID/IDREF ?

key/keyref allows the key to be defined for a set of elements while ID/IDREF allows keys to be defined only for the entire document, key/keyref can be used with elements and attributes, while ID/IDREF can only be used with attributes

In a tree model wherein we take the example of a book in which the chapters and paragraphs correspond to an individual character in the document. These are termed as:

leaves

It defines the document structure with a list of ____

legal elements

The servlet container is responsible for the ____ of the servlet

lifecycle

The outermost layer of the box model is the ________.

margin

JAXB ___ method takes a string and converts it into xml

marshal

The ________ attribute added to the ________ element uses your knowledge of XPath to find information in your XML document.

match & xsl:template

In the following line, the word writeln is a ________ which performs a task or action in the script document.writeln("Hello World");

method

The "prepackaged" functions that belong to JavaScript objects such as Math.pow and Math.round are often called ________.

methods

If the attribute minOccurs is specified but the attribute maxOccurs is not, what is the default value of the latter ?

minOccurs

Which of the following value pairs for the parameters minOccurs and maxOccurs can be used to indicate the cardinality operator "?"

minOccurs = "0" maxOccurs = "1"

Which of the following are valid combinations of minOccurs and maxOccurs for any element in a xsd:all group ?

minOccurs = 1 maxOccurs = 1 minOccurs = 0 maxOccurs = 1

In the following line, the word document is a ________ which resides in the computer's memory and contains information used by the script. document.writeln("Hello World");

object

The XML DOM define a standard set of ______ for XML

objects

If you used the ONMOUSEMOVE event to capture mouse events over an image, which of the following event properties would you use to capture the location of the mouse cursor relative to the image boundaries?

offsetX / offsetY

Where on the browser will the command window.status( "text" ) display output?

on the status bar

What is the value of s3 after the following code is executed? var s1 = one, s2 = two, s3 = three; s1.concat(s2) s3 = s1;

onetwo

Onclick is equivalent to which two events in sequence

onmousedown and onmouseup

The ALL value represents all of the cascade ____. For example: @OneToMany(cascade={CascadeType.ALL})

operations

Which best describe void?

operator

An attribute specified in XML Schema has a default value. Is this case the attribute can also be:

optional

Attributes are by default:

optional

Select the correct attribute for sorting in an XSL document:

order-by

Which package contains the interface that provides methods to parse XML documents

org.xml.sax package

An xsl:numbers do inserts a formatted numbers into the ____

output

Which is detected when the mouse moves over a link?

overMouse event

What is the correct CSS syntax for making all the <p> elements bold?

p {font-weight:bold;}

Space between the border and its contents is done by using the ________ property.

padding

The ________ is the distance between the content inside an element and the edge of the element.

padding

Name the default value of the scope atribute of <jsp:usebean>.

page

Name the implicit variable available to JSP pages that may be used to access all the other implicit objects

pageContext

Which of these is not a valid top level element in web-app

param-name

With in a context-param element of deployment descriptor, which of the following element is required?

param-name

Function definitions often contain ________ which are considered to be local variables and correspond with the arguments in the function call.

parameters

The format for writing an element-related predicate is:

parent[child some test here]

Which of the following selections does not follow the rules of operator precedence. Assume that the operators on the left are evaluated first.

parentheses, subtraction, modulus

PCDATA means:

parsed character data

Entities are expanded when a document is parsed by an XML

parser

Restricts string types using regular expressions?

pattern

The values of an attribute of type ID is unique

per document instance;

The ________ property of the wave filter shifts the effect in space.

phase

In XSL the different source elements are separated by a:

pipe-stem

Why does DTD need?

place preconditions on the data the programs read

<!ELEMENT element-name category>

#PCDATA

________ fires when the right mouse button is clicked.

(b) ONCONTEXTMENU

11 The ONFOCUS event fires when ________.

(c) an element is clicked.

- JSP engine loads the JSP page from disk and converts it into a servlet content.

- JSP engine compiles the servlet

< SCRIPT LANGUAGE = " " > var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]; modifyArray( theArray[ 3 ] ); document.write( theArray.join( " " ) ); function modifyArray( i ) { i = 11; }</SCRIPT> What will the browser display if the following script is executed?

1 2 3 4 5 6 7 8 9

A database transaction must be ___

ACID

________ is a technology that allows a server-side script to create dynamic content that is sent to the clients browser

ASP

<!-- WELCOME.xml --> <?xml version = "1.0"?> <!DOCTYPE WELCOME SYSTEM "hello.dtd"> The following code indicates that the DTD is:

An external DTD

___ exists outside the content of a document

An external DTD

A ___________________________ in EJB is an object that is deploy on any EJB Server

Component

A constructor

Converts information contained in an XML document to another data type

________ is a markup language for describing how content is rendered and ________ is a markup language for describing structured datacontent is separated from presentation.

HTML, XML.

<!ELEMENT A((B,C)

Identify what the statement indicates

________ are declared in each individual HTML element using the keyword STYLE.

Inline styles

_______ can validate your XML against a DTD

Internet Explorer 5.0

________ can validate your XML against a DTD.

Internet Explorer 5.0

<xml> and <_Name> - Identify whether the following tags are valid or invalid

Invalid, Valid

____ allows you to map xml context to and from java objects

JAXB

____ allows you to randomly access stuff in the document unlike SAX

JAXB

#PCDATA refers to

Parsed character data

____ is a java api for xml parsing

SAX

_____ can be used to validate xml documents

Schemas

____ are small java classes that process HTTP request and return HTTP responses

Servlets

___ types of relationships can exist between entity beans

Seven

A ____________ is a group of operations, which appear as one large operation during execution.

Transaction

"Position" function do returns the number equal to context position

True

<!ELEMENT Circle EMPTY> <!ATTLIST Circle radius CDATA "20"> The following code indicates that the circle is defined as an empty element,with the radius attribute having a default value of 20 and type CDATA.

True

<!ELEMENT do(message+)> The "+" sign indicates that the child element 'message' must occur at least once inside the do element.

True

* by itself applied to ch09_01.xml just picks out the <states> element. * selects all element children (not grandchildren or any descendents)

of the context node, and when you open ch09_01.xml, the root node is the context node.

A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of business logic has been implemented and tested in these EJB 2.1 session beans. Some EJB 3.0 session beans need to access this business logic. Which design approach can achieve this requirement?

c. No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject a reference to the EJB 2.1 home interface into the EJB 3.0 bean class.

A developer must implement a "shopping cart" object for a web-based application. The shopping cart must be able to maintain the state of the cart, but the state is not stored persistently. Which JEE (J2EE) technology is suited to this goal?

c. Stateful session beans

A _____ function returns number of nodes present in an argument node-set

count

________ makes it now possible for data manipulation to be shared by the server and the client.

d) all of the above

________ was originally created by ________.

d. JavaScript, Netscape

<!DOCTYPE root-element [element-declarations]>

data

</PITarget <instruction>/> is a processing instruction

f

<Student:Name age ="12">Kevin</ Student:Name> it the correct for associating age with the student namespace.

f

A built-in simple element can contain a default value or a facet value

f

A child element inherits the properties of an ancestor element only if it is an immediate child

f

A custom user defined datatype can be created using the <simpleType> definition

f

A default namespace is used by an element and its child elements if the element has a namespace prefix

f

A descendant having a new namespace cannot override the namespace defined by the parrent element?

false

____ method is called so that the servlet can access information about the servlet container

getServletConfig()

____ method is called so that the servlet container can access information about the servlet

getServletInfo()

___________________ includes a static file in a JSP file, parsing the file's JSP elements

include directive

_____ method is called when the servlet starts

init()

________ and ________ run slower when they are applied to large arrays.

linear search, bubble sort

___ is an artificial and informal languege that helps programmers develop algorithms

pseudocode

___ method is called to process request

service()

A ____________ session bean is a bean that holds conversations that span a single method call.

stateless

<?xml version="1.0">

xml declaration

A _____ instruction do contains the template, which is been applied to each node selected with the select attribute.

xsl:foreach

<SCRIPT LANGUAGE = " "> var c = new Array(8) for( var i = 0; i < 10; i++ ) c[i] = i; document.write(c[9]) </SCRIPT> What would the browser display if this script was executed?

9

A bean with a property color is loaded using the following statement <jsp:useBean id="fruit" class="Fruit"/>Which of the following statements may be used to print the value of color property of the bean?. Select the one correct answer.

<jsp:getProperty name="fruit" property="color"/>

___ annotation is used to specify URI of the resource

@Path

___, ____ annotations are used to specify data format to be sent out or recieved

@Produces, @Consumes

<?xml version="1.0"?> <script> <![CDATA [function matchwo(a,b) { if (a < b && a < 0) then { return 1 } } ]]> </script> The above code:

Executes without any error

"*/*" this syntax used in XSL will search all the elements that are the grandchildren of the root.

False

<?xml version="1.0" ?> <!DOCTYPE APTECH [ <!ELEMENT APTECH (CLASS1

CLASS2)+> <!ELEMENT CLASS1 (#PCDATA)> <!ATTLIST CLASS1 count CDATA #REQUIRED> <!ELEMENT CLASS2 (#PCDATA)> <!ATTLIST CLASS2 count CDATA #REQUIRED> ]> <TRIAL>ELECTRONIC GOODS <CLASS1

A _____ _____ is used to receive a message from a queue

Message Listener

_____ in XSL do allow the element to be processed for multiple times, each time producing different result.

Modes

A .. manages the threading for the servlets and JSPs and provides the necessary interface with the Web server

Web Container

A ____ _____ allows you to build app that is interoperable applications

Web Service

____ is a text based language

XML

______ and ______ are both new XML-related technologies that extend or borrow from XPath.

XPointer & XQuery

MSXML can only be used with JavaScript.

False

XML is the mother of

WAP and WML

quoted

XML attribute values must be __________

plain text format

XML data is stored in __________

The VBScript operator for inequality is which of the following?

!= <>

Which one is used to declare an entity in DTD?

!ENTITY AUTHOR "Nguyen Ngoc Anh"

The marging option can take a maximum of _________ values.

4

Which statement is true

All XML elements must be properly closed

Which statement is true?

All XML elements must be properly closed

Which of the following statements is true?

All XML elements must have a closing tag.

DTD defines the document structure with a list of legal elements.

True

DTD helps define the legal building blocks of an XML document.

True

Documents that follow the XML tag rules, but don't have a DTD are well-formed documents.

True

Each box has a border that separates it from the edge of the canvas

True

Elements inside the root are termed as child elements.

True

Every XML document must be well formed

True

Every XSLT file must include the root element: xsl:stylesheet .

True

External DTD is referenced at the beginning of the XML file.

True

HTTP is a "stateless" protocol: each time a client retrieves a Web page, it opens a separate connection to the Web server, and the server does not automatically maintain contextual information about a client.

True

If an element has attributes, it is considered to be of complex types.

True

In DOM, it is not necessary that an object for a valid node type will always be returned.

True

In designating an element in an XML structure, if you wanted to refer to one of the sub elements, you will have to create a string of child elements from the root to the desired child element.

True

Internet Explorer will skip white-space text node that are generated between nodes (e.g. new-line characters), while Mozilla will not.

True

You can set the xlink:show attribute to "replace".

True

You can use XSL Transformation (XSLT) to convert database files described by XML to Structured Query Language (SQL) statements, which creates the tables, indexes and views that the XML data describes.

True

You can use the <img> element's region attribute to specify a region that is defined in the <layout> element.

True

You can use the Attributes object passed to the startElement method to handle an element's attributes.

True

You can use the dso .recordset.BOF and dso .recordset.EOF properties, where dso is the name of the DSO.

True

You can use the expression $elem/@*.

True

You can use the getNodeName method to get a node's name and its getNodeValue method to get its value.

True

You can use the nextChild method to move to the next child node.

True

You can use the nodeValue property to get a node's value.

True

You should use a SAX parser if a DOM parser is unable to load the XML document into memory.

True

You use methods such as the warning method to handle warnings, the error method to handle errors, and the fatalError method to handle fatal errors.

True

You use the <xforms:model> element to specify how an XForm's data should be structured.

True

getAttribute(fiupcfl) retrieves the value of the upc attribute.

True

child element

any element located within the root element

What is the default type for an element in XML Schema ?

anyType

You can append the <child> element to the <element> element by using the <child> element's __________ method.

appendChild

Following is the code for doGet() and doPost() method of TestServlet. Which of the statement is correct? image

c. This will work for HTTP GET as well as POST requests.

create() method of entity bean home interface returns _____________

null

XMLDOMNamedNodeMap' is an XML DOM Object that:

provides iteration and access by name to the collection of attributes.

The ______ method can be used to remove the specified node

removeChild()

Elements which have absolute position are automatically ________ the text flow.

removed from

Which of the following best describes the visual effect that alpha is used for?

replacing text colors

A program in which all statements are executed one after the other in the order in which they are written exhibit ________.

sequential execution

JavaScript lines end with what?

semicolon

Multiple CSS rule properties in style sheets are separated by a ________.

semicolon

Which of the following is not required for counter-controlled repetition?

sentinel

What type of loop is shown in the script below? <SCRIPT LANGUAGE = "JavaScript"> var gradeValue = 0, total = 0, grade = 0; while ( gradeValue != - 1 ) { total = total + gradeValue; grade = window.prompt("Enter Integer Grade, -1 to Quit:", "0"); gradeValue = parseInt( grade ); }</SCRIPT>

sentinel controlled

The JAXB _____ method is used to read from a URL and convert it from XML to Java String

unmarshal

Which property would you use to redirect visitor to another page?

window.location.href

Which of these is the command to enable error handling on a Web page?

window.onError

What is the correct JavaScript syntax for opening a new window called "window5" ?

window.open("http://www.ex-designz.net","window5")

Which method will open a new window?

window.open(PageURL,WindowName,settings);

How do you put a message in the browser's status bar?

window.status = "put your message here"

XSLT

with __________ you can transform an XML document into HTML

The namespace that is used by XML schemas is

www.w3.org/2001/XMLSchema

Which of the statements regarding the following code are correct? public void doPost(HttpServletRequestreq, HttpServletResponse res) throws IOException, ServletException{res.getWriter().print("Hello ");RequestDispatcherrd = getServletContext().getRequestDispatcher("/test.jsp");rd.include(req, res);res.getWriter().print("World");}

"Hello" and "World" both will be a part of the output.

Given the following deployment descriptor:<web-app> context-param><param-name>jdbcDriver</param-name><param-value>sun.jdbc.odbc.JdbcOdbcDriver</param-value></context-param><servlet><servlet-name>InitParams</servlet-name><servlet-class>InitParamsServlet</servlet-class></servlet> ..</web-app>What is the outcome of running the following servlet? (Choose one.)public class InitParamsServlet extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {ServletContextsc = this.getServletContext(); PrintWriter out = response.getWriter(); out.write("Initialization Parameter is: " + sc.getInitParameter("jdbcDriver")); }}

"Initialization Parameter is: null" returned to the requester

What is the result of attempting to access the following JSP page?<html><body><%! public String methodA() { return methodB();}%><%! public String methodB() { return "JAD Final Test";}%><h2><%= methodA() %></h2></body></html>

"JAD Final Test" is output to the resulting web page

Which of the following is not a keyword used for default settings in an! ATTLIST element?

#DEFINE

An attribute which does not have to included is indicated by the value:

#IMPLIED

Consider the following declaration: !ATTLIST student age CDATA ???? Which one of the following can be used to replace ???? in the above definition?

#IMPLIED

Identify the correct statements

#PCDATA means that the element contains data that is to be parsed by a parser. + #CDATA means that the element contains character data that is not to be parsed by a parser.

In XSL the sign that indicates that sorting takes place in the descending order is:

'-'

End of a CDATA block is characterized by the character string

']]'

For elements in the XSL namespace, XSL uses the prefix

'xsl:'

What is the effect of the following line of code? window.event.returnValue = true;

(b) It returns a true value to signal the browser to continue its default event-handling action.

When working with XPath expressions, the ability to combine multiple expressions into one can be done by _________.

(vertical bar aka "pipe")

In an XPath expression, the wildcard _________ can select every child element at once because it automatically matches everything possible.

* (asterisks symbol)

The member access operator is which of the following

,

What happens when you try to access a JSP

- Browser sends HTTP request to web server

See the snipset below and choose one answer

-2

See the snipset below and choose one answer: <xsl:value-of select=ceiling(-2.3)/>

-2

See the snipset below and choose one answer: <xsl:value-of select="floor(-2.3)"/>

-3

What would the browser display if the following script is executed? <SCRIPT LANGUAGE = "JavaScript"> var count = 5, total = 0; while ( count > -1 ) { total = total - 10; count = count - 1; } document.write(total); </SCRIPT>

-60

DOM VS. SAX

-DOM loads the entire document into memory

Which of the following unabbreviated XPath expressions is the same as the abbreviated XPath expression below?/book/chapter[4]/paragraph[2]/sentence[1]

/child::book/child::chapter[position()=4]/child::paragraph[position()=2]/child::sentence[position()=1]

What gets printed when the following JSTL code fragment is executed? Select the one correct answer.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="item" value="2"/> <c:forEach var="item" begin="0" end="0" step="2"><c:out value="${item}" default="abc"/></c:forEach>

0

What gets printed when the following expression is evaluated? Select the one correct answer. ${12 % 4}

0

What is output to the web page on the second access to the same instance of the following JSP? <html><body><% int x = 0; %><%= x++ %></body> </html>

0

What is the value of i after the following statements? i = 2; i- -; i- -;

0

total2 += theArray[ element ]; g)

0 to the array length - 1

What gets printed when the following expression is evaluated? Select the one correct answer. ${4 div 5}

0.8

XML Schema became a W3C Recommendation

02. May 2001

Google Chrome supports XML, XSLT, XPath from version _____.

1

Which number gets printed when the following JSTL code fragment is executed? Select the one correct answers.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %><c:set var="j" value="4,3,2,1"/><c:forEach items="${j}" var="item" varStatus="status"><c:if test="${status.first}"><c:out value="${status.index}" default="abc"/></c:if></c:forEach>

1

< SCRIPT LANGUAGE = "JavaScript" > var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]; modifyArray( theArray[ 3 ] ); document.write( theArray.join( " " ) ); function modifyArray( i ) { i = 11; }</SCRIPT> What will the browser display if the following script is executed?

1 2 3 4 5 6 7 8 9

Given: < SCRIPT LANGUAGE = " " > var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]; modifyArray( theArray[ 3 ] ); document.write( theArray.join( " " ) ); function modifyArray( i ) { i = 11; } </SCRIPT> What will the browser display if the following script is executed?

1 2 3 4 5 6 7 8 9

Given: < SCRIPT LANGUAGE = "JavaScript" > var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]; modifyArray( theArray[ 3 ] ); document.write( theArray.join( " " ) ); function modifyArray( i ) { i = 11; } </SCRIPT> What will the browser display if the following script is executed?

1 2 3 4 5 6 7 8 9

What will the browser display if the following script is executed?< SCRIPT LANGUAGE = "JavaScript" > var theArray = [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]; modifyArray( theArray[ 3 ] ); document.write( theArray.join( " " ) ); function modifyArray( i ) { i = 11; }</SCRIPT> Nothing, the browser will generate an error.

1 2 3 4 5 6 7 8 9

Consider: 1. XSL processor starts the root node and performs pattern matching in the style sheet 2. The style rules of the template are applied to the content to generate a result tree 3. XSL processor analyzes the templates and patterns associated with them to process different parts of the document tree Rearranged above steps for corrected processing of XSL

1, 3, 2

Which of the following values of minOccurs and maxOccurs respectively represent the cardinality operator "+" ?

1, unbounded

Which of the following values correctly represent the default values of the minOccurs and maxOccurs attributes respectively ?

1,1

What are the 4 types of cardinality

1..1 , 1..,..1 and..

What would the browser display if it executed the following script? <SCRIPT LANGUAGE = "JavaScript"> var total = 0; nextLoop: for ( var i = 0; i < 5; ++i ) { for ( var j = 0; j < 2 ; ++j ) { if ( i < 2 ) continue nextLoop; total++; } total++; } total++; document.writeln( total ); </SCRIPT>

10

What is the evaluation of the following expression? ((3+ ( 5 + 4 ) * 7 ) + 4 ) / 5

14

CSS understands _____ number of colours defined by their names:

16

What gets printed when the following is compiled. Select the one correct answer.<% int y = 0; %> <% int z = 0; %> <% for(int x=0;x<3;x++) { %> <% z++;++y;%> <% }%> <% if(z<y) {%> <%= z%> <% } else {%> <%= z - 1%> <% }%>

2

What is the result of the statement 17 % 5?

2

What is the value of num after the following statement is performed? num = Math.round( 2.45 );

2

Which numbers gets printed when the following JSTL code fragment is executed? Select the two correct answers.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="j" value="4,3,2,1"/> <c:forEach items="${j}" var="item" begin="1" end="2" varStatus="status"> <c:out value="${status.count}" default="abc"/> </c:forEach>

2 3

What is the javascript?

3 cau co chu js o dau

Identify the correct syntax: (One or more options are true)

3 dap an con lai ko co #required

Considering the following XML document, what is the result of count(//*): <?xml version="1.0" encoding="UTF-8"?> <root> <employee id="45"> <name>John</name> <salary>$100,000</salary> </employee> </root>

4

MC: How many comparisons will a linear search function makes before finding a match if the search key has a value of 3 and the array x has the values: x[ 0 ] = 0 x[ 1 ] = 2 x[ 2 ] = 1 x[ 3 ] = 4 x[ 4 ] = 3 x[ 5 ] = 3

5

What gets printed when the following expression is evaluated? Select the one correct answer. ${(1==2) ? 4 : 5}

5

What would the browser display if the following script was executed and the user entered 5 at both prompts? <SCRIPT LANGUAGE = "JavaScript">var firstNumber = window.prompt("Enter an integer", 0);var secondNumber = window.prompt("Enter an integer",0);var thirdNumber;thirdNumber = firstNumber + secondNumber;document.write( thirdNumber ); </SCRIPT>

55

How many numbers are printed, when the following JSTL code fragment is executed? Select the one correct answer.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:forEach var="item" begin="0" end="10" step="2"> ${item} </c:forEach>

6

Internet Explorer supports XML, XSLT, and XPath from version ____.

6

What would the browser display if the following script is executed? <SCRIPT LANGUAGE = "JavaScript"> var count = 0, total = 0; while ( count <= 5 ) { total = total + 10; count = count + 1;} document.write(total); </SCRIPT>

60

Given: <SCRIPT LANGUAGE = " "> var total = 0; stop: { // labeled compound statement for ( var i = 0; i < 5; ++i ) { for ( var j = 0; j < 2 ; ++j ) { if ( i == 2 ) break stop; total++; } total++; } total++; } total++; document.writeln( total ); </SCRIPT> What would the browser display if it executed the following script?

7

How many indicators are present in Schema?

7

In Xpath, how many type of nodes in the tree

7

What would the browser display if it executed the following script? <SCRIPT LANGUAGE = "JavaScript"> var total = 0; stop: { // labeled compound statement for ( var i = 0; i < 5; ++i ) { for ( var j = 0; j < 2 ; ++j ) { if ( i == 2 ) break stop; total++; } total++; } total++; } total++; document.writeln( total ); </SCRIPT>

7

Consider the following code selections. Assume count is initialized to 7 and num is initialized to 0. i) ii) do { while ( count < 6 ) num = count; num = count; } while ( count < 6 ) What will the value of num be for i) and ii) respectively after the loops have been executed?

7, 0

XML parsers support ___ bit and ___ bit Unicode encoding corresponding to ASCII.

8 + 16

Given: <SCRIPT LANGUAGE = " "> var c = new Array(8) for( var i = 0; i < 10; i++ ) c[i] = i;document.write(c[9]) </SCRIPT> What would the browser display if this script was executed?

9

Opera supports XML, XSLT, and XPath from version _____.

9

What would the browser display if this script was executed? <SCRIPT LANGUAGE = "JavaScript"> var c = new Array(8); for( var i = 0; i < 10; i++ ) c[i] = i; document.write(c[9]) </SCRIPT>

9

Which of the following is (are) a valid XML name(s)?

:3:3:5:7

Which of these characters can be included within the text in an XML document in literal form?

; & : -

Which of these is a valid comment in XML?

<!- -This data should be hidden <FIRSTNAME>Joe</FIRSTNAME> <LASTNAME>Johnson</LASTNAME> - ->

Which syntax is used to insert comments into an XML document

<!-This is a comment->

Syntax for declaring an external DTD to an XML document is:

<!DOCTYPE N1 SYSTEM "show.dtd">

f the DTD is external to your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:

<!DOCTYPE root-element SYSTEM "filename">

If the DTD is external to your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:

<!DOCTYPE rootelement SYSTEM "filename">

Which of the following statement is the correct syntax for declaring an external DTD?

<!DOCTYPE rootelement SYSTEM [element and attribute declarations]>

Identify the correct syntax for declaring an internal DTD

<!DOCTYPE rootelement [element and attribute declarations]>

If the DTD is included in your XML source file, it should be wrapped in a DOCTYPE definition with the following syntax:

<!DOCTYPE rootelement [elementdeclarations]>

XML documents referencing the DTD will contain the __________ declaration which specifies the location of an external DTD.

<!DOCTYPE>

Which of these is a correct fragment within the web-app element of deployment descriptor. Select the one correct answer.

<error-page> <exception-type> mypackage.MyException</exception-type> <location> /error.jsp</location> </error-page>

Which of the following elements are used for error handling and are child elements of <web-app> of a deployment descriptor?

<error_page>

Which is not a correct name for an XML element

<first name>

Which of these is not a correct name for an XML element?

<first name>

Which of the following are valid tags?

<fpt_university>

To compose a schema with the same target namespace you can use

<include schemaLocation="..." />

Which of the following correctly represents the following JSP statement. Select the one correct answer. <%=x%>

<jsp:expression>x</jsp:expression>

A bean with a property color is loaded using the following statement <jsp:usebean id="fruit" class="Fruit"/> Which of the following statements may be used to print the value of color property of the bean. Select the one correct answer

<jsp:getProperty name="fruit" property="color"/>

Consider the contents of 2 jsp files:<!-- In File : test.jsp --><html><body><% String s = "Hello"; %>//1 insert LOC here.<%=s%></body></html><!-- In File : test2.jsp --><% s = s+" world"; %>What can be inserted at //1 so that it prints "Hello world" when test.jsp is requested?

<jsp:include page="test2.jsp"/>

Which of the following is a valid standard action that can be used by a jsp page to import content generated by another JSP file named another.jsp?

<jsp:include page='another.jsp'/>

_______________ sends a request to an object and includes the result in a JSP file

<jsp:include>

Which of the following correctly represents the following JSP statement. Select the one correct answer. <%x=1;%>

<jsp:scriptlet>x=1;</jsp:scriptlet>

A bean with a property color is loaded using the following statement <jsp:useBean id="fruit" class="Fruit"/> Which statement may be used to set the color property of the bean

<jsp:setProperty name="fruit" property="color" value="white"/>

You want to use a bean that is stored in com/enthu/GUI.ser file. Which of following statements correctly defines the tag that accesses the bean?

<jsp:useBean id="pref" beanName="com.enthu.GUI" type="com.enthu.GUI"/>

Which of the following represents a correct syntax for usebean. Select the two correct answers

<jsp:usebean id="fruit type ="String"/> <jsp:usebean id="fruit type ="String" beanName="Fruit"/>

Which of these is a correct example of specifying a listener element resented by MyClass class. Assume myServlet element is defined correctly. Select the one correct answer

<listener> <listener-class>MyClass</listener-class></listener>

Which of the following are well formed XML fragments?

<myElement myAttribute="someValue"/>

The font-size option 'larger' is used for

<relative-size>

Which of the following XML documents will NOT get successfully validated against the DTD below

<root><root1/><root3/><root3/><root2/></root>

Which of the following code snippets would you use to specify a default declaration of a namespace

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

What is the correct syntax for referring to an external script called "xxx.js"?

<script src="xxx.js">

Inside which HTML element do we put the JavaScript?

<script>

Which of the following xml fragments correctly define a security constraint in web.xml? (Choose one)

<security-constraint><web-resource-collection><web-resource-name>Info</web-resource-name><url-pattern>/info/*</url-pattern><http-method>GET</http-method></web-resource-collection><auth-constraint><role-name>manager</role-name></auth-constraint></security-constraint>

What is the correct HTML for referring to an external style sheet file named mystyle.css?

<style src="mystyle.css">

Choose the correct syntax of x:parse in XML tag of JSTL

<x:parse var="x" scope="session" xml = "${xml}"/>

The syntax for defining an attribute is:

<xs:attribute name="xxx" type="yyy"/>

You want to create an attribute named "baseprice" with a default value of 200 for the "product" element. The attribute should accept integer values. Which of the following statements will you use to declare the attribute

<xsd:attribute name="baseprice" default= "200" type="xsd:integer"/>

You want to create an attribute named baseprice with a default value of 200 for the product element. The attribute should accept integer values. Which of the following statements will you use to declare the attribute?

<xsd:attribute name="baseprice" default= 200 type="xsd:integer"/>

You can do this in an XML schema:

<xsd:attribute name="language" type="xsd:string" use="optional"/>.

A Complex Type element can be defined using

<xsd:complexType name= />

Which of the following XML Schema element definitions are equivalent to the element definition below ? <xsd:element name="myElement" type="xsd:anyType" />

<xsd:element name="myElement" />

You can declare the element like this

<xsd:element name="name" type="xsd:string"/>

Which one of the following statements can be used to process the element TICKETID, having the TICKET element as its ancestor

<xsl:for-each match = "TICKET/TICKETID" >

The data about employees is stored in an XML document. The data is to be presented in a browser window in the ascending order of BASICPAY and descending order of EMPLOYEECODE. Which of the following code snippets should be used in the XSLT style sheet to sort the employee data?

<xsl:sort select="BASICPAY" data-type="number" order="ascending"/> <xsl:sort select="EMPLOYEECODE" data-type="text" order="descending"/>

Identify the correct tag for indicating that a document is a style sheet file and provides a location for declaring the XSL namespace

<xsl:stylesheet xmlns:xsl="url">

Syntax for a typical template element is:

<xsl:template match = "myElement">

Which of the following set of statements will you use to process all the child nodes of the root node?

<xsl:template match= "/"> <xsl:apply-templates/> </xsl:template>

If we wanted to find book elements in an XML document, we would set the match attribute to a simple XPath expression: book, and the code would look like this:

<xsl:template match="book">

Identify the elements, operators in XSL can be used with:

<xsl:template> + <xsl:for-each>

To select the id attribute's value from the code: <student id="1">Jack</student>, you would use the following code:

<xsl:value-of select="@id" />

Which of the following is not a valid equality or relational operator?

=

Here's one example: <polyline points="0,0 100,100 200,0/>

>

<!ELEMENT element-name (child-name )> Identify the sign to be placed in the syntax above so that it declares that the child name can occur zero or one time inside the element.

?

At the end of your XPath expression, add the symbol _________ plus the name of the attribute you wish to select.

@

In XSL, an attributes can be accessed in the way similar to the elements. Notice ____ in front of the attribute name

@

an attributes can be accessed in the way similar to the elements. Notice ____ in front of the attribute name.

@

What are the four annotations used to annotation most methods to specify which operation to invoke

@GET, @POST, @PUT, @DELETE

Annotation for..

@ManyToMany

Annotation for *..1

@ManyToOne

Annotation for 1..*

@OneToMany

Annotation for 1..1

@OneToOne

The _____ annotation can be used to bind template parameters to a resource class field

@PathParam

What statement is true when processing XML in a servlet or JSP?

A DTD or Schema must be provided for validation.

Identify the correct statements about style sheets:

A Style sheet is a set of instructions to display the+A style sheet separates presentation layer from the content data of the document.

Special symbols can be inserted into an XML document using

A UNICODE value

What does the srcElement event property contain?

A reference to the element that fired the event.

Which of the following statements are correct about the status of the Http response. Select the one correct answer.

A status of 200 to 299 signifies that the request was successful.

Which of these are legal return types of the doEndTag method defined in a class that extends TagSupport class. Select the two correct answers.

A. EVAL_PAGE (E.SKIP_PAGE)

A user types the URL http://www.javaprepare.com/scwd/index.html . Which HTTP request gets generated. Select the one correct answer

A. GET method

Which of the elements defined within the taglib element of taglib descriptor file are required. Select the two correct answers

A. name D.tag-class

Which of the elements defined within the taglib element of taglib descriptor file are required. Select the two correct answers

A. tlib-version B.short-name

Which of the following are correct statements? Select the two correct answers

A.The getRequestDispatcher method of ServletContext class takes the full path of the servlet, whereas the getRequestDispatcher method of HttpServletRequest class takes the path of the servlet relative to the ServletContext C.The getRequestDispatcher(String URL) is defined in both ServletContext and HttpServletRequest method

Which of the follwing are mandatory elements within the filter element. Select two correct answers.

A.filter-name D.filter-class

Which of the following statement would import additional schema or schema components into an existing collection object ?

ALTER XML SCHEMA COLLECTION

The keyword termed as the shorthand for mixed content containing all declared elements is:

ANY

In DTD, XML element attributes are declared with a/an _________ declaration.

ATTLIST

In a DTD, Attributes are declared with an _______ declaration

ATTLIST

When selecting elements, the method of using the complete path is referred to as the ________ path, and it is useful for selecting specific elements.

Absolute

What are some Features of XSLT

Add/remove elements and attributes

What are some CSS limitations when used with XML

Adding functionality , Reordering and sorting , Generation of text

You could use this attribute xmlns:service="http://www.superduperbigco.com/customer_service" in an element

After using this attribute, you can use the service prefix in the current element and any child elements.

Which of the reasons will force you to use XML data model in SQL Server?

All of the Mentioned

A Java transformer can use

All of the above

An element name can begin with

All of the above

How is an empty XML element defined?

All of the above

How is an empty element field defined

All of the above

IN CSS styling property value may be

All of the above

Markup includes

All of the above

Tags can begin with

All of the above

Which of the following is represented as a node in the tree a DOM parser creates?

All of the above

Which statement is true?

All of the above.

XML is more advantageous to use than a fixedlength database system because

All of the above.

The HttpServletRequest has methods by which you can find out about incoming information such as:

All of the others

Which of the following is not a property of the blur filter?

All of these are properties of the blur filter.

How will the following CSS rule alter the Webpage if it is applied in a style sheet? H1 { font-family: Arial, sans - serif }

All text enclosed by H1 tags will have the sans-serif font if Arial is not supported by the system.

With an extensible Schema definition you cannot:

All the above

Which of the following statement/s are true?

All the above statements are true.

What does the "sequence" element of XSD indicate?

All the elements specified within this element must compulsorily appear in the XML document, and they must appear in the specified order

What does the sequence element of XSD indicate?

All the elements specified within this element must compulsorily appear in the XML document, and they must appear in the specified order

Which statement(s) about Servlet Life Cycle is(are) correct? (Choose one)

All the others

In order to indicate to an application processing the style sheet to look for <All> tags followed by<Perfect> tags the syntax is:

All.Perfect

What organization presented the first version of Starndardized Generalized Markup Language (SGML) in 1980? )

American National Standards Institute (ANSI)

Which of the following statements MOST accurately describes a "linkbase" ?

An XML document, which contains inbound or third party links is called a linkbase

PCDATA is

An XML element that contains parsed character data

Prefix is:

An alias selected by a document author

Property documentElement of DOMDocument object return

An object representing the root element if the XML document

Which is NOT EJB container?

Apache Tomcat 5.5

The _________________ is the overall application architect. This party is responsible for understanding how various components fit together and writes the applications that combine components

Application Assembler

What does the xsl:apply-imports for?

Apply the template to selected location from xsl:apply-imports

Select the BEST case to Use Entity Beans? (Choose one)

At any given time, only one client has access to the bean instance.

Consider the xml fragment 15. <aaa></aaa> 16. <bbb></bbb> Choose the correct answer when the SAX is used

At least callback method in content handler will be triggered after line 15 and before line 16

What does ACID standfor

Atomic, Consistent, Isolated, Durable

Declaring an attribute as 'optional, -, -' means

Attribute may occur once and have any value

Which of the following statement is correct? (choose one)

Authorization means determining whether one has access to a particular resource or not.

Select the flawless tags used to create a margin :

A{margin-left:10cm;} + A{margin-left:10%;}

Name the http method used to send resources to the server. Select the one correct answer

B. PUT method

Which element of the servlet element in the deployment descriptor is used to specify the parameters for the ServletConfig object. Select the one correct answer.

B. init-param

Assertion: Implementing EDI involves high costs.Reason: EDI is built on fixed transaction set.Which of the following hold TRUE for this Assertion-Reason?

BOTH the assertion and the reason are TRUE, and the reason is a correct explanation of the assertion.

In ejb-jar.xml file, <persistence-type> element value is _________________

Bean or Container

The ______________ supplies business components, or enterprise beans.

Bean provider

If a ______________is being used then all the operations need to be written by the developer to a persistent API.

Bean-Managed persistent entity bean

Which statement is correct about Bean-managed persistent (BMP)?

Bean-managed persistent persisted by the developer, who write the code for the database access calls

Fill in the blanks. A tag handler class must implement the javax.servlet.jsp.tagext.Tag interface. This is accomplished by extending the class TagSupport or another class named in one of the options below. Select the one correct answer.

BodyTagSupport

What does the keyword SYSTEM indicate in the following code? <?xml version ="1.0"?> <!DOCTYPE Book SYSTEM "book.dtd">

Book.dtd is an external DTD

What does the keyword SYSTEM indicate in the following code? <!DOCTYPE Book SYSTEM "book.dtd">

Book.dtd is an internal DTD

XSLT allows any kind of data to be tranformed into

Boolean

Study the statements:1) URL rewriting may be used when a browser is disabled cookies. 2) In URL encoding the session id is included as part of the URL. Which is the correct option?

Both 1 and 2 are true

Which of the following types of parses is issued for event-based parsing?

Both SAX and StAX

Identify the correct statements:

Both are correct

Which of the following classes define the methods setStatus(...) and sendError(...) used to send an HTTP error back to the browser?

Both are defined in HttpServletResponse

Where is the correct place to insert a JavaScript?

Both the <head> section and the section are correct

Consider the following statements: Statement A: A namespace is a method of preventing conflicts between elements having the same names. Statement B: A namespace URI is the same as a Web URI. Which of the following is correct about the above statements?

Both, Statement A and Statement B, are True.

Consider the following statements: Statement A: XML enables you to store data in a structured format by allowing you to create customized tags. Statement B: XML documents can be easily interpreted by target systems. Which of the following is correct about the above statements?

Both, Statement A and Statement B, are True.

Consider the following statements: Statement A: XML is a text-based markup language that enables you to store data in a structured format by using meaningful tags. Statement B: XML allows you to format data as per the requirements of the application.Which of the following is correct about the above statements?

Both, Statement A and Statement B, are True.

XML generated by a servlet or JSP CANNOT be displayed by a browser in which one of the following ways?

By passing it from a browser to another servlet or JSP for reformatting

In XLink, how can you ensure that the content of a linked document appears in a new browser window

By setting the value of the show attribute to new.

Which of the following represents the XML equivalent of this statement <%@ include file="a.jsp"%> . Select the one correct statement

C. <jsp:directive.include file="a.jsp"/>

A bean with a property color is loaded using the following statement <jsp:usebean id="fruit" class="Fruit"/> What happens when the following statement is executed. Select the one correct answer. <jsp:setProperty name="fruit" property="*"/>

C. All the properties of the fruit bean are assigned the values of input parameters of the JSP page that have the same name

Which three digit error codes represent an error in request from client? Select the one correct answer

C. Codes starting from 400

Which of the following files is the correct name and location of deployment descriptor of a web application. Assume that the web application is rooted at \doc-root. Select the one correct answer

C. \doc-root\WEB-INF\web.xml

Which of the following is a valid VBScript conversion function?

CInt

Which of the following is not a valid HTTP/1.1 method. Select the one correct answer

COMPARE method

Cascading Style Sheets

CSS (acronym)

What are 2 styling options for XML?

CSS and XSLT (Extensible Stylesheet Language Transformation)

Which of the following statements relating to cascading style sheets and formatting objects is FALSE ?

CSS is an XML syntax that can be used to describe the appearance of particular elements in an XML document, Cascading style sheets can only be applied to non XML documents.

Identify the correct statements

CSS is an extension of HTML + XSL is an extension of XML

What is hybrid model in SQL Server ?

Combination of relational and XML data type columns

________ allow you to specify the style of your page elements (spacing, margins, etc.) separately from the structure of your document

Cascading Style Sheets

Nebula communications Inc is currently in the process of optimizing their database driven XML based web

Change the application's parser to SAX instead of DOM

Method characters() of ContentHandler interface receives events for

Character data

What does method characters() of ContentHandler interface receive events for?

Character data

Consider the following XML document: <?xml version="1.0"?> <ORDERDETAILS> <PRODUCT ID="P001" NAME="Mini Bus" PRICE="75"><ORDER ID="O001"> <SHIP_ADD>10 NEWSLAND ESTATE, NY</SHIP_ADD> <QUANTITY>30</QUANTITY> </ORDER> <ORDER ID="O002"> <SHIP_ADD>11 NEWSLAND ESTATE, NY</SHIP_ADD> <QUANTITY>50</QUANTITY></ORDER> </PRODUCT> </ORDERDETAILS> Which of the following code snippets will you use to display the product of price and quantity

Choose D

Selectors allowing us to differentiate between different occurrences of <extension> are termed as

Contextual selectors

Which statement is correct about Container-managed persistent (CMP)?

Container-managed persistent persisted by the Enterprise Java Beans container

The instantiation of a session bean is done by the ____________________ while the management of the lifetime of the bean is done by the ___________________________.

Container/EJB server

Which one of the following sets of interfaces are part of the SAX2 API?

ContentHandler, ErrorHandler, and DTDHandler

Selectors helping us to differentiate between different occurrences of a tag are termed as

Contextual Selectors

What is the function of the XML parser?

Converts XML document to XML DOM object

A variable that your webpage can store on or retrieve from the users computer is known as ?

Cookie

createElement(fititlefl) means

Create a new XML element

XML Can be Used to

Create new language.

Unlike most other markup languages, including HTML, XML allows you to do what?

Create new tags

Which of the following statements regarding the differences between DOM and SAX are false ?

DOM is ideally suited than SAX for handling large documents, that may need to be searched efficiently, If random access to an XML document is desired, SAX is better suited than DOM

John, an XML developer, uses DOM to define the logical structure of documents and the way a document is accessed and manipulated. He wants to use XML DOM objects to traverse, read, and manipulate the structure and content of an XML document. John wants to represent the complete document map, which contains all the information in an XML document. He also wants to create an instance of the DOMDocument object to be able to work with any XML document. Which one of the following objects should John use?

DOMDocument

Which object represents the top level of the XML source?

DOMDocument

The DOM specification describes how strings are to be manipulated by the DOM by defining the datatype _______. It is encoded using _______ encoding scheme.

DOMString, Unicode

Data Islands are also referred to as:

DSOs

XML Schemas are the Successors of

DTD

Document Type Definition

DTD (acronym)

Which of the following cannot be a part of a SOAP message?

DTD Processing Instruction

Which of the following statements does not correctly identify the limitations of DTDs ?

DTD can be changed programatically using the DocumentType interface in DOM

In SAX, to provide customized DTD handling, application need to implement :

DTDHandler

What are difference between schema and DTD?

DTDs do not have a facility to describe numbers, dates but the Schemas do

Which of the following statements about namespaces and DTDs are false?

DTDs for a document with namespace qualified elements cannot be written since DTDs do not support namespaces

What does DDL stand for

Data Definition Language

Which of the following statement about SAX is false?

Data parsing can be controlled through SAX

XSL is BEST described as a

Declarative language

Implements the method of ErrorHandler, EntityResolver, DTDHandler :

DefaultHandler

XML is a Meta-Language. Select the option which best describes the statement given above.

Describes other languages.

Method hasChildNodes of XMLDOMNode mean

Determine if a given node has child nodes or not

Which purpose is the schema declaration used to in XML file?

Determine instance namespace applying to XML document

The DocumentBuilder object's parse method to parse an XML document and create a Java _____________ object

Document

The DOCTYPE statement represents the DTD which is termed as

Document Type Declaration

DTD is:

Document Type Definition

To describe data XML uses a _________

Document Type Definition

What does DTD stand for

Document Type Definition

Which of the following XML based technologies can be considered as XML metadata?

Document Type Definition, XML Schema

The default scripting language for Netscape and Internet Explorer is ________

ECMAScript

The ______________ is the container-generated implementation of the remote interface

EJB Object

Which of these is legal return type of the doStartTag method defined in a class that extends TagSupport class?

EVAL_BODY

XSL stands for:

EXtensible Stylesheet Language

Default Fetch Behavior for Many-To-One

Eager

Default Fetch Behavior for One-To-One

Eager

Which of the following statements about XSL formatting objects are false ?

Elements in XSL-FO objects map to the boxes on the page in a one to one fashion

Which Statement about xml is true?

Elements may nest but not overlap

John is an XML programmer. He writes the following code to represent the items of a toy company: <?xml version="1.0" encoding="UTF-8"?> <!--PRODUCTDATA is the root element--> <PRODUCTDATA> <PRODUCT PRODID="P001"> <PRODUCTNAME>Barbie Doll</PRODUCTNAME> <DESCRIPTION> The price of this toy is < 200</DESCRIPTION> <PRICE>$20.00</PRICE> <QUANTITY>12</QUANTITY> </PRODUCT> </PRODUCTDATA> Identify the error in the above code and suggest a solution for the same.

Error on line: <PRODUCT PRODID="P001"> Solution: He should use quotP001; instead of "P001".

Which of the following handler interfaces is used by the SAX API to validate error?

ErrorHandler

The xsl:if is used to

Evaluate a condition expression against the content of the xml file

What type of method does SAX use to process XML documents?

Event-based

Actions that can be detected by JavaScript are called?

Events

Regarding URL rewriting for session support, which of the following is true?

Every URL that the client uses must include jsessionid.

In an XPath expression, the element to the right of the double period will have its parent selected.

False

JavaScript must be complied (changed to binary) before it can be run.

False

XPath can locate any type of information in an XML document with one line of code that returns a value when executed and is referred to as a(n) ________.

Expression

What is the format of DTDs ?

Extended Backus-Naur Form (EBNF);

What is XML?

Extensible Markup Language

What is XML

Extensible Markup Language: an application- and platform-independent way to represent data

XSLT is:

Extensible Stylesheet Language Transformation

The acronym XSLT stands for __________.

Extensible Stylesheet Language Transformations

The element is used to

Extract text from the source document

Consider the following XML document and the attached stylesheet. What is the result of applying

FALSE

The ________ attribute of the ________ element specifies another element that is identified by its ________ attribute.

FOR, SCRIPT, ID.

What would the browser display if the following code is executed in a script? var grade = 59 if ( grade >= 60 ) document.writeln( "Passed." ); else document.write( "Failed. " ); document.writeln( "You must take this course again." );

Failed

What would the browser display if the following code is executed in a script?var grade = 59 if ( grade >= 60 ) document.writeln( "Passed." ); else document.write( "Failed. " ); document.writeln( "You must take this course again." );

Failed.

#REQUIRED specifies that an element is required in all XML documents that use the DTD.

False

A parent element cannot contain another parent element.

False

A processing command is removed from an XML document before the XML document is passed along to the application that uses the XML document.

False

A session bean being used by a client can also be used by another client.

False

ANY indicates that an element can contain only one child element of character data.

False

All XML markup tags must have an attribute.

False

All functions used by an XQuery are built in functions.

False

An XML document must contain all elements declared in the DTD.

False

An object with page scope exists in every JSP of a particular Web application.

False

Attribute values must always be enclosed by double quotes.

False

Child elements declared in a sequence need not appear in the document in the same sequence.

False

DOM 2 doesn't provide mechanism for interrogating and modifying the namespace for a document.

False

Even if all the border options are set using 'solid' as the border style option will remove, or turn off all the borders

False

Every XML document must have an associated DTD or schema

False

The process of turning the result of an XSL transformation into a suitable output form for a reader or listener is identified as:

Formatting

XML is

Free and Extensible

Use the ___ request when no data is sent

GET

Which HTTP method gets invoked when a user clicks on a link? Select the one correct answer

GET method

The entities that are used only in DTDs are referred to as

General entities

The HttpServlet extends _____

GenericServlet

What does the value string contain after the following code is executed? var string = "Good luck on the test"; string = string.split( " " );

Good luck on the test

Which of the following part of the XML data stored in an XML column is very important for locking?

Granularity

Which of the following is NOT a valid CSS selector?

HEAD selectors

XML is a Complement to

HTML

what is the purpose of HTML

HTML - designed to display data, with focus on how data looks

Which of the following statements correctly states the difference between HTML and XML?

HTML focuses on presentation of data, while XML focuses only on data and not on how the data is to be presented.

carrying

HTML is a about displaying information, while XML is about _____________ data (transport and storage)

Which of the following statements w.r.t XLinks and HTML links are true ?

HTML links cannot be used for multi directional navigation, XLinks can be used to link documents without modifying the documents to include the links

What are characteristics of HTML tags

HTML tags are predefined with a set meaning

Difference between XML and HTML

HTML was designed to display data and focus on how data looks

Any class that extends ____ is a servlet

HTTPServlet

It is usually advisable to keep as much JavaScript as possible in which section?

Head

JSP pages have access to implicit objects that are exposed automatically. One such object that is available is request. The request object is an instance of which class?

HttpServletRequest

Name the class that includes the getSession method that is used to get the HttpSession object.

HttpServletRequest

Which class that includes the getSession method that is used to get the HttpSession object?

HttpServletRequest

The method getWriter returns an object of type PrintWriter. This class has println methods to generate output. Which of these classes define the getWriter method? Select the one correct answer.

HttpServletResponse

Which of the following method can be used to add cookies to a servlet response?

HttpServletResponse.addCookie(Cookie cookie)

Which of the following XML attribute names is invalid?

I am not valid

The simplest way to reference a DHTML element is by its ________ attribute

ID

XMLDOMNode implements the interface

IXMLDOMNode

The DOCTYPE is used to

Identify the DTD for an XML document

xmlns:xs=fihttp://www.w3.org/2001/XMLSchemafl is used to

Identify the XML schema specifications used in the XML schema

xsi:schemaLocation=ficustomers.xsdfl is used to

Identify the location of the XML schema

A Java bean with a property color is loaded using the following statement <jsp:usebean id="fruit" class="Fruit"/> What is the effect of the following statement. <jsp:setproperty name="fruit" property="color"/> Select the one correct answer.

If there is a non-null request parameter with name color, then its value gets assigned to color property of Java Bean fruit.

Which of the following is false?

In any flowchart, control structure (sequence, if, if/else, switch, while, do/while or for) can be replaced by 2 rectangle (actions) in sequence.

All XML processors are supposed to implement at least the UTF-8 (compressed Unicode) and UTF-16 (compressed UCS) character encodings

In practice, you can only count on UTF-8, however

Identify if the following code is correct? <b><i>This text is bold and italic</b></i>

Incorrect

What is the significance of the + sign in the code given below? <!ELEMENT BOOK (AUTHOR+)>

Indicates that AUTHOR tag must occur at least once inside the BOOK element

Which of the following is indicated by URL, which is used on the Internet?

Information resources(sources) on the Internet

The VBScript ________ function has the same purpose as JavaScript's window.prompt method.

InputBox

Which of the following functions searches a string for a substring and returns an index of the found substring if it is found?

Instr

Identify if the following XML document code is valid. <?xml version="1.0"?> <to>Joe</to> <from>John</from> <heading>Reminder</heading> <body>Dont forget me this weekend!</body>

Invalid

Is the following code for commenting in XML valid? <!-- Comment1 <!-- Comment2 --> -->

Invalid

JavaScript is called an "object oriented" language, This means...

It can be used to point objects in a particular direction.

Identify correct statement about a WAR file.(Choose one)

It contains web components such as servlets as well as EJBs

Given: <HTML> <HEAD> <TITLE>DHTML Event Model - ONLOAD</TITLE> <SCRIPT LANGUAGE = " "> var value = 0; function startTimer(){window.setInterval( "updateTime()", 1000 ); } function updateTime(){ value++; pText.innerText = value; }</SCRIPT> </HEAD> <BODY ONLOAD = "startTimer()"> <P><A ID = "pText">0</A></P> </BODY> </HTML>

It counts the number of seconds elapsed viewing the page.

What does the following HTML document do? <HTML> <HEAD> <TITLE>DHTML Event Model - ONLOAD</TITLE> <SCRIPT LANGUAGE = "JavaScript"> var value = 0; function startTimer(){ window.setInterval( "updateTime()", 1000 ); } function updateTime(){ value++; pText.innerText = value; } </SCRIPT> </HEAD> <BODY ONLOAD = "startTimer()"> <P><A ID = "pText">0</A></P> </BODY> </HTML>

It counts the number of seconds elapsed viewing the page.

What does the Option Explicit statement do?

It does not allow the programmer to use variables without declaring them first.

Which of the following is the best description of the characters() method?

It is a method of the SAX ContentHandler interface to receive notifications on the presence of character data.

What makes XML Unique

It is a standard that lets users create their own tags to structure and store data

Identify the correct statements related to XSLT

It is a template-based language.+It lets one map a pattern in the source document with the output in XML.

Which of the following statements about XSL formatting objects are true ?

It is possible to perform conditional formatting using XSL FO, It is possible to render a page with multi column layouts using XSL FO, Formatting objects can be used to describe the layout of a rendered page

What does the following CSS rule do? .note { font-size: 1.5em }

It multiplies all text object font sizes with CLASS = "note" by 1.5.

Which of followings are features of SGML?

It needs a separate+It describe+SGML application is

XSL does not provide support for:

It provides support for all the options stated.

What does the ScriptEngine function do?

It returns the type script being used.

The following paragraph describes the differences between XML and HTML but there are some FEATURES are NOT correct. Please find out them. XML features * Defined set of tags designed for web display * Format driven * End tags required for well-formed documents * Quotes required around attributes values * Slash required in empty tags HTML features * User definable tags * Content driven * End tags not required * Quotes not required * Slash not required

It should be swap between Defined set of tags designed for web display and Format driven of XML to User definable tags and Content driven of HTML

An XML element is the basic data-holding construct in an XML document

It starts with an opening tag, can contain text or other elements, and ends with a closing tag, like this: <greeting>hello</greeting>

What is stored inside the variable value after the following line of code is executed? var value = navigator.appVersion;

It stores a string representing the version of the browser and other information.

What is the significance of the following CSS rule? LI, EM { color: red;cfont-weight: bold }

It will apply the specified style to text enclosed by either LI or EM tags.

What will value contain after the following code is executed assuming that Colors is a valid TDC control? value = Colors.recordset;

It will contain the current indexed item of the datasource.

What makes XML more powerful than HTML?

Its ability to adapt to new uses

How to unmarshall XML into Java objects? Convert from XML to Java objects.

JAXBContext context = JAXBContext.newInstance(Cars.class); Unmarshaller u = context.createUnmarshaller(); Cars cars = (Cars) u.unmarshal(new FileInputStream("cars.xml"));

Which Exception is used when JAXB operation is applied?

JAXBException

Microsoft's version of scripting that uses the Java syntax is called ________.

JScript

What does JAX-RS standfor

Java API for XML and RESTful services

What does JAXB stand for?

Java Architecture for XML Binding

The word sequence in the term sequence structure refers to the sequence of ________.

JavaScript instructions in a script

What would the function cube return, assuming it is called with the line cube(3). function cube(y); { return y y y; }

JavaScript runtime error

Which is the correct sequence?

Jsp page is translated -->jsp page is complied-->jspInit is called ->_jspService is called -->jspDestroy is called

Select the correct JMS programming model.

Locate the JMS Driver->Create a JMS connection->Create a JMS session->Locate the JMS destination->Create a JMS producer or a JMS consumer->Send or receive message.

In EJB 2.0, ejb-jar.xml deployment descriptor file must be placed in ___________ folder.

META-INF

IE5 has an inbuilt XML Parser called

MSXML

See the snipset below and choose one answer: <xsl:for-each select="LIST//TITLE">...</xsl:for-each>

Match all <TITLE> elements one or more level deep in the <LIST> element

How do you find the largest number of 6 and 8?

Math.max(6,8)

How do you round the number 8.25, to the nearest whole number?

Math.round(8.25)

Which statement is correct about Message-Driven Beans exception handling?

Message-Driven Beans cannot send any exceptions back to clients

Which statement is correct about Message-Driven Beans?(Choose one)

Message-Driven Beans stateless

In DOM, a node can have

More than one children nodes

In XPath, you reference an element by using it's __________.

Name

An attribute contains a

Name/value pair

you have an attribute of enumerated type. What are the valid values for it ?

NameChar

Which of the following represents an abstraction of an unordered collection of nodes in DOM?

NamedNodeMap

Allow to validate documents that use markup from multiple namespaces?

Namespace support

H1{font-size xx-large} Is the above statement syntactically correct to make the heading font extra large?

No

Is the following attribute valid? <!ATTLIST Test4 an_attribute ID #FIXED "value">

No

Select the BEST case to use message-driven bean?(Choose one)

Need to avoid tying up server resources andneed the applications to process messages asynchronously

Which browsers can view the visual effects created by filters and transitions?

Netscape

S{margin-right:-3cm;} Is the above statement valid?

No

Is the following JSP code legal? Select the one correct statement. <%@page info="test page" session="false"%> <%@page session="false"%>

No. This code will generate syntax errors

Which of the following DOM interfaces could be used to filter a set of nodes from a tree based on some criteria?

NodeFilter

Differentiating between the different occurrences of a tag is by:

None of the above

The SAX parser creates a node by using

None of the above

The element is used to

None of the above

Which of the following schema fragments is the same as the DTD fragment below ? <!ELEMENT myElement EMPTY>

None of the above

Identify the correct statements

None of the above.

XMLDOMEntity' is an XML DOM Object that:

None of the options given

The declaration is used to declare the xml tag library using in JSP as

None of the others

Which features must the well-formed XML document have?

None of the others

Which of the following packages present in JAXP belong to SAX?

None of the others

Which of these is true about deployment descriptors? Select one correct answer

None of the others

Which syntax is used to declare the attribute of an element in DTD?

None of the others

Which ways are the CSS style rules applied to HTML?

None of the others

How many numbers gets printed when the following JSTL code fragment is executed? Select the one correct answer.<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="item" value="2"/> <c:choose> <c:when test="${item>0}"> <c:out value="1"/> </c:when> <c:when test="${item==2}"> <c:out value="2"/> </c:when> <c:when test="${item<2}"> <c:out value="3"/> </c:when> <c:otherwise> <c:out value="4"/> </c:otherwise> </c:choose>

One number gets printed.

type=fiintegerfl means

Only integers can be used in the corresponding element.

Study the statements about web.xml file: 1) The deployment descriptor file is called web.xml, and it must be located in the WEB-INF directory.2) web.xml is in XML (extended markup language) format. Its root element is <web>.

Only statement 1 is true

_________ is a term used about text data that will be parsed by the XML parser.

PCDATA

You do not want the user to see the data and the format being passed to your server when the user tries to submit the information for registering with your site. Which HTTP method would you use? (Comment: You can set some hidden parameters such as server location, in the page when the user loads it. Such parameters mean nothing to the user and are generally not displayed. However, determined users can still view them using "View Source" for the page).

POST

When using HTML forms which of the folowing is true for POST method? Select the one correct answer.

POST method sends data in the body of the request.

What does the parser do with the CDATA section of an XML document?

Passes the data to the application that uses the XML document without any translation or interpretation

In CSS, identification of a selector context is done by using a:

Period

firstChild is a

Property containing a reference to the first child of an element

________ is an artificial and informal language that helps programmers develop algorithms.

Pseudocode

Which are the types of messaging domains? (choose 2)

Publish/Subscribe

SAX uses :

Push parsing machenic for processing

XMLDOMNodeList' property is:

Read only

childNodes' is a property of the DOMDocument Object: (Select the correct statements)

Read-only.+Contains a node list containing the children.

A SAX parser

Reads a block of an XML document at a time

What are the two main purposes of Transaction Support

Recovery, Concurrency

What is this: ?

References a shared DTD

Xpath expressions can be created using _________ paths, so that instead of starting at the root element, you can simply reference the element from within the path structure and go from there.

Relative

Every method of the remote interface must throw a __________________

RemoteException

By starting at the _______ element, we can select any element in the XML document by carefully creating a chain of children elements.

Root

The XSLT processor begins at the ______ element when looking for template matches.

Root

When you are using the absolute path to locate an element, your expression must start with the _________ element of your XML document.

Root

Assume <BODY> is used as the root element in an XML document. This indicates that

Root element can be customized. + Root element describes the function of the document.

Which of these characters cannot be used as entity references in XML

S

A county library uses an XML based application to query an XML database of books maintained

SAX

An XML based application maintains a very large configuration file in XML format.

SAX

Which one is most appropriate to parse large document?

SAX

Which of the following are disadvantages of using SAX parsers?

SAX is read-only

What are two types of XML Parsers

SAX, DOM

You create a SAX parser by using the ________________object.

SAXParserFactory

In Java 1.4 or later, you can derive a class from a SAX handler class, such as DefaultHandler, and then use a

SAXParserFactory object to create a new SAX factory. You create a SAX parser by using the SAXParserFactory object, call its parse method, and implement the SAX methods you want (for example, the startElement method).

Which one of the following classes is used to create an instance of XMLReader?

SAXReader

The sendRedirect method defined in the HttpServlet class is equivalent to invoking the setStatus method with the following parameter and a Location header in the URL. Select one correct answer.

SC_MOVED_TEMPORARILY

The sendError method defined in the HttpServlet class is equivalent to invoking the setStatus method with the following parameter. Select the one correct answer

SC_NOT_FOUND

XML is a subset of

SGML

________ is a very powerful language and the mother of all markup languages.

SGML

Which of the following is not an extension of XML?

SGML.

JAX-WS supports which type of web service

SOAP

Which of the following statements regarding messaging with SOAP are true?

SOAP is a protocol agnostic methodology of transmitting data to other SOAP enabled applications

XML datatype was introduced in which of the following versions of SQL Server ?

SQL Server 2005

Which one of the following is the root element of all XML Schema documents?

Schema

Please read the following description about JAXB and choose the correct component to fill in blank in the JAXB Architectural Overview picture.A JAXB implementation consists of the following architectural components: + Schema compiler: Binds a source schema to a set of schema-derived program elements. The binding is described by an XML-based binding language. + Schema generator: Maps a set of existing program elements to a derived schema. The mapping is described by program annotations. + Binding runtime framework: Provides unmarshalling (reading) and marshalling (writing) operations for accessing, manipulating, and validating XML content using either schema-derived or existing program elements.

Schema Generator

How many components do the JAXB Architecture provide?

Schema compiler, Schema generator, Binding runtime framework

See the snipset below and choose one answer: <xsl:template match="BOOK*position()!=2+"> <xsl:value-of select="."/> </xsl:template>

Select all BOOK elements that are not the second child of their parents

The statement is used to

Select the id attribute

Which of the following is not a XML storage option?

Small object storage

Document Content is determined by

Semantic Markup

What markup language categorization determines the content of the document?

Semantic Markup

In CSS, separation of multiple value combinations is by using a:

Semi-colon

Which interface and method should be used to retrieve a servlet initialization parameter value? (Choose one)

ServletConfig : getInitParameter(String name)

Identify the correct syntax for creating an XML document through DOM.

Set xmlDoc = CreateObject("Microsoft.XMLDOM")

What does SAX stand for

Simple API for XML

What is the full form of SAX?

Simple API for XML

SOAP stands for

Simple Object Access Protocol.

What does SOAP stand for

Simple Object Access Protocol.

The where clause

Specifies the filter criteria

The xs:sequence tag

Specifies the sequence in which elements must appear in an XML document

SGML stand for

Standard Generalization Markup Language

Consider the following statements: Statement A: XSLT is a superset of the CSS functionality. Statement B: XSLT is an application of XML.Which of the following is correct about the above statements?

Statement A is False, and statement B is True.

Consider the following statements: Statement A: Java Architecture for XML Binding (JAXB) provides a fast and convenient way to bind between XML schemas and Java representations, making it easy for Java developers to incorporate XML data and processing functions in Java applications. Statement B: JAXB provides methods for unmarshalling (writing) XML instance documents into Java content trees, and then marshalling (reading) Java content trees back into XML instance documents.

Statement A is True, and Statement B is False.

Consider the following statements: Statement A: The xjc schema compiler, also called the binding compiler, is an important part of a JAXB implementation. The compiler binds a source XML schema to a set of schema-derived program elements. The binding is described by an XML-based binding language in a binding file. The binding compiler produces a set of packages containing Java source files and JAXB property files. Statement B: In most cases, the default bindings generated by the binding compiler are sufficient. However, there are cases where you might want to modify the default bindings (for example, you might want to provide more meaningful package names than are generated by default), you can use the following syntax: xjc schema_file.xsd g package_name

Statement A is True, and Statement B is False.

Consider the following statements: Statement A: You can point at a single document by using a hyperlink in HTML. Statement B: HTML links are multidirectional. which of the following is correct about the above statements?

Statement A is True, and Statement B is False.

Consider the following statements: Statement A: You can use the <!ATTLIST> statement in a DTD to declare an attribute for an element. Statement B: A single <!ATTLIST> statement can be used to declare multiple attributes for an element.Which of the following is correct about the above statements?

Statement A is True, and Statement B is False.

Consider the following statements: Statement A: XML stand for eXtensible Markup Language. Statement B: CSS stand for Creative Style Sheets.Which of the following is correct about the above statements?

Statement A is True, and statement B is False.

Height="8" Weight="70"> Here 8 and 70 when used outside XML Environment, they are taken as

Strings

Document Structure is determined by

Structural Markup

The markup languages are classified as ____, ____ and _____

Structure Markup+Semantic Markup+Stylistic Markup

In order to format an XML document we combine it with a

Style sheet

Identify the correct statements:

Tags from multiple namespaces can be mixed. + XSL uses the prefix xsl: for elements in the XSL namespace

The <frameset> and <frame> elements are supported in XHTML 1.0 Frameset only.

T

The height and width attributes are required.

T

Name the http method that sends the same response as the request. Select the one correct answer

TRACE method

Which of the following is not a type of DTD?

Table based.

Consider the following HTML document. <HTML> <HEAD> <TITLE>Children Collection</TITLE> <SCRIPT LANGUAGE = "JavaScript"> </SCRIPT> </HEAD> <BODY> <P></P> </BODY> </HTML> Select the true statement.

The SCRIPT element is a direct child of the HEAD element.

Which of the following is false?

The Sort property automatically displays the new order of the data.

Which of the following is true? When TDC is bound to a table, the user must allocate enough table data elements to accomodate all of the

The TDC handles creating table cells for output.

stop processing

The W3C XML specification states that a program should __________ an XML document if it finds an error

Given <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xml.netbeans.org/schema/mail" xmlns="http://xml.netbeans.org/schema/mail" elementFormDefault="qualified"> <xsd:element name="mail"> <xsd:sequence> <xsd:element name="to" type="xsd:language" /><xsd:element name="from" type="xsd:token"/> <xsd:element name="header" type="xsd:string"/> <xsd:element name="body" type="xsd:normalizedString"/> </xsd:sequence> </xsd:element> </xsd:schema> Select the correct statement

The XML Schema is not valid because the xsd:element must include simpleType or complexType

Given the XML code fragment <?xml version="1.0" encoding="UTF-8"?> <library xmlns="http://www.fpt.edu.vn" xmlns:article="http://www.article.fpt.edu.vn" xmlns:person="http://www.biolography.com.vn"> <book article:id="B0001" id="IB8976"> <article:title>The Firm</article:title> <person:author>John Grisham</person:author> <article:price>99</article:price> </book> </library> Choose the correct statement

The XML code fragment is not validated because no DTD document is referenced

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE library[ <!ELEMENT library (book)?> <!ELEMENT book (booktitle, author, price)> <!ELEMENT booktitle (#PCDATA)> <!ELEMENT author (#PCDATA) #REQUIRED> <!ELEMENT price (#PCDATA)> ]> <library> <book> <booktitle>The Firm</booktitle> <author>John Grisham</author> <price>99</price> </book> <book> <booktitle>Coma</booktitle> <author>Robin Cook</author> <price>99.5</price> </book> </library>

The XML document is not validation because the book element is larger than one

Which of the following is true statement about the JavaServer Page life cycle?(Choose one)

The _jspService() method is called from the generated servlets service() method

XML Fragment <tomcat-users> <role rolename="admin"/> <role rolename="manager"/> <role rolename="user"/> <role rolename="tomcat"/> <user username="ide" password="ee1KER95" roles="manager,admin"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="khanhkt" password="trongkhanh" roles="manager,admin"/> <user username="guest" password="123456" roles="username"/> </tomcat-users>The Java code fragment using DOM API Document doc = db.parse(new File(path + "WEB-INF/tomcat-users.xml")); XPathFactory xpf = XPathFactory.newInstance(); XPath xpath = xpf.newXPath(); String exp = "//user[contains(@username, 'a')]"; NodeList node = (NodeList) xpath.evaluate(exp, doc, XPathConstants.NODELIST); Choose the correct statement. Assume that all code and file path are correct

The application can get more than one node

Which is NOT the BEST case to use Enterprise Java Beans? (Choose one)

The applications are small or medium size.

#REQUIRED attributes value means:

The attribute value must be included in the element

What does #REQUIRED attributes mean ?

The attribute value must be included in the element

The abc.xsd fragment <xsd:element name="person" type="personType"/> <xsd:complexType name="personType"> <xsd:sequence> <xsd:element name="firstname" type="xsd:string"/> </xsd:sequence> </xsd:complexType> The cde.xml fragment <person xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://xml.netbeans.org/schema/abc' xsi:schemaLocation='http://xml.netbeans.org/schema/abc abc.xsd'> <firstname>12345</firstname> <lastname>KhanhKT</lastname> </person> Choose the correct statement

The cde.xml is not valid because the parser not determine lastname

A question mark following the name of a child name in the declaration of a parent element means

The child element is optional.

What is the effect of executing the following JSP statement, assuming a class with name Employee exists in classes package. <%@ page import = "classes.Employee" %> <jsp:useBean id="employee" class="classes.Employee" scope="session"/> <jsp:setProperty name="employee" property="*"/>

The code sets the values of all properties of employee bean to matrching parameters in request object

Which of the following is true?

The dropShadow filter does not have a direction attribute.

Which of the following is the proper method to apply the fliph filter to the following H1 element? <H1 ID = "test">This is a test</H1>

The filter cannot be applied to this element.

The <fo:region-before> element.

The line-height attribute.

Which of the following statements are true for <jsp:usebean>. Select the two correct answers.

The id attribute must be defined for <jsp:usebean>. The <jsp:usebean> must include either type or class attribute or both.

Which of the following is true about Data Integrity?

The information/data is not tampered with, in transit from host to client.

Which of the following is true?

The invert filter applies a negative image effect.

What is the effect of the join statement in the following code? var theArray1 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], theArray2 = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]; var value = theArray1.join( " " );

The join method will create a string from the values in theArray1.

Which of the following statement explains about the object relational mapping?

The object relational mapping uses the XML document as a tree of objects

Which of these is true about deployment descriptors. Select the one correct answer

The order of elements in deployment descriptor is not important. The elements can follow any order

Consider the following HTML document. 1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 <HTML> 3 <HEAD> 4 <TITLE>Object Model</TITLE> 5 6 <SCRIPT LANGUAGE = "JavaScript"> 7 function start() 8 {9 alert( pText.innerText );10 pText.innerText = "Thanks for coming.";11 } 12 </SCRIPT>13 14 </HEAD> 15 16 <BODY ONLOAD = start()> 17 18 <P ID = "pText">Welcome to our Web page!</P> 19 20 </BODY> 21 </HTML> Which of the following selections a true statement?

The pText object does not have an innerText attribute.

Consider the following HTML document. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <TITLE>Object Model</TITLE> <SCRIPT LANGUAGE = "JavaScript"> function start() { alert( pText.innerText ); pText.innerText = "Thanks for coming."; } </SCRIPT> </HEAD> <BODY ONLOAD = start()> <P ID = "pText">Welcome to our Web page!</P> </BODY> </HTML> Which of the following selections a true statement?

The pText object does not have an innerText attribute.

A JSP page called test.jsp is passed a parameter name in the URL using http://localhost/Final/test.jsp?name=John. The test.jsp contains the following code.<% String myName=request.getParameter("name");%><% String test= "Welcome " + myName; %><%=test%>What is the output?

The page display "Welcome John"

What is the result of writing the keyword var in a function parameter list?

The parameter following the keyword would become a static variable.

A JSP file that uses a tag library must declare the tag library first. The tag library is defined using the taglib directive - <%= taglib uri="..." prefix="..."%> Which of the following specifies the correct purpose of prefix attribute. Select the one correct answer.

The prefix attribute is used in front of a tagname of a tag defined within the tag library.

Which of the following is true regarding Function procedures?

The procedure can return a value by assigning a value to the Function procedure name.

In CSS, when a style is applied to an element containing other elements inside it

The style is applied to the element and all the other elements contained in it

Which of the following things is unspecified in the following line of code?<!DOCTYPE letter SYSTEM "letter.dtd">

The type of browser you are using.

What will happen when a servlet makes the following call within its doGet() method? getServletContext().setAttribute("userid", userid);

The userid attribute is placed in application scope.

NMTOKENS'

The value is a list of valid XML names.

What is the significance of the second function argument in the following line? window.setInterval( "run()", 100 );

The value sets how often to run the function.

Consider the following script. What is wrong with the following code?<SCRIPT LANGUAGE = "JavaScript">var firstNumber,secondNumber;thirdNumber;thirdNumber =parseInt( window.prompt( "Enter an integer", 0 ) );document.write( thirdNumber );</SCRIPT>

The word var must be placed before thirdNumber in line 4.

Consider and xml document <?xml version="1.0"?> <?xml-stylesheet type="text/css" href=xsampdoc.css ?> <xsampdoc> <greeting>All The Best!</greeting> </xsampdoc> The code for the style sheet xsampdoc is given as: greeting { display:block; font-family:Arial,Helvetica, sans-serif;font-size:32pt; width:30em; color:red; } What will be the output of the above code?

The xml document will be displayed in the tree format

This XML document references an external DTD, so the XML declaration's standalone attribute should be set to "no".

There may also be errors in the external DTD, of course.

Identify the statements which correctly relate to XMLDOMNamedNodeMap Object:

These objects can be accessed by an index.+ It is used to iterate through the attributes for a specific element.

Which of the following statements regarding filters and transitions is false?

They are applied on a client computer at run time by the server.

What does the following statement do?Math.floor( Math.random() * 12 );

This creates a random number from 0 up to but not including 12.

Which of the following statement about Attribute Node in DOM is true?

This node represents the property of an element

Boxes can be overlapped using the z-index property.

True

Which of the following is the purpose of a schema?

To describe and constrain both the structure and data within the XML document

The resolveEntity method of EntityResolver interface allow the application

To resolve external entity

Which of the following are correct. Select the one correct answer

To use the character %> inside a scriptlet, you may use %\> instead.

Select the word to replace ???to make the diagram about messaging domain correct

Topic

A model applied to dynamic documents is known as:

Tree Model

The available document models of DOM are:

Tree Model+Linear Model

Which of the following string functions returns a string that does not contain any leading or trailing space characters?

Trim

A Data Island is a way to hold XML code within an HTML page.

True

A JSP expression is used to insert values directly into the output.

True

A Stream is a series of characters that can be the results of transformation performed by a Java transformer.

True

A child element can be a parent element.

True

A facet is a valid value that can be assigned to an attribute

True

A lot of properties and methods are repeated in each of the DOM objects as they inherit the XMLDOMNode object.

True

A regular expression can be used to specify complex restrictions for the content of an element.

True

All major browsers have support of XML and XSLT.

True

An XML document can be validated against a DTD by calling the validate() method.

True

An XML element can contain other XML elements

True

An XML schema is used to define a complex type.

True

An Xpath expression describes the location of an element or attribute in our XML document

True

An attribute is another name for stating property of an element.

True

An image tag is an example of an EMPTY element.

True

Assigning a style to a tag helps the user agent to interpret the data following specific rules.

True

Besides testing the values of elements, you can also use predicates to check the values of attributes.

True

Both Mozilla and Internet Explorer support W3C's DOM specification.

True

JavaServer Pages (JSP) technology enables you to mix regular, static HTML with dynamically generated content from servlets. You simply write the regular HTML in the normal manner, using familiar Web-page-building tools

True

Length of XML tag is dependent on the processor.

True

Logical structure of data can be interpreted and used in many ways by various applications due to XML tags.

True

Manipulating the XML document through DOM does not require any objects of the document to be created.

True

Message-Driven Bean does not have a home interface, local home interface, remote interface, or a local interface.

True

Message-driven beans do not have any return value.

True

Styles can change without waiting for the page to be reloaded.

True

The 'nextNode' method in the XMLDOMNodeLis Object returns a NULL value if there is no next node.

True

The 'readyState' property in the DOMDocument Object defines several states that specify the current status of the asynchronous download.

True

The 'type' attribute in the <?xml-stylesheet?> processing instruction is the MIME type of style sheet.

True

The 'xml' property always returns a UNICODE string.

True

The CSS Layout can control layout of the box on the screen.

True

The appendChild() appends a node to the end of an XML document.

True

The appendChild() method links a node to the current node.

True

The doc() function retrieves an XML document.

True

The formatting components of XSL are not supported by IE5.

True

The loadXML() method is used when the document is passed as a string.

True

The logical structure of XML can be manipulated by XSL.

True

The processing part in a template in XSL defines the way the styling is to be applied to the child nodes.

True

The properties that characterize transactions are known as ACID properties.

True

The property 'nextSibling' in DOMDocument Object contains the next node of the previous nodes in the parent's child list.

True

The r attribute is required.

True

The src and alt attributes are required.

True

The three parts of a SOAP message are the envelope, header, and body.

True

The value of the CSS styling property can be a color value.

True

The xlink:type attribute is required in every XLink.

True

The xs:enumeration tag is used to define a valid value for an attribute.

True

The xsl:choose element is used for the purpose of selection between the several possibilities.

True

There is NO LIMIT to the number of XPath statements that can be combined into one.

True

To be a servlet, a class should extend HttpServlet and override doGet or doPost, depending on whether the data is being sent by GET or by POST.

True

To get a named node map of an element's attributes, you simply use the element's attributes property.

True

URI may contain characters that are illegal in XML names.

True

WML for handheld devices is written in XML.

True

We can create documents, which can switch styles without submitting the file back to the server.

True

XML declaration is also a processing instruction.

True

XML document must be valid?

True

XML is used for web services.

True

XML parser checks for validity and well-formed ness?

True

XML preserves white spaces

True

XML provides a software and hardware independent way of sharing data.

True

XML vocabulary is used for specifying formatting semantics.

True

XSLT does not physically change an XML document- just how it is displayed.

True

XSLT is used style and transform XML documents.

True

XSLT is used to convert documents written in one XML DTD, into another DTD.

True

Xml property of the XMLDOMNode object is a read only property.

True

Xslt's styles can be applied to XML elements selectively based on the element's attribute value.

True

You can implement the startElement and endElement methods to catch the starting and closing tags of elements

True

You can require a specific value for an attribute by setting the value for fixed.

True

How many different kind of loops are there in JavaScript

Two. The "for" loop and the "while" loop

Point out the wrong statement

Typed XML type and Untyped XML both have XML schema to validate the Data

Which of the following is true regarding VBScript arrays?

VBScript arrays can be dynamically allocated.

The ONERROR event is used to handle all of these except.

User errors.

How can the data source be validated against the associated schema in unmarshalling operation?

Using setSchema method or using setValidating method

Considering a linear model applied to a book the only disadvantage that occurs is that if the book is revised and the page number and line number of the topic changes the model fails to work. Is the statement a valid statement?

Valid

Identify if the following XML document code is valid. <?xml version="1.0"?> <note> <to>Joe</to> <from>John</from> <heading>Reminder</heading> <body>Dont forget me this weekend!</body> </note>

Valid

Using DTD, _________ parser checks for validity.

Validating

How many type of XML parser does?

Validating Parsers and Non-Validating Parsers

$x is an

Variable

The version is specified in ActiveXObject(fiMSXML2.DOMDocument.4.0fl) because

Versions are designed to coexist with previous versions.

XML is a _______ Recommendation

W3C

XSLT

W3C recommends using __________ instead of CSS

Identify the correct statements related to 'createNode method':

When a node is created, it is created in context of the namespace mentioned.

errors

With XML, __________ are not allowed

CSS (Cascading Style Sheets)

With __________ you can add display information to an XML document

Which of the following statements are true in the case of XML?

XML describes its data along with its presentation

Writing an Internal DTD inside a DOCTYPE is known as:

Wrapping

Which is NOT the role of EJB Deployer?

Write the code that calls on components supplied by bean providers

What are some features of XSD

Written in XML , Support data-types

Which of the following statements regarding XLinks are FALSE?

XLinks can be used to connect only two resources

Deployment properties are stored in a _______________________ file.

XML

Schema is an _____ based alternative

XML

Extensible Markup Language

XML (acronyn)

what is the purpose of XML

XML - designed to transport and store data, with focus on what data is

Which contains in XML document's prolog?

XML Declaration or/and Document Type Declaration

XML DOM is:

XML Document Object Model

XSD is:

XML Schema Definition

Elements are the main building blocks of both

XML and HTML documents

SOAP uses ___ and ____

XML and HTTP

An XPath predicate is contained within _________, and comes _______ the parent element of what will be tested.

[ ] , after

What does the value string contain after the following code is executed? var string = "Good luck on the test"; string = string.link("www.deitel.com")

a link to www.deitel.com with the text "Good luck on the test"

raw XML

__________ files can be viewed in all major browsers

metadata, data itself

__________ should be stored as attributes, and the __________ should be stored as elements

Streaming pull parsing refers to a programming model in which _____.

a client application calls methods on an XML parsing library when it needs to interact with an XML infoset

The StAX cursor API represents _______________.

a cursor with which you can walk an XML document from beginning to end.

What will value contain after the following code is executed? var value = new Date(); value = value.valueOf();

a large integer representing the number of milliseconds between midnight January 1, 1970 and the current date

What will value contain after the following code is executed? var value = new Date(); value = value.valueOf(); Choose one answer.

a large integer representing the number of milliseconds between midnight January 1, 1970 and the current date

The 'appendChild()' method of the DOMDocument Object adds:

a new node

XML (definition)

a set of rules for encoding documents in machine-readable form

markup language

a system of symbols (tags) and rules embedded in a document that govern its structure (content) and format (appearance)

The Filter property should be in which of the following formats?

a) ColumnName = FilterText

The CSS specification gives precedence to ________.

a) author styles over user styles

Which of the following lines of code are correct?

b. @Entity public class Employees{... }

<html><body><form action="loginPage.jsp">Login ID:<input type= "text" name="loginID"><br>Password:<input type="password" name="password"><br><input type="submit" value="Login"><input type="reset" value="Reset"></form></body><html> Study the above html code. Assume that user clicks button Reset. What is the correct statement?

a. All inputs are cleared.

Which statements are BEST describe errorPage attribute of <%@ page errorPage=....%> directive?

a. Any exceptions in the current page that are not caught are sent to the error page for processing. The error page implicit object exception references the original exception.

Review the following scenario; then identify which security mechanisms would be important to fulfill the requirement. (Choose one.) An online magazine company wishes to protect part of its website content, to make that part available only to users who pay a monthly subscription. The company wants to keep client, network, and server processing overheads down: Theft of content is unlikely to be an issue, as is abuse of user IDs and passwords through network snooping.

a. Authorization and Authentication

Which statement is true about both stateful and stateless session beans about bean instances?

a. Bean instances are NOT require to survive container crashes

The ________ parses and translates all inbound and outbound messages going to and from a business.

a. BizTalk Server.

Which statement is true about EJB 3.0 stateful session beans and stateless session beans? (Choose one)

a. Both can have multiple remote and local business interfaces

Which is NOT Enterprise Beans?

a. Business Beans

Which of the following task may happen in the translation phase of JSP page? (Choose one)

a. Creation of the servlet class corresponding to the JSP file.

What is the consequence of attempting to access the following JSP page? <question><html><question><body><question><%! <question> public void _jspService(HttpServletRequest request, HttpServletResponse response) {<question> out.write("A");<question> }<question> %><question><% out.write("B"); %><question></body><question></html>

a. Duplicate method compilation error.

Which class type must be implicitly or explicitly denoted in the persistence.xml descriptor as managed persistence classes to be included within a persistence unit?

a. Entity classes

In which of the following Authentication mechanism, the browser transmits the username and password to the server without any encryption? (Choose one)

a. HTTP BASIC Authentication

The Java Persistent API defines the Query interface. Which statement is true about the Query.executeUpdate method ?

a. It must always be executed within a transaction

Which statement is true about the EJB 3.0 stateful session beans?

a. Its conversational state is retained across method invocations and transactions

Which statement is NOT true about JMS?

a. JMS does NOT depend on MOM (Messaging-Oriented Middleware) products

Which statement about JMS is true?

a. JMS supports Publish/Subcribe

Which is the CORRECT statement about JMS?

a. JMS uses JNDI to find destination

Which is NOT associated with the business tier in a JEE (J2EE) web-based application?

a. JSP

A developer wants to achieve the following two behaviors for an EJB 3.0 session bean:(1) If the client calls a business method with a transaction context, the container will invoke the enterprise bean's method in the client's transaction context.(2) If the client calls a business method without a transaction context, the container will throw the javax.ejb.EJBTransactionRequiredException.Which transaction attribute should be used?

a. MANDATORY

Which statement describe about Message-Driven Beans is correct? (Choose one)

a. Message-Driven Beans are stateful

Study the statements:1) The context path contains a special directory called WEB-INF, which contains the deployment descriptor file, web.xml. 2) A client application may directly access resources in WEB-INF or its subdirectories through HTTP.

a. Only statement 1 is true

Study the statements:<question>1) The context path contains a special directory called WEB-INF, which contains the deployment descriptor file, web.xml.<question>2) A client application may directly access resources in WEB-INF or its subdirectories through HTTP.

a. Only statement 1 is true

Which HTTP method is used in FORM based Authentication?

a. POST

Which act as a proxy to an EJB?

a. Remote instance

See the extract from web.xml of web application "mywebapp" on server named myserver, runs on port 8080: <servlet-mapping><servlet-name>ServletA</servlet-name><url-pattern>/</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ServletB</servlet-name><url-pattern>/bservlet.html</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ServletC</servlet-name><url-pattern>*.servletC</url-pattern></servlet-mapping><servlet-mapping><servlet-name>ServletD</servlet-name><url-pattern>/dservlet/*</url-pattern></servlet-mapping>Given that a user enters the following into her browser, which (if any) of the mapped servlets will execute? (Choose one.) http://myserver:8080/mywebapp/Bservlet.html

a. ServletA

Which interface can you use to retrieve a resource that belongs to the current web application?

a. ServletContext

Which interface you CANNOT use to obtain a RequestDispatcher Object?

a. ServletContext

Which of the following statements is true? (Choose one)

a. Session data is shared across multiple webapps in the same webserver/servlet container.

_________________ provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.

a. Session management

Which statements are BEST describe prefix attribute of <%@ taglib prefix=...%>directive of JSP file?

a. Specifies the relative or absolute URI of the tag library descriptor.

XML DOM defines a standard way for

accessing and manipulating XML documents

Which is NOT the main type of JSP constructs that you embed in a page?

actions

You can use the #IMPLIED keyword

address CDATA #IMPLIED

Which has no syntax error?

alert("hello +3+ times");

In a well-formed XML document, there must be one root element that contains

all the others.

Which of the following axes can be used together to reference all the nodes in any XML document ?

ancestor, descendant, self, following, preceding

You can declare elements by using <xsd:element>

and attributes by using <xsd:attribute>

The <fo:root> element can contain both a master set layout

and page sequences.

Notes, working drafts, candidate recommendations

and recommendations

You use the <xsd:restriction> element

and the base attribute.

XML uses

an XML Schema to describe the data

XML Schema

an XML-based alternative to DTD

A procedure for solving a problem in terms of the actions to be executed and the order in which these actions are to be executed is called ________.

an algorithm

The ONBLUR event is associated with ________.

an element losing focus.

www.w3schools.com

an excellent XML tutorial can be found here

Functions are invoked by writing the name of the function, followed by the function's ________ in closed parenthesis.

arguments

Which of the following is the proper method to access the length of the array arr[]?

arr.length

What is the value of num assuming that all 12 elements of array test are initialized to 3? ++test[ 7 ]; var num = test[ 7 ];

b) 4

Which of the following is true regarding the DHTML mask filter:

b) It is used to create images with transparent foregrounds

Which of the following is false

b) Objects do not have the property of information hiding.

Which of the following is true?

b) The TDC handles creating table cells for output

What does the following statement do? Math.floor( Math.random() * 12 );

b) This creates a random number from 0 up to but not including 12.

The keywords Property Let and Property Set are used for ________.

b) accessing Private class variables

Describing an object in terms of behaviors without concern for how those behaviors are actually implemented is called ___

b) data abstraction

_________ are data structures consisting of related data items (sometimes called collections of data items).

arrays

<!ELEMENT trial (targets+, source,title+,message*,#PCDATA)> The above example declares that the element trial must contain:

at least one 'target', exactly one 'source', at least one 'title', zero or one 'message', and some other parsed character data.

An empty complex element cannot have any contents, only

attributes

multiple values, tree structures, expandable

attributes cannot contain __________ or __________ and are not easily __________

How to specify the attributes with multiple values?

attributes cannot have multiple values

Each object has ________ or data and ________ or behavior.

attributes, methods

Local variables have ________ duration.

automatic

Given <?xml version="1.0" encoding="UTF-8"?> <customers> <customer password="khanhkieu"> <username>KhanhKT</username> </customer> <customer password="123456"> <username>Hatruc</username> </customer> </customers> Choose the correct XPath statement that is used to query to get password value of username "Hatruc"

b. //customer[username=Hatruc]/@password

If you want to send an entity object as the pass by value through a remote interface, which of the following statements are valid? (Choose one)

b. @Entity b. public class Employees implements Serializable{b. ...b. }

Which statements are BEST describe isErrorPage attribute of <%@ page isErrorPage=....%> directive?

b. Specifies if the current page is an error page that will be invoked in response to an error on another page. If the attribute value is true, the implicit object exception is created and references the original exception that occurred.

Which statements are BEST describe prefix attribute of <%@ taglib prefix=...%>directive of JSP file?

b. Specifies the required prefix that distinguishes custom tags from built-in tags. The prefix names jsp, jspx, java, javax, servlet, sun and sunw are reserved.

Which is true about JDBC?

b. The JDBC API is included in J2SE

Which statement is correct about the Java Persistence API support for the SQL queries?

b. The result of a SQL query is not limited to entities

Which is true about the relationship "A keyboard has 101 keys"?

b. This is a one-to-may relationship

Which statements are BEST describe page implicit object of jsp file?

b. This java.lang.Object object represents the this reference for the current JSP instance.

Which is NOT provided by the EJB tier in a multitier JEE (J2EE) application?

b. XML Parsing

Which directory is legal location for the deployment descriptor file? Note that all paths are shown as from the root of the web application directory.

b. \WEB-INF

Which of the following XML based markup languages provides a protocol for business transactions on the Internet?

b. cXML.

Given that a servlet has been mapped to /account/. Identity the HttpServletRequest methods that will return the /account segement for the URI: /myapp/account/.

b. getServletPath

Which of the following defines the class name of a tag in a TLD?

b. tag-class

What should be the return type of the method using @PrePassivate?

b. void

Which of the following settings for a background image can be modified to create a "watermark" effect where scrolling will not move the image from its set position.

background-attachment

XML Schema is designed to

be selfdescriptive.

Which of the following deployment descriptor snippets would you use to declare the use of a tag library?

c. <taglib> c. <taglib-uri>http://abc.net/ourlib.tld</taglib-uri>c. <taglib-location>/WEB-INF/ourlib.tld</taglib-location>c. </taglib>

Which is a valid PostConstruct method in a message-driven bean class?

c. @PostConstruct private void init() {}

Which statements are BEST describe taglib directive of JSP file?

c. Allows programmers to include their own new tags in the form of tag libraries. These libraries can be used to encapsulate functionality and simplify the coding of a JSP.

What do you need to create a EJB3 session bean?

c. Annotate the session bean with @Stateful or @Stateless

The requirement for an online shopping application are: It must support millions of customers. The invocations must be transactional. The shopping cart must be persistent. Which technology is required to support these requirements?

c. EJB

Which type of JEE (or J2EE) component is used to store business data persistently?

c. Entity Bean

Post request put form data in the ___ of the HTTP request

body

To construct a relative XPath expression to select every count element that has a book ancestor, you would use the code:

book//count

If you wanted to select every cost element that had a book parent, you would use a relative expression like this:

book/cost

The DTD says there can be at most one <employee> element

but there are two

Which language is used to describe the DTD syntax?

c. Extended Backus-Naur Form

Which statement is true about the use of a persist operation in a transaction of an Entity Beans

c. If a user persists a new entity with an existing primary key the transaction will fail

Which is true about JEE ( or J2EE)?

c. JEE includes servlet APIs and EJB APIs

Which statement describe about JMS is NOT true?

c. JMS use JNDI to locate the destination

EJB 3.0 specifications are first implemented in ________

c. Java EE 5

What would the browser display if the following script was executed? <SCRIPT LANGUAGE = "JavaScript"> for( var i = 0; i < 5; i++ ) document.write("O"); </SCRIPT>

c. OOOOO

Which statements are BEST describe <jsp:getProperty> Action?

c. Sets a property in the specified JavaBean instance. A special feature of this action is automatic matching of request parameters to bean properties of the same name.

Which is NOT represented in a UML class diagram?

c. The interaction between objects in sequential order

Which is NOT a correct statement about entity beans?

c. They are used to implement business processes

Which is NOT true about stateless session beans?

c. They are used to represent data stored in a RDBMS

Which of the following is false

c) The Sort property automatically displays the new order of the data

Which of the following is false?

c) The TDC outputs an interface like Microsoft Excel.

Which of the following is true regarding the following code? MsgBox( "VBScript is fun!", , "Results" )

c) The function should be preceded by the keyword Call

The main difference between the blendTrans filters and the revealTrans filters is _________.

c) The revealTrans filter has more transition effects than the blendTrans filter

Which of the following is true?

c) The shadow filter property can be set to exactly 8 different values

What is the value of s1 after the following code is executed? var s1 = "deitel and associates" s1 = s1.slice( 6 )

c) and associates

The VBScript '+' operator is used for ________.

c) both a and b

What does the value string contain after the following code is executed? var string = "Good luck on the test"; string = string.charAt( 3 );

c) d

The statement on line 1 ________ the array while the statement on line 2 ________ the array. 1 var c; 2 c = new Array( 12 );

c) declares, allocates

The prepackaged functions that belong to JavaScript objects such as Math.pow and Math.round are often called ________.

c) methods

Which of the following methods does the JavaScript Number object not possess?

c) valueOf

Elements with only character data are declared with

c. #PCDATA

How many parameters are there for deleteData() method ? (st art, length)

c. 2

What would the browser display if it executed the following script? <SCRIPT LANGUAGE = "JavaScript"> for ( var count = 1; count <= 10; ++count ) { if ( count == 5 ) break; } document.writeln( count ); </SCRIPT>

c. 5

Consider the following code selections. Assume count is initialized to 7 and num is initialized to 0

c. 7, 0

Which of the following are tags is used to define rules for an element?

c. <!ELEMENT ... (#PCDATA)>

Which of the following constitute valid ways of importing Java classes into JSP page source?

c. <%@ page import="java.util.*" %>

Which of the following is the correct processing instruction that specifies an XSL document (myXSL.xsl) to be used to transform an XML document.

c. <?xml:stylesheet type = "text/xsl" href="myXSL.xsl">

VBScript is ________.

case sensitive like JavaScript

The XPath expression //* selects all elements in

ch09_01.xml

Which of the following abbreviated XPath expressions is equivalent to the following unabbreviated XPath expression ?child::chapter[attribute::number and attribute::title]

chapter[@number and @title]

You can implement the ___________method and extract the text node's text from the character array passed to you, using the starting position in the array. The length of the text is also passed to you.

characters

What is the default axis in XPath ?

child

If we want to select the supplier attribute of it's parent element, chips, our expression would be__________.

chips@supplier

In VBScript, the unit of object-oriented programming is the ________.

class

Which of the following is NOT a valid attribute for a useBean tag?

className

Servlets are deployed in a Servlet ____

container

Which of these is the proper function that stops a windows timer

clearInterval

treaming pull parsing refers to a programming model in which _

client application calls methods on an XML parsing library when it needs to interact with an XML infoset

In the body of a style sheet, CSS rule properties are followed by a ____

colon

The use of namespace in a document can be recognized using a ______ in the tag name.

colon

Entities are variables used to define

common text

To specify how whitespace characters should be handled, we would use the whiteSpace

constraints

With DTD, each of your XML files can carry a ________ of its own format with it.

description

The ____ method is called by the container before the servlet instance is killed

destroy()

___ method is called before servlet process ends

destroy()

Which of the following flowchart symbols indicates that a decision is to be made?

diamond

The VBScript control structures behave ________ to their JavaScript counterparts and the VBScript control structure syntax is ________ the JavaScript syntax.

differently, different than

Which of the following is not a property of the glow filter?

direction

Which of these is not correct about the filter-mapping element of web-app. Select the one correct answer

dispatcher element can be declared zero to three times in the filter-mapping element

Which of the following is a JavaScript reprtition structure?

do/while

Which of the following methods will be invoked if the doStartTag() method of a tag returns Tag.SKIP_BODY?

doEndTag()

What are the two methods that are considered to be the entry point to a servlet

doGet(), doPost()

An XML Schema describes the structure of an XML ____

document

The all collection is a property of the ________ object

document

Which of the following types of nodes can have children ?

document element nodes + root nodes

Which of the following is the proper way to dynamically access the background color from within the script?

document.body.style.backgroundColor

Consider the following HTML document. <HTML> <HEAD><TITLE>Frames collection</TITLE> </HEAD> <FRAMESET ROWS = "100, *"> <FRAME SRC = "top.html" NAME = "first"> <FRAME SRC = "" NAME = "second"> </FRAMESET> </HTML> Which of the following is the proper way to access the frame "second" from the script of an outside document?

document.frames( "second")

What is the correct JavaScript syntax to write "Hello World"?

document.write("Hello World")

Give the content of books.xml file in the picture.To display the title of book, the following javascript is developed: <script language=javascript> function fnLoadXML() { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp = new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp = new ActiveXObject(Microsoft.XMLHTTP); } xmlhttp.open(GET, books.xml, false); xmlhttp.send(); xmlDoc = xmlhttp.responseXML; var arrTitle=xmlDoc.getElementsByTagName(title); for (i=0; i<arrTitle.length; i++) { ??? document.write(<br>); } }</script>

document.write(arrTitle[i].childNodes[0].nodeValue);

An object's methods and attributes are accessed by writing the name of the object followed by the________.

dot operator

The exception-type element specifies an exception type and is used to handle exceptions generated from a servlet. Which element of the deployment descriptor includes the exception-type as a sub-element? Do not include the element in enclosing parenthesis

error-page

Which of these are legal attributes of page directive. Select the two correct answers

errorPage . session

With the ________, scripts can respond to a user moving the mouse, scrolling up or down the screen or entering keystrokes.

event model.

The style of programming in which the user interacts with a GUI component is called ________ programming.

event-driven

A JSP page has the following page directives:<%@page isErrorPage='false' %> <%@page errorPage='/jsp/myerror.jsp' %> Which of the following implicit object is NOT available to the jsp page?

exception

The method used most often for executing SQL statements is ____

executeQuery

A DTD can be declared inline in your XML document, or as an

external reference

Attributes provide _______ about elements.

extra information

A DTD is an XML document

f

A node can have more than one parent nodes

f

A string is a sequence of one or more Unicode characters

f

An XML Schema is an XML-based add-on to DTDs

f

An XSLT processor takes three things as input such as XSLT stylesheet, XML document and Document Type Declaration

f

Are comments processed by the processor?

f

Which of the following statements is correct?

if ( studentGrade >= 60 ) document.write( "Passed" );

How do you write a conditional statement for executing some statements only if "i" is NOT equal to 5?

if (i != 5)

How do you write a conditional statement for executing some statements only if "i" is equal to 5?

if (i==5)

A web application is located in "helloapp" directory. Which directory should it's deployment descriptor be in?

helloapp/WEB-INF

Which one of the following XLink attributes allows you to specify the target of a link?

href

Servlet output is usually ___

html

Which of these represent the correct path for the core JSTL library in JSTL version 1.1? Select the one correct answer

http://java.sun.com/jsp/jstl/core

Which of the following JSP variables are not available within a JSP expression. Select the one correct answer.

httpsession

single quotes, &quot;data&quot;

if an attribute value itself contains double quotes you can use __________ or __________

The attributes you can use in an XML document are: version (required; the XML version), encoding (optional; the character encoding), and standalone (optional; "yes"

if the document does not refer to any external documents or entities, "no" otherwise).

A JSP page uses the java.util.ArrayList class many times. Instead of referring the class by its complete package name each time, we want to just use ArrayList. Which attribute of page directive must be specified to achieve this. Select the one correct answer

import

closing tag

in XML, all elements must have a ____________

other elements, text, attributes, a mix

in XML, an element can contain _________, __________, __________, or __________

not truncated

in XML, the white-space in a document is __________

reserved words

in an XML name there are no __________

The <hiredate> and <name> elements appear

in the wrong order.

Which of the following is example of JSP directive? Select one correct answer.

include

Which of the following are examples of JSP directive. Select the two correct answers.(?)(not checked yet)

include, taglibrary, page

The XML DOM is language and platform

independent

What are the five principal methods to manage the servlets life cycle

init, service, destroy, getServletConfig, getServletInfo

The best way to develop and maintain a large program is to construct it from small, simple pieces called ________.

modules

How do you call a function named "myFunction

myFunction()

Is the text node a direct child of the enclosing element in XPath

n

A JSP file uses a tag as <myTaglib:myTag>. The myTag element here should be defined in the tag library descriptor file in the tag element using which element. Select the one correct answer

name

You can use the #FIXED keyword.

name CDATA #REQUIRED

How do you find the client's browser name?

navigator.appName

If an XML element is of type "xs:date" and contain a string like "Hello World", the element will

not validate

With reference to the snippet of code given below, choose the correct syntax to complete the second line in order to create a XML Document Object var sample sample = ________________________

new ActiveXObject("microsoft.XMLDOM")

Which of these are not the valid XML DOM relationships

nextNode

Are the following element declarations identical ?

no

Can a simple type (from XML Schema ) have attributes

no

Can you define list of lists in XML Schema ?

no

Can you have external entities in an attribute of type CDATA

no

Can you retrict the content of an XML element to take only values from an enumeration list (using DTDs)

no

Can you use the keywords IGNORE and INCLUDE in the internal subset of a DTD

no

Do you have child nodes of type entity references (internal or external) from XPath's perspective

no

Is the DOCTYPE declaration compulsory ?

no

Is the DTD element type "ANY" equivalent with the XML Schema element "anyType" ?

no

Is the following XML Schema definition valid ?

no

Is the following XML instance valid

no

is the following element declaration valid in XML Schema

no

Each attribute, element and text in the XML document represents a

node in the tree

Identify the statements which hold true for CSS:

none

Values used in font-weight are

normal+bolder+lighter

Servlets do ___ have a main() method

not

When using the width, height and overflow properties of an element, position must be ________.

not absolute

The <hiredate> and <name> elements are

not declared in the DTD

templates are been ordered according to their ________ which can be specified with the priority attributte.

priority

A prolog can contain XML declarations, XML comments (which describe the XML document)

processing instructions, whitespace, and doctype declaration(s).

Specifies that the attribute cannot be used?

prohibited

A JavaBeans component has the following field

public void setEnabled( boolean enabled) public booleangetEnabled()

he attribute values are not enclosed in

quotation marks.

XMLDOMCDATASection' is an XML DOM Object that:

quotes or escapes blocks of text so that text is not interpreted as markup language.

In JavaScript, all objects and Arrays are passed to functions by ________.

reference

The TDC method Reset is used for ________.

refreshing the display

We can navigate between nodes with the use of their ________ to each other

relationship

An Entity bean must be capable of forming ____

relationships

CSS positions can be either absolute or ________.

relative

The ____________ interface is a Java interface that enumerates the business methods exposes by the enterprise bean class.

remote

The _______ method is used to remove the attribute node.

removeAttributeNode()

XMLDOMNode' is an XML DOM Object that:

represents the base interface for accessing data in the XML Object model.

Which of the following statement correctly store an object associated with a name at a place where all the servlets/jsps of the same webapp participating in a session can access it? Assume that request, response, name, value etc. are references to objects of appropriate types.(Choose one)

request.getSession().setAttribute(name, value);

The web clients interact with a servlet using a ___/____ pattern

request/response pattern

Two styles of soap binding:

rpc and document style

The _______ of an identifier for a variable or function is the portion of the program in which the identifier can be referenced

scope

How to use external javascript file in a HTML file?

script language="JavaScript" src="filename.js"

The _________ attribute lets you chose specific child elements when working with the xsl:apply-templates element.

select

JSP pages have access to implicit objects that are exposed automatically. Name the implicit object that is of type HttpSession.

session

Name the method defined in the HttpServletResponse class that may be used to set the content type. Select the one correct answer.

setContent

Which of the following JavaScript statements use arrays?

setTimeout("a["+i+"]",1000)

Stylesheet can do have ____ variables with the same name

several

Which of the following is not a border property?

shape

The value a in the following statement is called the ________ and the value b is called the ________. face = Math.floor( a + Math.random() * b );

shifting value, scaling factor

which of the following SAX2 methods is used by a non validating parser to report that an entity reference is not resolved

skippedEntity()

XSL uses XSLT to transform an XML ____________ into an XML _______________.

source tree+result tree

The ________ property of the wave filter determines the wave's amplitude.

strength

The java sort method uses ________ to sort the array passed to it.

string comparison

Normally for enclosing a generic term when defining code we use

square brackets

Which of the following is a legal function call for the function definition provided below? function square( y ) { return y * y;}

square(7+2);

You can use the Attributes object passed to the ___________ method to handle an element's attributes.

startElement

The SAX parser reacts to a new element by using

startElement()

Which of the following functions in SAX parser notifies an XML document handler about the start of an element in an XML document?

startElement()

You can implement the ______________and _____________methods to catch the starting and closing tags of elements.

startElement, endElement

The above line is parsed using a SAX2 parser. What is the sequence of events passed by the parser to the handler ?

startPrefixMapping(),startElement(),endElement(),endPrefixMapping()

You can implement the characters method and extract the text node's text from the character array passed to you, using the

starting position in the array

RESTful WS place a emphasizes on ____ communication

stateless

Script-level variables have ________ duration.

static

Web server responses can be ____ or ____

static or dynamic

When two values are specified for the margin then

the first value is set as the top and bottom margins.

Event bubbling is _______.

the process of child elements passing events to their parent elements.

DTD (document type definition)

the purpose of this is to define the structure of an XML document

A JSP page will not have access to session implicit variable if:

the session attribute of page directive is set to false

&lt;, &gt;, &amp;, &apos;, &quot;

these are the five predefined entity references

attributes

these provide additional information about an element

root element

this element encloses all other elements and is therefore the sole parent of them all

What does a validating parser if it encounters a valid DOCTYPE declaration but it cannot load the associated DTD file because the given URL is wrong ?

this is a fatal error: the parsing will stop immediately;

"/" in the beginning of the XSL declaration indicates that:

this node applies to the root level node of XML document

The do-do methods in a servlet should throws what exception

throws ServletException

Match the xml data against its corresponding data type in XSD schema? <start>05:30:10.5</start>

time

One. You need at least a root element for an XML document

to be well-formed

right click the page, View Source

to view raw XML on a webpage you must __________ and select __________

Which of the following methods does the JavaScript Boolean object not possess?

toInt

Each relationship can be either ___ or __

unidirectional or bidirectional

What would the browser display if this script was executed? <SCRIPT LANGUAGE = "JavaScript"> var c = new Array(8); for( var i = 0; i < 8; i++ ) c[i] = i; document.write(c[8]); </SCRIPT>

undefined

The __________ structure of XML is much more powerful than _________ data formats.

tree-based, fixed-length

The DOM treats the XML document as

tree-structure

A default value is automatically assigned to the attributes when no other value is specified.

true

An XML Schema defines whether an element is empty or can include text.

true

An attribute without a prefix is in default namespace?

true

DOM considers all items present in XML document as node?

true

Each XML document can be represented as a tree structure?

true

For each element type associated with a sequence element, there must be an element in the XML instance in the same order?

true

Is the following statement true or false. URL rewriting may be used when a browser is disabled. In URL encoding the session id is included as part of the URL.

true

SAX makes sequence of call to a handler function?

true

The ContentHandler class provides implementations for the core interface of SAX

true

The item() method of XMLDOMNodeList and XMLDOMNamedNodeMap return the node present at specified index

true

The xsl:attribute do generates the elements in the time of processing.

true

The xsl:element generates the elements in at time of processing.

true

W3C DOM uses both tree and object model concepts:

true

What is the effect of evaluation of following expression? Select the one correct answer. ${'cat' gt 'cap'}

true

XML DOM - defines a standard set of objects for XML documents only

true

XML developer has to ensure the uniqueness of the element names and attributes in a document?

true

XSLT takes two things as input: an XSLT stylesheet and an xml input document

true

Xpath can be thought of as a query language like SQL

true

The xml-stylesheet element has which two attributes?

type & href

What are the four key elements of a wsdl file

types, messages, port type, binding,

Call-by- ________ is the method of passing a copy of the argument's value to a function

value

In JavaScript, numbers and boolean values are passed to functions by ____

value

Which of the following is the proper method to dynamically allocate memory to an array of 100 elements?

var c = new Array( 100 );

You define an array using

var myarray = new Array();

Which of the following is an illegal array initialization statement?

var n = new Array( 5 ); n = [ 10, 20, 30, 40, 50 ];

What is the correct way to write a JavaScript array?

var txt = new Array("tim","shaq","kobe")

Which of the following is not a VBScript sub-type?

variant

The XSLT root element has which two required attributes?

version & xmlns:xsl

The root of the deployment descriptor is named as

web-app

What is the major difference between Servlet 2.5 and Servlet 3.0

web.xml

Which element of the deployment descriptor of a web application includes the welcome-file-list element as a subelement. Select the one correct answer.(?)(not checked yet)

welcome-file

The ONLOAD event fires ________.

whenever an element finishes loading successfully.

What kind of clause is used to specify the filter criteria?

where clause

XML gives you a way of packaging your data, and it's taken off largely because XML documents are text

which has meant that you can send them using the existing Internet framework, as built for HTML.

There are differences between Internet Explorer's DOM and Mozilla's DOM. The most important difference is that how they handle

white-space text nodes

What kind of separator can be used in a list datatype in XML Schema ?

whitespace (" ");

CDATA is text that _____ be parsed by a parser.

will not

To divide the value of the seventh element of array a by 2 and assign the result to the variable x, we would write ________.

x = a[ 6 ] / 2

What would the browser display if the following code is executed in a script? var x = 11, y = 14; if ( x > 13 )if ( y > 13 ) document.writeln( "x and y are > 13" ); else document.writeln( "x is <= 13" );

x is <= 13x

Internal DTD and XML code are stored in a document with the file extension

xml

In the attribute-type the value which is pre-defined is indicated by:

xml;

Namespaces are defined using

xmlns:[prefix] attribute

Use this attribute in the enclosing element

xmlns="http://www.superduperbigco.com/customer_returns"

XML Schema file extension is what

xsd

What schema groups should a group of elements be defined under in order to allow them all to appear in any sequence in a document instance?

xsd:all

Which of the following XML Schema elements can be used to make schemas more readable ?

xsd:annotation xsd:appInfo

Assuming that the xsd prefix is mapped to the namespace URI for XML schema, what is the type

xsd:anyType

The ________ element lets you decide when and where your template elements are used.

xsl:apply-templates

The ________ element generates the markup for an element of the specified name in the output HTML.

xsl:element

The standard for of an XSLT element is:

xsl:element

In XSL, an _____ instruction do contains the template, which is been applied to each node selected with the select attribute

xsl:for-each

The ____ instruction do enables the conditional processing.

xsl:if

The _________ element uses the select attribute to chose elements and obtain their contents.

xsl:value-of

Which top level XSLT element is used to define a variable in a stylesheet or template and to assign it a value

xsl:variable

Value of the local variable is bounded to which element

xsl:when

Which of the following strings are a correct XML name?

xslNewElement

Are XML and DTD comments in the same format

yes

Can you nest DTD conditional sections

yes

Can you nest attribute groups inside other attribute groups

yes

In JavaScript, capital letters are different from lowercase letters

yes

Is it legal to have an element and a complex type with the same name ?

yes


Ensembles d'études connexes

Chapter 2: An agent's perception of riches

View Set

Gross Anatomy 1 (back muscles, week 1, 2, and 3)

View Set

Chapter 65: Management of Patients with Oncologic or Degenerative Neurologic Disorders

View Set

Art 312- cabinets, cut-in boxes, and meter socket enclosures

View Set