XML - Random 500 part 1

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

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

anyType

# Which of the following is a JavaScript reprtition structure?

do/while

# An XML Schema describes the structure of an XML _______

document

# Which of the following is the proper way to dynamically access the background color from within the script?

document.body.style.backgroundColor

# A DTD can be declared inline in your XML document, or as an

external reference

# See the snipset below and choose one answer

-2

# How many parameters are there for deleteData() method ?

2

How many parameters we need to declare in startElement() method of SAX?

4

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

:3:3:5: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]>

# Which of the following are valid tags?

<fpt_university>

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

<script src="xxx.js">

# Syntax for a typical template element is:

<xsl:template match = "myElement">

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

=

# What does the srcElement event property contain

A reference to the element that fired the event

# IN CSS styling property value may be

All of the above

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

Attribute may occur once and have any value

# SAX is

D. An XML parser

# Which purpose is the schema declaration used to in XML file?

Determine instance namespace applying to XML document

# The DOCTYPE statement represents the DTD which is termed as

Document Type Declaration

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

EntityResolver

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

Equals sign

# All XML markup tags must have an attribute.

False

# XML is

Free and Extensible

# Which of the following XML attribute names is invalid?

I am not valid

# _______ can validate your XML against a DTD

Internet Explorer 5.0

# Which one is most appropriate to parse large document?

SAX

# An attribute contains a

Name/value pair

# Is the following attribute valid? <!ATTLIST Test4 an_attribute ID #FIXED "value">

No

# S{margin-right:-3cm;} Is the above statement valid?

No

# In CSS, identification of a selector context is done by using a:

Period

# What is this: ?

References a shared DTD

# Which of these characters cannot be used as entity references in XML

S

# In order to format an XML document we combine it with a

Style sheet

# XSL consists of three parts. Which are| a. XSLT, Xpath, XSL-FO

T

# Identify the correct statements:

Tags from multiple namespaces can be mixed. + XSL uses the prefix 'xsl:' for elements in the XSL namespace

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

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

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

# 'NMTOKENS'

The value is a list of valid XML names.

# Which of the following statements regarding filters and transitions is false?

They are applied on a client computer at run time by the server.

# We can create documents, which can switch styles without submitting the file back to the server.

True

# 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

# XML is the mother of

WAP and WML

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

Well formed Document

# The 'standalone' attribute can be set to

Yes/No

The StAX cursor API represents _________________

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

# The Filter property should be in which of the following formats?

a) ColumnName = FilterText

# Which has no syntax error?

alert("hello +3+ times");

# With an extensible Schema definition you cannot:

all

# Identifiers which have static duration ________.

are globally accessible to the script

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

attributes, methods

# CDATA means

b. character data

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

c. SGML.

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

copy-of

# You can also use a DTD to verify your own

data

# Which of these axes which are used in XSL?

grand-parent

In JAXB, to get a pretty format for an XML document, which of the following statement is used to get the requirement?

marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true );

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

modes

# How do you call a function named "myFunction

myFunction()

# Can you define list of lists in XML Schema ?

n

# Are the following element declarations identical ?

no

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

p {font-weight:bold;}

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

parameters

# 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

# 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

# templates are been ordered according to their ________ which can be specified with the priority attributte.

priority

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

pseudocode

# 'XMLDOMCDATASection' is an XML DOM Object that:

quotes or escapes blocks of text so that text is not interpreted as markup language.

# We can navigate between nodes with the use of their ________ to each other.

relationship

# The ______ method can be used to remove the specified node

removeChild()

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

removed from

# 'XMLDOMNode' is an XML DOM Object that:

represents the base interface for accessing data in the XML Object model.

# avaScript lines end with what?

semicolon

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

sequential execution

# Which of the following functions in SAX parser notifies an XML document handler about the start of an element in an XML document?

startElement()

# Element content cannot have attributes

t

# Text style sheets use which of the following MIME types

text/css

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

the document is not loaded

# When two values are specified for the margin then

the first value is set as the top and bottom margins.

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

toInt

# The __________ structure of XML is much more powerful than _________ data formats.

tree-based, fixed-length

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

true

# 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

# Namespaces are defined using

xmlns:[prefix] attribute

# ________ is a technology that allows a server-side script to create dynamic content that is sent to the client's browser

ASP

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

ATTLIST

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

ATTLIST

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

# ___ exists outside the content of a document

An external DTD

# What does the xsl:apply-imports for?

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

# 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

# Select the flawless tags used to create a margin :

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

# ________ allow you to specify the style of your page elements (spacing, margins, etc.) separately from the structure of your document

Cascading Style Sheets

# Method characters() of ContentHandler interface receives events for

Character data

Method characters() of ContentHandler interface receives events for ___________

Character data

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

See the figure and choose the right answer about SAX, DOM, StAX comparison.

Blank A: Yes ; Blank B: Yes

# 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

# XSLT allows any kind of data to be tranformed into

Boolean

# Identify the correct statements:

Both are correct

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

# Which one is used to declare an entity in DTD?

!ENTITY AUTHOR "Nguyen Ngoc Anh"

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

!important

# 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

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

# The ONERROR event is used to handle all of these except

(a) User errors.

# ________ fires when the right mouse button is clicked.

(b) ONCONTEXTMENU

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

(b) ONMOUSEOVER

# 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

(c) 5

# The ONBLUR event is associated with ________

(d) an element losing focus.

# The ONLOAD event fires ________.

(d) whenever an element finishes loading successfully

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

-3

# Identify the operator used to search across any number of levels of the hierarchy from the current context.

.//

# External style sheets are saved with the ________ extension.

.css

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

//

# XML Schema became a W3C Recommendation

02. May 2001

# 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 is the value of num after the following statement is performed? num = Math.round( 2.45 );

2

# How many parameters are there for replaceData() method ?

3

# The DOM is separated into how many different parts?

3

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

3

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

3 dap an con lai ko co #required

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

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

# 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

# Which syntax is used to insert comments into an XML document

<!-This is a comment->

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

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

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

# Which is not a correct name for an XML documents

<1dollar>

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

<?xml version="1.0"?>

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

<P CLASS = "blue">

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

<PRE></PRE>

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

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

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

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

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

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

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

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

@

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

# What is address, phone in the declaration ?

A group

# Selectors helping us to differentiate between different occurrences of a tag are termed as

Contextual Selectors

# A constructor

Converts information contained in an XML document to another data type

# Unlike most other markup languages, including HTML, XML allows you to do what?

Create new tags

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

DOM

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

DOM

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

DSO's

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

DTDHandler

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

DTDHandler

# Which of the following statement about SAX is false?

Data parsing can be controlled through SAX

# Implements the method of ErrorHandler, EntityResolver, DTDHandler

DefaultHandler

# DTD is:

Document Type Definition

# To describe data XML uses a _________

Document Type Definition

# <!ELEMENT A((B,C)|D|E)> Identify what the statement indicates

Element A consists D or E or B followed by C.

# 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

# Actions that can be detected by JavaScript are called?

Events

# What is XML?

Extensible Markup Language

# The element is used to

Extract text from the source document

# The ________ attribute of the ________ element specifies another element that is identified by its ________ attribute.

FOR, SCRIPT, ID.

# #REQUIRED specifies that an element is required in all XML documents that use the DTD.

False

# ANY indicates that an element can contain only one child element of character data.

False

# Child elements declared in a sequence need not appear in the document in the same sequence.

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

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

False

# The element contains only XSL elements.

False

# The width attribute has a default value of 1.

False

# XML elements cannot be empty.

False

# You cannot set valid options when declaring an attribute.

False

Choose whether the statement is true or false. Compare to DOM approach, SAX can support to access to a random note in XML file

False

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

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

# The entities that are used only in DTDs are referred to as

General entities

# It is usually advisable to keep as much JavaScript as possible in which section?

Head

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

# 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

# Is the following code for commenting in XML valid? <!-- Comment1 <!-- Comment2 --> -->

Invalid

# 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

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

# XSL does not provide support for:

It provides support for all the options stated.

# 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

# What is the significance of the line? LI EM { color: red; font-weight: bold }

It will apply the specified style to text enclosed by the EM tags which are within LI tags.

# What makes XML more powerful than HTML?

Its ability to adapt to new uses

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

Last

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

Modes

# you have an attribute of enumerated type. What are the valid values for it ?

NameChar

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

Namespace support

# (eval|eval|___) the following value indicates that

None of the above.

# Which syntax is used to declare the attribute of an element in DTD?

None of the others

# 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

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

# 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 type of specific exception can appear when using SAX to process XML file? Choose the most correct answer.

SAXException

# XML is a subset of

SGML

# ________ is a very powerful language and the mother of all markup languages.

SGML

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

Schema

# How many components do the JAXB Architecture provide

Schema compiler, Schema generator, Binding runtime framework

# Document Structure is determined by

Structural Markup

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

The DTD contains zero to many of this element

# 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

# #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 Choose one answer.

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.

# Given the dtd file: <?xml version="1.0" encoding="UTF-8"?> <!ELEMENT FINALs (CLASS1|CLASS2)+> <!ELEMENT CLASS1 (#PCDATA)> <!ATTLIST CLASS1 count CDATA #REQUIRED> <!ELEMENT CLASS2 (#PCDATA)> <!ATTLIST CLASS2 count CDATA #REQUIRED> Choose the correct statement

The dtd file is valid

# 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

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

# 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

# The resolveEntity method of EntityResolver interface allow the application

To resolve external entity

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

True

# A child element can be a parent element.

True

# A facet is a valid value that can be assigned to an attribute

True

# An XML schema is used to define a complex type.

True

# Attribute values must always be enclosed by double quotes.

True

# Boxes can be overlapped using the z-index property.

True

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

True

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

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

# 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

# Styles can change without waiting for the page to be reloaded.

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 value of the CSS styling property can be a color value.

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

# XML vocabulary is used for specifying formatting semantics.

True

# XSLT is used to convert documents written in one XML DTD, into another DTD.

True

# You can repeat lines of code within the XSL stylesheet by defining an applytemplate.

True

XSLT takes two things as input: an XSLT stylesheet and an XML input document

True

# How many different kind of loops are there in JavaScript

Two. The "for" loop and the "while" loop

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

Valid Document

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

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

WSDL

# Elements are the main building blocks of both

XML and HTML documents

# Which of the following statements are true in the case of XML?

XML describes its data along with its presentation

# Which statement is used to describe about multi-pipeline?

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

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

XMLDOMNodeList object

# Instructions for transforming an XML document are contained in the

XSL stylesheet

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

# The 'appendChild()' method of the DOMDocument Object adds:

a new node

# What does the value string contain after the following code is executed? var string = "Good luck on the test"; string = string.split( " " );

a) Good luck on the test

# What is the significance of the following CSS rule? LI, EM { color: red;c font-weight: bold }

a) It will apply the specified style to text enclosed by either LI or EM tags.

# What is wrong with the following VBScript code? 1 If (s = t) Then 2 u = s + t 3 ElseIf (s > t) Then 4 u = r 5 Else 6 u = n 7 End If

a) Nothing

# Identifiers which have static duration ________.

a) are globally accessible to the script

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

a) divide and conquer

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

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

# Initializing an array directly involves using the ________ control structure.

a) for loop

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

a) parameters

# The third parameter in the addPoint method ________.

a) sets the height of the point source

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

a) table element

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

a) undefined

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

a. 7

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

a. <!DOCTYPE root-element SYSTEM "filename">

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

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

# An element declaration has the following syntax

a. <!ELEMENT element-name category>

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

a. ATTLIST

# SOAP stands for

a. Simple Object Access Protocol

# XML DOM is:

a. XML Document Object Model

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

a. XML-based Stylesheet Language

# Which DOMDocument method is used to create a new attribute?

a. createAttribute

# The _____ method creates the new element node

a. createElement()

# Which of these are not supported by XML Schema

a. defines which files are child elements

# XSL ________ how the XML document should be displayed

a. describes

# A DTD can be declared inline in your XML document, or as an

a. external reference

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

a. getAttribute()

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

a. getElementsByTagname()

# The XML DOM is language- and platform

a. independent

# Each attribute,element and text in the XML document represents a

a. node in the tree

# The ______ method can be used to remove the specified node.

a. removeChild()

# The DOM treats the XML document as

a. tree-structure

# XML DOM defines a standard way for

accessing and manipulating XML documents

# 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

# Property documentElement of DOMDocument object return _____.

an object representing the root element if the XML document

# The VBScript ________ function has the same purpose as JavaScript's window.prompt method

b) InputBox

# Which of the following is true regarding the DHTML mask filter:

b) It is used to create images with transparent foregrounds

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

b) The pText object does not have an innerText attribute

# Which of the following string functions returns a string that does not contain any leading or trailing space characters

b) Trim

# The keywords Property Let and Property Set are used for ________.

b) accessing Private class variables

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

b) linear search, bubble sort

# 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

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

b) onetwo

# The last parameter in the addPoint method ________.

b) sets the strength percentage

# The value a in the following statement is called the ________ and the value b is called the ________. face = Math.floor( a + Math.random() * b );

b) shifting value, scaling factor

# The VBScript '&' operator is used for ________.

b) string concatenation

# The JavaScript keyword this always refers to ______

b) the element in which the statement resides

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

b. 27

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

b. Nested building blocks

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

b. None of the others

# elements are the main building blocks of both

b. XML and HTML documents

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

b. default

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

b. parentheses, subtraction, modulus

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

b. sentinel controlled

# 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

# Which of the following is true regarding Function procedures

c) The procedure can return a value by assigning a value to the Function procedure name

# What is the value of s1 after the following code is executed? var s1 = "deitel and associates" s1 = s1.slice( 6 )

c) and associates

# Which of the following is the proper method to access the length of the array arr[]?

c) arr.length

# _________ are data structures consisting of related data items (sometimes called collections of data items)

c) arrays

# 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

# Which of the following is not a property of the wave filter?

c) direction

# An object's methods and attributes are accessed by writing the name of the object followed by the ________.

c) dot operator

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

c) duration

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

c) fromCharCode

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

c) interpreter

# The outermost layer of the box model is the ___

c) margin

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

c) phase

# 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

c) position number

# The TDC method Reset is used for _____

c) refreshing the display

# Which of the following is not a border property

c) shape

# Which of the following is not a VBScript sub-typ

c) variant

# To divide the value of the seventh element of array a by 2 and assign the result to the variable x, we would write ________.

c) x = a[ 6 ] / 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

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

# Which of the following is not a JavaScript keyword

c. sub

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

c. value

In JSP when using XSLT to transform, which of the following attribute of <import> statement is used for processing Vietnamese characters?

charEncoding

# CDATA means:

character data

# 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

# To specify how whitespace characters should be handled, we would use the whiteSpace

constraints

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

count

# 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

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

d) ( add, direction, strength) All of these are properties of the blur filter.

# What does the following CSS rule do? .note { font-size: 1.5em }

d) It multiplies all text object font sizes with CLASS = "note" by 1.5

# What does the ScriptEngine function do?

d) It returns the type script being used

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

d) The filter cannot be applied to this element.

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

d) The local variable will "hide" the global variable

# Which VBScript function returns an integer indicating the variant subtype?

d) VarType

# The chroma filter is used to ________.

d) apply transparency effects dynamically

# 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

d) background-attachment

# The first two parameters in the addPoint method ________.

d) sets the point source of the light

# The ________ property of the wave filter determines the wave's amplitude

d) strength

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

d. 60

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

d. DATASRC

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

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

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

d. truncate the floating-point part

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

datatype=finumberfl

# Which of the following is the proper way to dynamically access the border width from within the script?

document.body.style.borderWidth

What does XSLT stands for?

eXtensible Stylesheet Language Transformations

# 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

# Which of these are not kinds of complex elements?

elements that contain only numbers

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

enumeration

# #REQUIRED specifies that an element is required in all XML documents that use the DTD.

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 default namespace is used by an element and its child elements if the element has a namespace prefix

f

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

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

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

f

# CSS uses complex elements to format the documents

f

# DTD checks for the structure and content of the XML document

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 is platform-dependent?

f

# Element content means a complex type element that contains only elements

f

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

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

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

f

# SAX parser has high memory consumption

f

# Simple selectors match occurrence of an element based on a condition

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 same version of a DOM parser must be used on all computers.

f

# XML describes its data along with its presentation

f

# XML is transformed only via XSLT

f

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

f

# XML tags are predefined

f

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

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

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

false

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

false

# Document Object Model is platform-dependent?

false

# SAX support random access:

false

# The default value for the minOccurs attribute in Schema is 0

false

# Tree model is applied to static documents?

false

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

freq

# 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

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

he result would be a JavaScript runtime error

# Which one of the following XLink attributes allows you to specify the target of a link?

href

# 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

# 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

# Can a simple type (from XML Schema ) have children

no

# Can you use the keywords IGNORE and INCLUDE in the internal subset of a DTD

no

# Is the DOCTYPE declaration compulsory ?

no

# Is the DOCTYPE declaration compulsory?

no

# Is the following attribute valid? <!ATTLIST Test4 an_attribute ID #FIXED "value">

no

# Identify the statements which hold true for CSS:

none

# If an XML element is of type "xs:date" and contain a string like "Hello World", the element will

not validate

# 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

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

parent.frames( " second" )

# PCDATA means:

parsed character data

# 'XMLDOMNamedNodeMap' is an XML DOM Object that:

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

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

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

t

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

t

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

t

# A default value is automatically assigned to the attributes when no other value is specified.

t

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

t

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

t

# An XML Schema defines whether an element is empty or can include text

t

# An attribute without a prefix is in default namespace

t

# Both Mozilla and Internet Explorer support W3C's DOM specification.

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

# Document object is the only object that is created.

t

# Element content cannot have attributes.

t

# For each element type associated with a sequence element, there must be an element in the XML instance in the same order

t

# For each element type associated with a sequence element, there must be an element in the XML instance in the same order?

t

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

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 an element has attributes, it is considered to be of complex types

t

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

t

# It is possible to have a property with multiple values

t

# SAX includes functions that are not supported by DOM.

t

# SAX is developed by XML-DEV mailing list

t

# SAX makes sequences of call to a handler function

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

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

# The xsl:choose element is used for the purpose of selection between the several possibilities

t

# XML DOM - defines a standard set of objects for XML documents only.

t

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

t

# XML document is edited by keeping DTD in mind

t

# XML document must be valid?

t

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

t

# XML tags are case sensitive

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

# 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

t

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

t

# the appendChild() appends a node to the end of an XML document.

t

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

t

# "/" in the beginning of the XSL declaration indicates that:

this node applies to the root level node of XML document

# A default value is automatically assigned to the attributes when no other value is specified.

true

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

true

# The ContentHandler class provides implementations for the core interface of SAX:

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

# XML parser checks for validity and well formed ness?

true

# Which of the following is the proper method to dynamically allocate memory to an array of 100 elements?

var c = new Array( 100 );

# What is the correct way to write a JavaScript array?

var txt = new Array("tim","shaq","kobe")

# What kind of clause is used to specify the filter criteria?

where clause

# 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

# CDATA is text that _____ be parsed by a parser.

will not

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

xsl:for-each

# Which top level XSLT element is used to define a variable in a stylesheet or template and to assign it a value

xsl:variable

# Are XML and DTD comments in the same format

y

# Can you nest DTD conditional sections

y

# 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


Kaugnay na mga set ng pag-aaral

STANDARD 7-1.3 Summarize the policy of mercantilism as a way of building a nation's wealth, including government policies to control trade.

View Set

Geometric Transformations Unit Test Review

View Set

Chapter 43: Caring Clients with Ear Disorders

View Set

4.4 - The French Revolution (1789 - 1799)

View Set

Chapter 10- The Endocrine System

View Set

chapter 16 foot, ankle & lower leg

View Set

small intestine المعي الدقيق "الأمعاء الدقيقة"

View Set