An XML document has a root element named <folder>. The DTD for this document is stored in an External file called folder.dtd. How will you declare this external DTD in the XML document?
<!DOCTYPE folder EXTERNAL "folder.dtd"> 0.0%
<!DOCTYPE folder SYSTEM ["folder.dtd"]> 0.0%
<!DOCTYPE folder SYSTEM "folder.dtd"> 50.0%
The DTD must be stored in the same file as the XML document 50.0%
CDATA sections provide a way to tell the parser that there is no markup in the characters contained by the CDATA section. Which of the following is the correct syntax for CDATA?
<CDATA(applications with XML using <, >,)> 0.0%
<[CDATA[applications with XML using <, >,]]> 0.0%
<![CDATA[applications with XML using <, >,]]> 100.0%
<(CDATA(applications with XML using <, >,))> 0.0%
Choose the correct DTD Element definition:
<ELEMENT country (#PCDATA)> 0.0%
<!ELEMENT country (#PCDATA)> 100.0%
<!ELEMENT country #PCDATA> 0.0%
<ELEMENT country #PCDATA> 0.0%
<!ELEMENT country (PCDATA)> 0.0%
Comments describe statements in a better way. What is the correct syntax of comments in XML?
Begin with /* and end with a */ 0.0%
Begin with <!-- and end with --> 100.0%
Begin and end with // 0.0%
None of the above 0.0%
How is an entity used within an XML document?
%entity-name% 0.0%
<!--entity-name--> 50.0%
&entity-name; 50.0%
<entity-name/> 0.0%
How is an External Unparsed General entity defined in a DTD?
<!ENTITY entity-name EXTERNAL "file-name" NDATA notation-name> 0.0%
<!ENTITY entity-name SYSTEM "file-name" > 0.0%
<!ENTITY entity-name SYSTEM "file-name" notation-name> 0.0%
<!ENTITY entity-name SYSTEM "file-name" NDATA notation-name> 100.0%
Is the following statement correct? Inner tags in XML must be closed first.
Is the following statement correct? You can use XSL Transformations (XSLT) to merge simple regular XML data with an HTML template for display.
Read the following statements carefully. 1. <xsl:for-each select="portfolio/stock"> 2. <TR> 3. <TD><xsl:value-of "symbol"/></TD> 4. </TR> 5. </xsl:for-each> Which statement is i...
1 0.0%
2 0.0%
3 100.0%
4 0.0%
Select the appropriate statement to find all books that have an excerpt and a title.
book(excerpt)(title) 0.0%
book[excerpt][title] 100.0%
book[excerpt/title] 0.0%
None of the above 0.0%
Select the appropriate statement to find all bookstores where the value of the specialty attribute is equal to "textbooks".
/bookstore[@specialty = "textbooks"] 100.0%
/bookstore[specialty = "textbooks"] 0.0%
/bookstore[@specialty = textbooks] 0.0%
/bookstore(@specialty = "textbooks") 0.0%
Select the correct XML from following options.
<Customer><ID></ID><Customer><Customer><Name></Name></Customer> 0.0%
<Customer><ID><Name></Customer><Customer><ID><Name></Customer> 0.0%
<Customers><Customer><ID></ID><Customer><Customer><Name></Name></Customer></Customer></Customer></Customers> 50.0%
<Customers><Customer><ID><Name>></Customer><Customer><ID><Name></Customer></Customers> 50.0%
State whether the following statement is correct? Attributes must have both a name and a value.
State whether the following statement is correct? Conditional templates are output only if certain conditions exist within the source document.
State whether the following statement is correct? Inline schema is useful when it is inconvenient to physically separate the schema and the instance.
State whether the following statement is correct? XPath can be used directly from the Document Object Model (DOM).
What are the possible values for the actuate attribute of an XLink?
onLoad 50.0%
onClick 0.0%
onRequest 50.0%
onDisplay 0.0%
What are the possible values for the show attribute of an XLink?
new 0.0%
embed 0.0%
replace 0.0%
All of the above 100.0%
What are the relative advantages of Schemas over DTDs?
XML Schemas support data types 0.0%
XML Schemas support namespaces 0.0%
XML Schemas are written in XML 0.0%
All of the above 100.0%
What are the requirements for an Extended XLink element?
You must specify at least two locators and two arcs 0.0%
You must specify at least two locators and one arc 100.0%
You must specify at least one locator and one arc 0.0%
You must specify at least one locator and two arcs 0.0%
What are XML Namespaces used for?
They are used to associate an External DTD with an XML document 0.0%
They prevent element naming conflicts when more than one XML vocabulary is being used in an XML document 100.0%
They are used to improve the readability of XML documents by assigning a meaningful prefix to element names 0.0%
They do not have any purpose right now, but future XML standards will use them in the same way that DTDs are used 0.0%
What does depth method of DOM do?
Returns the depth of attributes 100.0%
Creates the number of attributes as per passed parameters 0.0%
Creates the number of nodes as per passed parameter 0.0%
Returns the depth within the document tree where the specified node appears 0.0%
What does the following DTD imply? <!DOCTYPE messagelist [ <!ELEMENT messagelist(message*)> <!ELEMENT message(sender?,receiver,subject,body,attachment+)> <!ELEMENT sender (#PCDATA)> <!ELEM...
The sender element cannot be empty 0.0%
There need not be any attachments 100.0%
There will be only one message within the messagelist element 0.0%
There must be one or more attachments 0.0%
What does the following DTD imply? <!DOCTYPE messagelist [ <!ELEMENT messagelist(message*)> <!ELEMENT message(sender*,receiver,body+)> <!ELEMENT sender (#PCDATA)> <!ELEMENT receiver (#PCDA...
The sender element cannot be empty 0%
There cannot be more than one body element 0%
The subject and attachments element can appear in any sequence and can be repeated more than once 0%
There must be at least one message element 0%
What does the following XPath expression represent? /addressbook/*/phone
The phone element which is two levels below the addressbook element 0.0%
The phone attribute which is two levels below the addressbook element 0.0%
The phone attribute which is immediately below the addressbook element 0.0%
This is an incorrect expression 100.0%
What does the following XPath expression represent? /addressbook//phone
All phone elements that are at the next level from the addressbook element 0.0%
All phone elements that are present beneath the addessbook element (at any level) 100.0%
All phone elements that are two levels below the addressbook element 0.0%
This is an incorrect expression 0.0%
What does the following XPath expression represent? /addressbook/address
All addresses within the addressbook element 100.0%
The first address within the addressbook element 0.0%
The last address within the addressbook element 0.0%
All addresses within the addressbook element and their sub children 0.0%
What does the following XPath expression represent? /addressbook/address[@id='1']
The address having an id attribute with a value of 1 100.0%
The id attribute of the address with an id of 1 0.0%
The address having a child element named id with a value of 1 0.0%
The address having an attribute named @id with a value of 1 0.0%
What is an ENTITY attribute type?
It can contain the name of any External Unparsed entity 100.0%
It can contain the name of any External Unparsed entity or Internal Unparsed entity 0.0%
It can contain the name of any External Parsed entity or Internal Parsed entity 0.0%
It can contain the name of any Parameter entity 0.0%
What is an ID attribute type?
It is the same as a CDATA attribute 0.0%
It can only contain numbers and it must contain unique values 100.0%
It can only contain letters and it must contain unique values 0.0%
It can contain letters and numbers and it must contain unique values 0.0%
What is an IDREFS attribute type?
It is the same as an ID attribute 0.0%
It is the same as an IDREF attribute 0.0%
It can contain letters and numbers and it must contain unique values 100.0%
Its value must match the value of one or more ID attributes separated by whitespace 0.0%
What is an NMTOKEN attribute type?
It is the same as a CDATA attribute 0.0%
It can only contain letters and digits 0.0%
It can only contain letters and digits, hyphens, colons and a few other characters 0.0%
It can only contain letters and digits, hyphens, colons and a few other characters including spaces 100.0%
What is the correct value of order attribute for sorting the string in ascending order?
ASC 0.0%
ascend 0.0%
ascending 100.0%
ascendingorder 0.0%
What is the difference between General entities and Parameter Entities?
They are the same 0.0%
There is no such thing as a Parameter entity 0.0%
Parameter entities are used within DTDs and General entities are used within XML documents 100.0%
General entities are the predefined entities such as <, > etc whereas Parameter entities are user defined 0.0%
What is the purpose of XPointer?
It has the same purpose as an HTML link 0.0%
It has the same purpose as an Extended XLink 0.0%
It is used when you want a link to point to a particular part of an XML document 100.0%
It has the same purpose as a Simple XLink 0.0%
What is the Root element of an XSL file?
The stylesheet element 100.0%
The template element 0.0%
The html element 0.0%
Any XSL element can be the Root element 0.0%
What is wrong with this XML code? 1 <?xml version="1.0"?> 2 <folder dt="1/1/2000"> 3 <file id="1" > 4 <name>Accounts Reports</name> 5 <contents /> 6 <!-- Note: This file does n...
the version declaration is incorrect 0.0%
it doesn't have a root element 100.0%
an attribute named id cannot be used because id is a reserved word 0.0%
the comments are incorrect 0.0%
there is nothing wrong 0.0%
What is XML DOM used for?
Writing DTDs 0.0%
Writing Schemas 0.0%
Programmatically accessing the elements within an XML file 100.0%
Parse the XML Data 0.0%
When are you likely to use an XML Namespace?
When writing an XHTML document 0.0%
When creating an XSL template 0.0%
When writing an XML document containing tags from multiple XML vocabularies 0.0%
All of the above 100.0%
When are you most likely to use XML?
You have created a Java-based data-oriented application which will be used on several different platforms 100.0%
You want to exchange information between a web based Java application and a Visual Basic application running on your PC 0.0%
You want to create a personal web site for yourself which will consist of a few static pages 0.0%
You are writing a software for an old mainframe computer 0.0%
When is the DOM event 'ondataavailable' fired?
When new data is available 100.0%
When user set an attribute 0.0%
When XML is NULL 0.0%
None of the above 0.0%
When is the DOM event 'onreadystatechange' fired?
When state event is fired 0.0%
When state attribute of schema Element is ready 0.0%
When the readyState method changes 100.0%
None of the above 0.0%
Which attribute is not used when specifying a Simple XLink element?
locator 100.0%
show 0.0%
actuate 0.0%
role 0.0%
title 0.0%
Which element in the following extract contains Element Content? 1 <?xml version="1.0"?> 2 <folder> 3 <file> 4 <name>Accounts Reports</name> 5 <contents>These are the contents of th...
folder 100.0%
file 0.0%
name 0.0%
contents 0.0%
report 0.0%
none of them contain Element Content 0.0%
all of them contain Element Content 0.0%
Which element in the following extract contains Simple Content (Text Content)? 1 <?xml version="1.0"?> 2 <folder> 3 <file> 4 <name>Accounts Reports</name> 5 <contents>These are the contents of the...
folder 0.0%
file 0.0%
name 50.0%
contents 0.0%
report 50.0%
Which elements in the following extract contain Mixed Content? 1 <?xml version="1.0"?> 2 <folder> 3 <file> 4 <name>Accounts Reports</name> 5 <contents>These are the contents of the ...
folder 0.0%
file 50.0%
name 0.0%
contents 50.0%
report 0.0%
Which is the correct method for declaring the xml version?
<?xml version="1.0"?> 100.0%
<xml version="1.0"> 0.0%
<?XML version="1.0"?> 0.0%
<? xml version="1.0"?> 0.0%
<?xml version=1.0 ?> 0.0%
<?xmlversion="1.0"?> 0.0%
Which is the correct way to declare an XML Namespace?
<body xmlns:hns="http://www.w3.org/TR/html4/"> 100.0%
<hns:body xmlnamespace:hns="http://www.w3.org/TR/html4/"> 0.0%
<hns:body hns="http://www.w3.org/TR/html4/"> 0.0%
<hns:body xmlns:hns="http://www.w3.org/TR/html4/"> 0.0%
Which limitation of HTML links is overcome by XLink?
HTML links must be embedded in the source document whereas XLinks may be stored outside the source document 0.0%
HTML links only allow navigation in one direction 100.0%
HTML links only link two resources 0.0%
All of the above 0.0%
Which line will generate an error in the following XML code? 1 <?xml version="1.0"?> 2 <f_ns:folder dt="1/1/2000"> 3 <file f_id="1" > 4 <name>Accounts Reports</name> 5 <contents /> ...
1 0.0%
2,8 0.0%
3 0.0%
4 0.0%
5 100.0%
6 0.0%
there are no errors 0.0%
Which line will generate an error in the following XML file? 1.<?xml version="1.0"?> 2.<folder> 3.<file><name><contents></contents></name></file> 4.<file><name/><contents></contents><name/></file>...
3 0.0%
4 0.0%
5 0.0%
6 0.0%
4,5 0.0%
4,5,6 100.0%
there are no errors 0.0%
Which of the following are methods of formatting of XML documents?
CSS 0.0%
XSLT 0.0%
DTD 50.0%
Schema 50.0%
Which of the following are the elements used to define an XML Schema?
complexType 0.0%
attribute 100.0%
element 0.0%
All of the above 0.0%
Which of the following are XHTML DTDs?
Strict 0.0%
Transitional 0.0%
Frameset 0.0%
All of the above 100.0%
Which of the following attributes are optional in xsl:sort command?
Select 33.0%
order 33.0%
datatype 33.0%
None of the above 0.0%
Which of the following can store negative values?
int 33.0%
i1 33.0%
i2 33.0%
ui1 0.0%
ui2 0.0%
Which of the following data types are allowed in xsl:sort command?
Text 50.0%
Number 50.0%
Date 0.0%
None of the above 0.0%
Which of the following is a required namespace in xml schema?
xmlns="urn:schemas-microsoft-com:xml-data" 0.0%
xmlns="urn:schemas-microsoft-com" 0.0%
xmlns="urn:schemas-microsoft-com:xml-database" 0.0%
None of the above 100.0%
Which of the following is an attribute of the locator element in an Extended XLink?
from 0.0%
to 0.0%
href 100.0%
Which of the following is an invalid operator?
/ is used for child operator 0.0%
// is used for recursive descent 0.0%
. indicates the current context 0.0%
None of the above 100.0%
Which of the following is an XML declaration?
<?xml version="1.0"?> 100.0%
<xmlns:h br/> 0.0%
<!IGNORE ........> 0.0%
<!DOCTYPE ......> 0.0%
<!INCLUDE .......> 0.0%
Which of the following is correct about SAX2?
SAX2 is an xml Parser 0.0%
SAX2 is used for event-based xml implementation 100.0%
SAX2 is used for xml schema 0.0%
None of the above 0.0%
Which of the following is false when you use XSL to convert an XML document to HTML format?
The XSL file must be wellformed 0.0%
A Namespace must be used within the XSL file 0.0%
The document generated after transformation will also satisfy all XML syntax requirements 100.0%
The document generated after transformation may or may not satisfy all XML syntax requirements 0.0%
Which of the following is not a DOM method?
add 0.0%
clone 0.0%
object 100.0%
cloneNode 0.0%
createElement 0.0%
Which of the following is not a parameter of DOM event ontransformnode?
nodeType 100.0%
nodeData 0.0%
nodeCode 0.0%
Which of the following is not a primitive data type?
entity 0.0%
date 100.0%
id 0.0%
idref 0.0%
Which of the following is not a reason for using DTDs?
DTDs speed up the parsing of an XML document 100.0%
With DTDs, your XML files carry a description of their own format. 0.0%
Independent groups of people can agree to use a common DTD for interchanging data. 0.0%
Your application can use a standard DTD to verify that the data you receive from outside is valid. 0.0%
Which of the following is not a schema element?
Attribute 100.0%
AttributeType 0.0%
ElementGroup 0.0%
DataType 0.0%
Which of the following is not a type of attribute?
CDATA 0.0%
PCDATA 0.0%
ID 100.0%
IDREF 0.0%
IDREFS 0.0%
NMTOKEN 0.0%
Which of the following is not an advantage of DOM?
Performs complex XPath filtering 0.0%
Retrieves small amounts of information 100.0%
Random access 0.0%
None of the above 0.0%
Which of the following is not an advantage of XML?
XML can be used for sharing data between different applications 0%
XML can be used for exchanging data between incompatible systems 0%
XML can be used to separate data and presentation 0%
XML can be used for formatting web pages 0%
XML can be used for creating new markup languages 0%
Which of the following is not an attribute of AttributeType element of schema?
default 0.0%
name 0.0%
required 0.0%
optional 100.0%
Which of the following is not an XSL element?
for-each 0.0%
template 0.0%
select 100.0%
value-of 0.0%
Which of the following is not true about CDATA sections?
CDATA sections contain character data 0%
CDATA sections are not parsed by the XML parser 0%
CDATA sections can contain tags and these tags need not be declared in the DTD 0%
CDATA sections can contain tags and these tags must be declared in the DTD 0%
Which of the following is the correct way to define an attribute named size of an element named shoe. The attribute should have a default value of 0?
<!ATTLIST shoe size CDATA "0"> 0.0%
<!ATTLIST shoe size CDATA 0> 100.0%
<!ATTLIST shoe size #PCDATA "0"> 0.0%
<!ATTLIST shoe size DATA "0"> 0.0%
Which of the following most accurately describes the purpose of XSL?
It is only used for displaying XML data in the form of HTML 0%
It is used for transforming XML documents from one format of XML to another 0%
It is used to apply cascading stylesheets to XML documents 0%
Which of the following namespaces is required for xml data types?
urn:schemas-microsoft-com:datatype 0%
urn:schemas-microsoft-com:datatypes 0%
urn:schemas-microsoft-com:types 0%
None of the above 0%
Which of the following options have incorrect syntax?
<xsl:sort> 0%
<xsl:sort select="name/family"> 0%
<xsl:sort select="name/family"/> 0%
<xsl:sort select="name/family/siblings"/> 0%
Which of the following patterns are correct for 'select' attribute of xsl:sort command?
text() for any text 0.0%
node() for any node including root node and attribute node 0.0%
/ for the root node 50.0%
@* for any parent node 50.0%
Which of the following statements are correct about XPath?
A basic XPath pattern describes a path through the XML hierarchy with a slash-separated list of child element names 0%
Attributes are indicated in a query by preceding the name of the attribute with "*". 0%
Branches on the path can be specified by using curly brackets 0%
The XPath pattern identifies all elements that match the path 0%
Which of the following statements are correct?
XML can be used for storing data 0%
XML is developed in html 0%
Closing of tag is not required in XML 0%
WML is developed in xml 0%
Which of the following statements are true about the number data type in xml?
Can store only integer values 0.0%
Can store only decimal values 0.0%
Can not store integer or decimal values 0.0%
can store integer and decimal values 100.0%
Which of the following statements are true for elements?
All elements must have names 0%
An element name can contain white space, letters, digits, hyphens, underscores, and periods 0%
Element names are case-sensitive and must start with a letter or underscore 0%
None of the above 0%
Which of the following statements define 'prolog' in xml?
The prolog refers to the information that appears before the start tag of the document or root element 0.0%
The prolog creates is used to create the structure of the xml document 100.0%
The prolog is a query language for xml 0.0%
The prolog is an xml parser 0.0%
Which of the following statements is false with regard to XHTML syntax?
Element names must be properly nested 0%
Element names must be in lower case 0%
The name attribute is to be used instead of the id attribute for identifying elements 0%
Each element must have a closing tag 0%
Which of the following statements is not correct about schema?
The Schema element can contain any number of top-level declarations 100.0%
The XML schema language is based on the Worldwide Web Consortium (W3C) 0.0%
The definitions in an XML schema are contained within the top-level Schema element 0.0%
The Schema element in an XML Schema document can not use a namespace 0.0%
Which of the following statements is true with regard to XHTML?
XHTML tags are different from HTML tags 100.0%
XHTML is used in combination with XSL for converting XML files to HTML format 0.0%
XHTML documents need not satisfy any of the syntax rules of XML 0.0%
XHTML documents must satisfy all the syntax rules of XML 0.0%
Which of the following statements is true?
An XML Namespace can only be associated with the Root element of an XML document 100.0%
An XML Namespace can be associated with any element in the XML document and its scope is limited to that element only 0.0%
An XML Namespace can be associated with any element in the XML document and its scope is limited to that element along with its child elements 0.0%
An XML Namespace can be associated with any element in the XML document and its scope is limited to the entire XML document 0.0%
Which of the following statements is/are correct. Statement (a): XML takes up more network bandwidth and storage space. Statement (b): XML requires more processor time for compression.
Only (a) is true 0%
Only (b) is true 0%
Both (a) and (b) are true 0%
Both (a) and (b) are false 0%
Which of the following XPath functions is not a string function?
concat 0.0%
substring 0.0%
translate 0.0%
namespace-uri 100.0%
Which of the statements are correct? (a)Attributes added with <xsl:attribute> must appear before children are added to the element. (b)You can add an attribute to an element that already has an at...
Only (a) is true 100.0%
Only (b) is true 0.0%
Both (a) and (b) are true 0.0%
Both (a) and (b) are false 0.0%
You have records of 50 employees in an XML document. You want to create a table from a group of XML nodes. Which method is best suited to convert data into HTML table rows?
Create a loop through for-each command 0%
Create a row individually for each employee 0%
The Internet Browser automatically creates HTML tables 0%
None of the above 0%