xml_prx301_Ha

Ace your homework & exams now with Quizwiz!

# 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>

1 2 3 4 5 6 7 8 9

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

Book.dtd is an internal DTD

# 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

# XSLT is:

Extensible Stylesheet Language Transformation

# Which one of the following is the root element of all XML Schema documents?

Schema

# 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")

# Call-by- ________ is the method of passing a copy of the argument's value to a function

value

# Which of the following is an illegal array initialization statement?

var n = new Array( 5 ); n = [ 10, 20, 30, 40, 50 ];

# Namespaces are defined using

xmlns:[prefix] attribute

# An attribute without a prefix is in default namespace?

true

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

-3

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

0

# 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 result of the statement 17 % 5?

2

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

3

# 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

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

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

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

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

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

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

# What is a correct way of referring to a style sheet called "mystyle.xsl"?

<?xml-stylesheet 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 are valid tags?

<fpt_university>

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

@

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

A document which conforms to the rules of a DTD

# In a DTD, Attributes are declared with an _______ declaration

ATTLIST

# XSLT allows any kind of data to be tranformed into

Boolean

# Schemas can be documented in human readable format by using

Comments

# Builds the document as a in-memory data structures?

DOM

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

DOM

# 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

# 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

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

HTML, XML.

# 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

# Which of the following XML attribute names is invalid?

I am not valid

# 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

# Allow to validate documents that use markup from multiple namespaces?

Namespace support

# ________ is an artificial and informal language that helps programmers develop algorithms.

Pseudocode

# Which of the following are disadvantages of using SAX parsers?

SAX is read-only

# You create a SAX parser by using the ________________object.

SAXParserFactory

# Which of the following is not an extension of XML?

SGML.

# SGML stand for

Standard Generalization Markup Language

# The property 'nextSibling' in DOMDocument Object contains the next node of the previous nodes in the parent's child list.

T

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

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

# Which statements are true?

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

# #REQUIRED attributes value means:

The attribute value must be included in the element

# 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.

# 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

# 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 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? 1 <SCRIPT LANGUAGE = "JavaScript"> 2 var firstNumber, 3 secondNumber; 4 thirdNumber; 5 6 thirdNumber = 7 parseInt( window.prompt( "Enter an integer", 0 ) ); 8 document.write( thirdNumber ); 9 </SCRIPT>

The word var must be placed before thirdNumber in line 4.

# Which of the following statement about Attribute Node in DOM is true?

This node represents the property of an element

# Which of the following is the purpose of a schema?

To describe and constrain both the structure and data within the XML document

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

Valid Document

# XML is a _______ Recommendation

W3C

# XML DOM is:

XML Document Object Model

# Represents a collection of attribute nodes

XMLDOMNamedNodeMap

# 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

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

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

# The StAX cursor API represents

a cursor with which you can walk an XML document from beginning to end.

# The StAX cursor API represents _______________.

a cursor with which you can walk an XML document from beginning to end.

# 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

# Functions are invoked by writing the name of the function, followed by the function's ________ in closed parenthesis.

arguments

# Each object has ________ or data and ________ or behavior.

attributes, methods

# 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 xsl:template is used to

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

# Which of the following flowchart symbols indicates that a decision is to be made?

diamond

# In schema, the ALL element requires that

each element in the group must occur at most once

# The question mark (?) operator indicates

either zero or one occurrence

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

false

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

false

# Characters like ">" and "&" can be used in PCDATA sections?

false

# Document Object Model is platform-dependent?

false

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

false

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

false

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

he single statement that completely represents the program

# What is NOT true about StAX?

it is a "push" parser

# The best way to develop and maintain a large program is to construct it from small, simple pieces called ________.

modules

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

parameters

# Restricts string types using regular expressions?

pattern

# In JavaScript, all objects and Arrays are passed to functions by ________.

reference

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

sentinel

# Which of the following is not a JavaScript keyword?

sub

# Match the xml data againts its corresponding data type in Schema? <start>05:30:10.5</start>

time

# Which of the following methods does the JavaScript Boolean object not possess?

toInt

# The DOM treats the XML document as

tree-structure

# DOM considers all items present in XML document as node?

true

# Each XML document can be represented as a tree structure?

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

# XML parser checks for validity and well formed ness?

true

# 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

# In XSL, an _____ instruction do contains the template, which is been applied to each node selected with the select attribute

xsl:for-each


Related study sets

Chp 7 (PQ): Cellular Respiration & Fermentation

View Set

AP U.S History Colliding Cultures

View Set

Chapter 13 Return, Risk, and the Security Market Line

View Set

OSU CS361 Software Engineering I

View Set