Sie sind auf Seite 1von 14

Saturday, January 26, 2013

7:05 PM

yes

SBM0 Which of the following markup languages is used


01
for data description and definition?

yes

SBM0 Which of the following models focuses on the roles 1, Process and
02
of people and organizations in getting work done? workflow
models

yes

SBM0 Which of the following options is a valid XML


03
document?

1, HTML

2, WML

3, SGML

4, XML

2, Data flow
models

3, Use cases

4, Object models

1, <?xml
2, <?xml
3, <?xml
version="1.0"?> version="1.0"?> version="1.0"?>

4, <?xml
version="1.0"?>

<AUTHORS>

<AUTHORS>

<AUTHORS>

<AUTHORS>

<AUTHOR>

<AUTHOR>

<AUTHOR>

<AUTHOR>

<FIRSTNAME> <FIRSTNAME> <FIRSTNAME>


<FIRSTNAME>
JOHN</FIRSTNA JOHN</FIRSTNA JOHN</FIRSTNAM JOHN
ME>
ME>
E>
<LASTNAME>
<LASTNAME>
<LASTNAME>
<LASTNAME>
NORTON</LAST NORTON</LAST NORTON</LASTN NORTON
NAME>
NAME>
AME>

yes

</AUTHOR>

</AUTHOR>

</AUTHORS>

</AUTHOR>

</AUTHORS>

</authors>

</AUTHOR>

</AUTHORS>

SBM0 Bob is working as an EDP head for CyberShoppe


1, Bob should
04
Inc. Cybershoppe sells toys and books in the
use HTML
United States. Cybershoppe is currently using EDI instead of EDI
to interchange data across Accounts and Sales
departments. The format that is used by
Cybershoppe to interchange data needs to be
validated by UN/EDIFACT. This process is very
expensive and time-consuming. Help Bob to
identify a cost-effective and time-efficient solution
to implement data interchange among
heterogeneous network.

2, Bob should
3, Bob should use 4, Bob has to
use XML instead SGML instead of continue using
of EDI
EDI
EDI

SBM0 Which of the following data types in XML schemas 1, Union data
05
is derived from the atomic and list data types?
types

2, Primitive data 3, Derived data


types
types

4, Atomic data
types

yes

SBM0 Which of the following options is the base data


06
type for the time data type?

1, timeDuration 2,
3, Integer
recurringDuratio
n

4, Long

yes

SBM0 Which of the following values of the use attribute


07
ensures that an attribute is always set to some
value?

1, optional

2, default

3, required

4, fixed

SBM0 Joe has created a global attribute named basicPay. 1, use


08
Which of the following attributes will he use to
access basicPay?

2, name

3, ref

4, type

SBM0 Which of the following statements is NOT true


09
about XML namespaces?

2, A namespace 3, A namespace
is a virtual space URI is same as a
that is assigned Web URI
or recognized by
a URI.

4, The
namespace is a
string that
uniquely
identifies the
elements and
attributes from
different
schemas.

SBM0 Which of the following keywords is used to declare 1, xmlns


10
a namespace in an XSD document?

2, xsd

3, xmlau

4, name

SBM0 Which of the following options is NOT true about

2, The include

3, The include

4, The include

New Section 2 Page 1

1, A namespace
is a method of
preventing
conflicts
between
elements with
the same name.

1, The include

SBM0 Which of the following options is NOT true about


11
include element?

1, The include
element is used
to include or
refer to an
external schema
that is located
at a definite
address.

2, The include
element
contains the
schemaLocation
attribute.

3, The include
element can have
multiple
occurrences in an
XSD document.

4, The include
element allows
you to access
components from
multiple schemas
that may belong
to different
target
namespaces.

2, group

3, attributeGroup 4, all

yes

SBM0 You want to refer a set of related elements by


1, sequence
12
using a common name in an XML schema. Which
of the following elements can be incorporated into
a complex data type to achieve this?

yes

SBM0 Which of the following text properties can be


13
applied only to inline elements?

1, vertical-align 2, texttransform

yes

SBM0 Which of the following statements is NOT true


14
about XSLT?

1, Uses less
memory

2, Written using 3, Complex to use 4, Can reorder,


XML and follows
add, or delete
XML syntax
elements

SBM0 Which of the following characters in Xpath


15
expressions searches for the specified element at
any node level?

1, //

2, /

3, .

3, text-align

4, text-indent

4, *

yes

SBM0 Which of the following operators is used to check 1, PRICE[ .


16
whether a value of price is greater than or equal to &&gt;= 20]
20?

2, PRICE[ .
&&gt= 20]

3, PRICE[ . &&gt=; 4, PRICE &&gt;=


20]
20

yes

SBM0 Which of the following HTML tags is used as a


17
parent for the TR and TD elements?

2, TBody

3, TH

4, Table

yes

SBM0 Which of the following XML DOM Objects


1, Document
18
represents a collection of Node objects and is used object
to iterate through the collection?

2, Element
object

3, Node object

4, NodeList
object

yes

SBM0 Which of the following XML DOM properties


19
indicates whether the document has been loaded
completely?

1, readyState

2, async

3,
validateOnParse

4, parseError

SBM0 What will be the output of the following string


20
function:

1, M/DD/YY

2, MM

3, DD/YY

4, MM/DD

3, get()

4,
NamespaceURI()

1, THead

substring('MM/DD/YY',2)
yes

SBM0 Which of the following options is a valid


21
XMLSchemaCache method that returns the
namespace associated with the schema at the
specified index number?

1,
2,
namespaceURI(i get(namespace
ndex number) URI)

SBM0 Joe wants to write a script that will be used to


22
access an XSLT stylesheet. Which of the following
DOM objects Joe needs to use to achieve this?

1, XSLTemplate 2, XSLProcessor 3, DOMDocument 4,


object
Object
XMLSchemaCach
e

SBM0 Bob is working as an EDP head in CyberShoppe. He


23
has to ensure that the data sent in the form of XML
documents is consistent. For this, he wants to
write a script that validates the data stored in an
XML document against a schema. Identify the
correct code that Bob should write that will
associate the XML document with the XML schema
specified by the user.

1, var
namespace=xml
Doc.documentEl
ement.namespa
ceURI;

2, var
namespace=xml
Doc.documentEl
ement.namespa
ceURI;

3, var
namespace=xmlD
oc.namespaceURI
;

4, var
namespace=xmlD
oc.documentEle
ment.namespace
URI;

xmlDoc.validate xmlDoc.validate xmlDoc.validateO xmlDoc.validateO


OnParse=true; OnParse=true; nParse=true;
nParse=true;
var
New Section 2 Page 2

var

var

var

var
xsdschemacach
e = new
ActiveXObject("
Msxml2.XMLSch
emaCache.6.0")
;

var
xsdschemacache
= new
ActiveXObject();

var
xsdschemacache
= new
ActiveXObject("M
sxml2.XMLSchem
aCache.6.0");

var
xsdschemacache
= new
ActiveXObject("M
sxml2.XMLSchem
aCache.6.0");

xsdschemacach
e.add(namespac
e,document.frm
Transform.

xsdschemacache
.add(namespace
,document.frmT
ransform.

xsdschemacache.
add(namespace,d
ocument.frmTran
sform.

xsdschemacache.
add(namespace,d
ocument.frmTran
sform.

TxtXSDFileName TxtXSDFileName TxtXSDFileName.v TxtXSDFileName);


.value);
.value);
alue);
xmlDoc.schema xmlDoc.schemas xmlDoc.schemas= xmlDoc.schemas=
s=xsdschemacac =xsdschemacach xsdschemacache; xsdschemacache;
he;
e;

yes

xmlDoc.load(do
cument.frmTran
sform.TxtXMLFil
eName.value);

xmlDoc.load(doc
ument.frmTrans
form.TxtXMLFile
Name.value);

xmlDoc.load(docu
ment.frmTransfor
m.TxtXMLFileNam
e.value);

xmlDoc.load(doc
ument.frmTransf
orm.TxtXMLFileN
ame);

1, The number
of parameters
passed to the
createNode
method is
incorrect. The
correct code is
as follows:

2, The number
of parameters
passed to the
createNode
method is
incorrect. The
correct code is
as follows:

3, The number of
parameters
passed to the
createNode
method is
incorrect. The
correct code is as
follows:

4, The number of
parameters
passed to the
createNode
method is
incorrect. The
correct code is as
follows:

var docobj=new
ActiveXObject("Msxml2.DOMDocument.6.0");

var docobj =
new
ActiveXObject("
Msxml2.DOMD
ocument.6.0");

var docobj =
new
ActiveXObject("
Msxml2.DOMDo
cument.6.0");

var docobj = new


ActiveXObject("M
sxml2.DOMDocu
ment.6.0");

var docobj = new


ActiveXObject("M
sxml2.DOMDocu
ment.6.0");

docobj.async=false;

docobj.async=fa docobj.async=fal docobj.async=fals docobj.async=fals


lse;
se;
e;
e;

if (docobj.childNodes.length==0)

if
if
if
if
(docobj.childNo (docobj.childNo (docobj.childNode (docobj.childNod
des.length==0) des.length==0) s.length==0)
es.length==0)

myroot=docobj.createNode("Product");

myroot=docobj. myroot=docobj. myroot=docobj.cr myroot=docobj.cr


createNode(2," createNode(1,"P eateNode(2,"Prod eateNode(1,"Pro
Product","");
roduct");
uct");
duct","");

docobj.appendChild(myroot);

docobj.appendC docobj.appendC docobj.appendChi docobj.appendCh


hild(myroot);
hild(myroot);
ld(myroot);
ild(myroot);

docobj.save("d:\Prod.xml");

docobj.save("d: docobj.save("d: docobj.save("d:


\Prod.xml");
\Prod.xml");
\Prod.xml");

docobj.save("d:
\Prod.xml");

1, var
myxmldoc=new
ActiveXObject("
Msxml2.DOMD
ocument.6.0");

2, var
myxmldoc=new
ActiveXObject("
Msxml2.DOMDo
cument.6.0");

3, var
myxmldoc=new
ActiveXObject("M
sxml2.DOMDocu
ment.6.0");

4, var
myxmldoc=new
ActiveXObject("M
sxml2.DOMDocu
ment.6.0");

SBM0 Bob has written the following code snippet to


24
create an element node called Product:

But on executing the code snippet, it resulted in an


error. Identify the error in the code.
SBM0 Bob has created the following XML file:
25

New Section 2 Page 3

ocument.6.0");

cument.6.0");

ment.6.0");

ment.6.0");

var i;

var i;

var i;

var i;

<?xml version="1.0"?>

myxmldoc.asyn myxmldoc.async myxmldoc.async= myxmldoc.async=


c=false;
=false;
false;
false;

<empfolio>

myxmldoc.load( myxmldoc.load( myxmldoc.load("C


"C:\\emp.xml"); "C:\\emp.xml"); :\\emp.xml");

<emp>

if
(myxmldoc.read
yState == 4
&& myxmldoc.
parseError.error
Code==0)

if
(myxmldoc.read
yState == 1
&& myxmldoc.p
arseError.errorC
ode==0)

if
(myxmldoc.ready
State == 3
&& myxmldoc.pa
rseError.errorCod
e==0)

if
(myxmldoc.ready
State == 2
&& myxmldoc.pa
rseError.errorCod
e==0)

<empname>John Rambo</empname>

<empcity>Texas</empcity>

var
root=myxmldoc.
documentEleme
nt;

var
var
var
root=myxmldoc. root=myxmldoc.d root=myxmldoc.d
documentEleme ocumentElement; ocumentElement;
nt;

</emp>

for (i=0;
for (i=0;
for (i=0;
for (i=0;
i< root.childNod i< root.childNod i< root.childNodes i< root.childNode
es.length; ++ i) es.length; ++ i) .length; ++ i)
s.length; ++ i)

<emp>

<empname>James Bond</empname>

alert
alert
alert
alert
(root.childNode (root.childNodes (root.childNodes.i (root.childNodes.i
s.item(i).xml);
.item(i).xml);
tem(i).xml);
tem(i).xml);

<empcity>London</empcity>

else

else

else

else

alert("Failed to
load the
document.
Check whether
your
XML document
is wellformed");

alert("Failed to
load the
document.
Check whether
your
XML document
is well-formed");

alert("Failed to
load the
document. Check
whether your
XML document is
well-formed");

alert("Failed to
load the
document. Check
whether your
XML document is
well-formed");

2, <xsl:value-of
select='(./PRICE)
*
sum(./ORDER/Q
UANTITY)' />

3, <xsl:value-of
select='(@PRICE)
*
sum(ORDER/QUA
NTITY)' />

4, <xsl:value-of
select='(PRICE) *
sum(ORDER/QUA
NTITY)' />

</emp>
</empfolio>

He has saved the preceding document as emp.xml. }


Now, he wants to create a file that will navigate
through the child nodes of the root element in the
preceding document. Which of the following code
snippet will enable him to achieve this task?
SBM0 Bob has created the following XML file:
26

<SUMMARY>
<PRODUCT ID="P001" NAME="Mini Bus"
PRICE="75">
<ORDER ID="O001">
<SHIP_ADD>10 NEWSLAND ESTATE,
NY</SHIP_ADD>

New Section 2 Page 4

1, <xsl:value-of
select='(./
@PRICE) *
sum(./ORDER/Q
UANTITY)' />

<QUANTITY>30</QUANTITY>
</ORDER>
<ORDER ID="O002">
<SHIP_ADD>11 NEWSLAND ESTATE,
NY</SHIP_ADD>
<QUANTITY>50</QUANTITY>
</ORDER>
</PRODUCT>
</SUMMARY>
Bob wants to calculate the total sales amount for a
product. Which of the following options will enable
Bob to achieve this task?
SBM0 Bob wants to use an XPath function that will return 1, floor(num)
27
the largest integer that is less than or equal to the
argument. Which of the following functions will
enable Bob to achieve this task?
yes

2, ceiling(num)

3, round(num)

4, number(obj?)

SBM0 Bob wants to create a stylesheet that will display


28
the details of the product whose price is equal to
$500. Which of the following code snippets
enables Bob to check the product's price?

1, <xsl:if
2, <xsl:if
3, <xsl:if
4, <xsl:if
test="PRICE [. = test="PRICE [. = select="PRICE [. = select="PRICE [. =
500]">
500]" />
500]">
500]" />

SBM0 Bob wants to process an XML document by using a


29
style sheet. For this, he needs to instantiate the
XSLProcessor object. Which of the following
options will enable him to achieve this task?

1, var
xslprocobj=xslto
bj.createProcess
or();

2, var
xslprocobj=new
createProcessor
();

3, var
4, var
xslprocobj=new
xslprocobj=create
ActiveXObject(xslt Processor();
obj);

SBM0 Bob has created the Product.xml file. The


30
Product.xml contains the following information:

1,
<xsl:stylesheet
xmlns:xsl="htt
p://www.w3.or
g/1999/XSL/Tr
ansform"
version="1.0">

2,
<xsl:stylesheet
xmlns:xsl="http
://www.w3.org/
1999/XSL/Tran
sform"
version="1.0">

3,
<xsl:stylesheet
xmlns="http://ww
w.w3.org/1999/X
SL/Transform"
version="1.0">

4,
<xsl:stylesheet
xmlns:xsl="http:/
/www.w3.org/19
99/XSL/Transfor
m"
version="1.0">

<xsl:template
match="/">

<xsl:template
match="/">

<xsl:template
match="/">

<xsl:template
match="/">

<?xml version="1.0"?>

<html>

<PRODUCTDATA>

<body>

<PRODUCT>

<html>
<body>

<xsl:for<li>
each
<xsl:value-of
select="PRODU select="PRODUC
CTDATA/PRODU TNAME"/></li>
CT">

<html>
<body>
<xsl:foreach
select="PRODUCT
DATA/PRODUCT"
>

<html>
<body>
<xsl:foreach
select="PRODUCT
DATA/PRODUCT"
>

<PRODUCTNAME>Mini Bus</PRODUCTNAME>

<li>
<li>
<li>
<li>
<xsl:value-of
<xsl:value-of
<xsl:value-of
<xsl:value-of
select="PRODU select="DESCRIP select="PRODUCT select="PRODUCT
CTNAME"/>
TION"/></li>
NAME"/></li>
NAME"/></li>
</li>

<DESCRIPTION>This is a toy for children aged 4


and

<li>
<li>
<li>
<li>
<xsl:value-of
<xsl:value-of
<xsl:value-of
<xsl:value-of
select="DESCRIP select="QUANTI select="DESCRIPTI select="DESCRIPT
TION"/></li>
TY"/></li>
ON"/></li>
ION"/></li>

above</DESCRIPTION>

New Section 2 Page 5

<li>
<li>
<li>
<li>
<xsl:value-of
<xsl:value-of
<xsl:value-of
<xsl:value-of
select="QUANTI select="PRICE"/ select="QUANTIT select="QUANTIT

select="QUANTI select="PRICE"/ select="QUANTIT select="QUANTIT


TY"/></li>
></li>
Y"/></li>
Y"/></li>
<PRICE>75</PRICE>

<li>
<br>
<xsl:value-of
</br>
select="PRICE"/
></li>

<QUANTITY>54</QUANTITY>

<br>

<li>
<xsl:value-of
select="PRICE"/>
</li>

</body>

<li>
<xsl:value-of
select="PRICE"/>
</li>

<br></br>

<br></br>

</br>
</PRODUCT>

</body>

</html>

</xsl:foreach>

<PRODUCT>

</html>

<PRODUCTNAME>Race Car</PRODUCTNAME>
<DESCRIPTION>This is a toy for children aged 6
and

</xsl:template
>

</xsl:template </xsl:stylesheet
>
>
</xsl:stylesheet
>

</body>
</html>

</xsl:foreach>
</body>
</html>

</xsl:template>

</xsl:template>

</xsl:stylesheet>

</xsl:stylesheet>

2,
<xsl:stylesheet
xmlns:xsl="http
://www.w3.org/
1999/XSL/Tran
sform"
version="1.0">

3,
<xsl:stylesheet
xmlns:xsl="http:/
/www.w3.org/19
99/XSL/Transfor
m"
version="1.0">

4,
<xsl:stylesheet
xmlns:xsl="http:/
/www.w3.org/19
99/XSL/Transfor
m"
version="1.0">

<xsl:template
match="/">

<xsl:template
match="/">

<xsl:template
match="/">

<xsl:template
match="/">

<?xml version="1.0"?>

<html>

<html>

<html>

<html>

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

<body>

<body>

<body>

<body>

<CUSTDETAILS>

<xsl:for-each
<xsl:for-each
<xsl:for-each
<xsl:for-each
select="CUSTDE select="CUSTDE select="CUSTDET select="CUSTDET
TAILS/CUSTOM TAILS/CUSTOME AILS">
AILS/CUSTOMER"
ER">
R">
>

<CUSTOMER CUSTID="C001">

<li><xsl:value- <li><xsl:value- <li><xsl:value-of <li><xsl:value-of


of
of
select="@CUSTID select="@CUSTID
select="@CUSTI select="CUSTID" "/></li>
"></li>
D"/></li>
/></li>

above</DESCRIPTION>
<PRICE>14</PRICE>
<QUANTITY>150</QUANTITY>
</PRODUCT>
<PRODUCT>
<PRODUCTNAME>Baby's
Rattle</PRODUCTNAME>
<DESCRIPTION>This is a toy for
babies</DESCRIPTION>
<PRICE>5</PRICE>
<QUANTITY>25</QUANTITY>
</PRODUCT>
</PRODUCTDATA>
Identify the correct style sheet that Bob needs to
create to display the product details as a list.
yes

SBM0 Bob has created customer.xml file, which contains 1,


<xsl:stylesheet
31
the information of customers. The XML file
xmlns:xsl="htt
contains the following information:
p://www.w3.or
g/1999/XSL/Tr
ansform"
version="1.0">

<CUSTNAME>William Anderson</CUSTNAME>
New Section 2 Page 6

<li><xsl:value-

<li><xsl:value-

<li><xsl:value-of

<li><xsl:value-of

<CUSTNAME>William Anderson</CUSTNAME>

<li><xsl:value- <li><xsl:value- <li><xsl:value-of <li><xsl:value-of


of
of
select="CUSTNAM select="CUSTNA
select="CUSTNA select="CUSTNA E"/></li>
ME"></li>
ME"/></li>
ME"/></li>

<ADDRESS>13, Cross Street</ADDRESS>

<li><xsl:value- <li><xsl:value- <li><xsl:value-of <li><xsl:value-of


of
of
select="ADDRESS" select="ADDRESS
select="ADDRES select="ADDRES /></li>
"/></li>
S"/></li>
S"/></li>

<CITY>New York</CITY>

<li><xsl:value- <li><xsl:value- <li><xsl:value-of <li><xsl:value-of


of
of
select="CITY"/>
select="CITY">
select="CITY"/> select="CITY"/> </li>
</li>
</li>
</li>

<STATE>New York</STATE>

<li><xsl:value- <li><xsl:value- <li><xsl:value-of <li><xsl:value-of


of
of
select="STATE"/> select="STATE">
select="STATE"/ select="STATE"/ </li>
</li>
></li>
></li>

<COUNTRY>USA</COUNTRY>

<li><xsl:value- <li><xsl:value- <li><xsl:value-of <li><xsl:value-of


of
of
select="COUNTRY select="COUNTRY
select="COUNT select="COUNTR "/></li>
"></li>
RY"/></li>
Y"/></li>

<PHONE>6785764</PHONE>

<li><xsl:value- <li><xsl:value- <li><xsl:value-of <li><xsl:value-of


of
of
select="PHONE"/> select="PHONE">
select="PHONE" select="PHONE" </li>
</li>
/></li>
/></li>

</CUSTOMER>

<br></br>

<CUSTOMER CUSTID="C002">
<CUSTNAME>Bill Sanders</CUSTNAME>

</xsl:foreach>
</body>

<br></br>

<br></br>

<br></br>

</xsl:for-each>

</xsl:for-each>

</xsl:for-each>

</body>

</body>

</body>

<ADDRESS>13, Crick Street</ADDRESS>

</html>

</html>

</html>

</html>

<CITY>Seattle</CITY>

</xsl:template> </xsl:template> </xsl:template>

</xsl:template>

<STATE>Washington</STATE>

</xsl:stylesheet </xsl:stylesheet </xsl:stylesheet>


>
>

</xsl:stylesheet>

<COUNTRY>USA</COUNTRY>
<PHONE>608475</PHONE>
</CUSTOMER>
</CUSTDETAILS>
Now, he wants to create an XSLT style sheet that
displays the information in bulleted list. Identify
the code that he needs to write to create the XSLT
style sheet.
yes

SBM0 Which of the following scripting languages is


32
developed by Netscape Communication
Corporation?

1, JavaScript

2, VBScript

3, JScript

4, CGI

yes

SBM0 Which of the following objects contains the


33
document, frame, location, and history objects?

1, window

2, form

3, navigator

4, link

yes

SBM0 Which of the following window objects properties 1, parent


34
is used to display a message in the status bar of the
window when no other transient message is
displayed?

2, frames

3, length

4, defaultStatus

yes

SBM0 Joe is working as a Web designer with Global Inc.


35
He is designing a Web page in which he needs to
facilitate the users to modify the data entered by
them on the Web document. Which of the

2, document

3, frame

4, location

New Section 2 Page 7

1, window

them on the Web document. Which of the


following objects will Joe use to achieve this task?
SBM0 Which of the following options is an empty tag in
36
HTML?

1, <br>

2, <b>

3, <h1>

4, <td>

yes

SBM0 Which of the following HTML tags is used to group 1, <p>


37
lines of text in a Web page?

2, <b>

3, <i>

4, <u>

yes

SBM0 Joe is working as a Web designer with Global Inc. 1, <HR>


38
He is designing a Web page in which he wants to
specify the key aspects of a Web page. Which of
the following HTML tags should Joe use to achieve
this task?

2, <P>

3, <TITLE>

4, <HEAD>

SBM0 Joe is working as a Web designer with Global Inc. 1, <HTML>


39
He is designing a Web page in which he wants to
display an image map named image.gif. The image
map should be displayed on the 10, 10, 50, 50
coordinates. Which of the following code should
Joe use to display an image map?

2, <HTML>

3, <HTML>

4, <HTML>

<BODY>

<BODY>

<BODY>

<BODY>

<IMG
<MAP
<IMG
SRC="image.gif" NAME="down_ SRC="image.gif"
USEMAP="#ma map">
USEMAP="#map_
p_section">
section">

<IMG
SRC="image.gif"
USEMAP="#map_
section">

<MAP
<AREA
<MAP
<MAP
NAME="down_ Name="exit"
NAME="down_m NAME="down_m
map">
COORDS="10,10 ap">
ap">
,50,50"
SHAPE="rect"
HREF="image.gif
">
<AREA
</BODY>
Name="exit"
COORDS="10,10
,50,50"
SHAPE="rect"
HREF="image.gi
f">

</BODY>

<AREA
Name="exit"
SHAPE="rect"
HREF="image.gif"
>

</BODY>

</HTML>

</BODY>

</HTML>

</HTML>
SBM0 You want to create a simple type element named
40
Price. You want to ensure that the element should
contain a value greater than 10 but less than 400.
Which of the following code snippets will you use
to create the element?

1,
<xsd:simpleTyp
e
name="Price">

</HTML>
2,
3,
<xsd:simpleType <xsd:simpleType
name="Price"
name="Price">
restriction="xsd:
positiveInteger"
>

4,
<xsd:simpleType
name="Price">

<xsd:restrictio
<xsd:maxIncl <xsd:restriction
<xsd:maxInclus
n
usive
base="xsd:positiv ive value="400">
base="xsd:positi value="400">
eInteger">
</xsd:maxInclusiv
veInteger">
</xsd:maxInclusi
e>
ve>
<xsd:maxIncl
<xsd:minInclu
<xsd:max
usive
sive value="10"> value="400">
value="400">
</xsd:minInclusi </xsd:max>
</xsd:maxInclus ve>
ive>

New Section 2 Page 8

<xsd:minInclus
ive value="10">
</xsd:minInclusiv
e>

<xsd:minIncl </xsd:simpleTyp
<xsd:min
usive
e>
value="10">
value="10">
</xsd:min>
</xsd:minInclusi
ve>

SBM0 You want to create an attribute named PRODID.


41
You want to ensure that the attribute should
contain a value that starts with P followed by three
integer numbers. For this, you have created a
schema that contains the following code snippet:

</xsd:restrictio
n>

</xsd:restriction
>

</xsd:simpleTyp
e>

</xsd:simpleType
>

</xsd:simpleType
>

1,
<xsd:schema
xmlns:xsd="htt
p://www.w3.or
g/2001/XMLSc
hema">

2,
<xsd:schema
xmlns:xsd="htt
p://www.w3.or
g/2001/XMLSc
hema">

3, <xsd:schema
xmlns:xsd="http:
//www.w3.org/20
01/XMLSchema"
>

4, <xsd:schema
xmlns:xsd="http
://www.w3.org/2
001/XMLSchem
a">

<xsd:attribute
name="PRODID
" type="pID"
use="required"
>

<xsd:attribute
name="PRODID"
type="pID"
use="required"/
>

<xsd:attribute
name="PRODID"
type="pID"
use="required"/>

<xsd:attribute
name="PRODID"
type="pID"
use="required"/>

<xsd:schema
<xsd:simpleTyp <xsd:simpleType <xsd:simpleType
xmlns:xsd="http://www.w3.org/2001/XMLSche e name="pID"> name="pID">
name="pID">
ma">
<xsd:restrictio

<xsd:simpleType
name="pID">

<xsd:element name="PRODID" type="pID"


use="required"/>

<xsd:restrictio

<xsd:patter
<xsd:restriction
n
n
n value="[P]
base="xsd:string"
base="xsd:strin base="xsd:string {1}\d{3}"/>
>
g">
">

<xsd:simpleType name="pID">

<xsd:patt
<xsd:patte </xsd:simpleType
<xsd:patter
ern value="[P] rn value="[P]
>
n value="[P]
{1}\d{3}"/>
\d{3}"/>
{1}\d{3}"/>

<xsd:restriction base="xsd:string" value="[P]


{1}\d{3}" />

</xsd:restricti </xsd:restricti </xsd:schema>


on>
on>

</xsd:restrictio
n>

</xsd:simpleType>

</xsd:simpleTyp </xsd:simpleTyp
e>
e>

</xsd:simpleType
>

</xsd:schema>

</xsd:schema>

</xsd:schema>

</xsd:schema>

SBM0 You have been assigned a task to create an XML


42
schema that is using namespaces with attributes.
Which of the following options is NOT true
regarding the rules for using namespaces with
attributes?

1, Declarations
of the default
namespaces do
not affect
attribute names

2, Attribute
names may
contain only
zero or one
colon (:)
characters.

3, A start tag must


not contain two
attribute names
with a common
local part and
different prefixes
that point to the
same namespace.

4, A start tag can


contain two
attributes with
the same name,
regardless of
whether or not
the attribute
name is qualified.

SBM0 You have been assigned a task of creating an XML


43
schema using XSD. You have to explicitly declare a
namespace using the following code snippet:

1, You need not


specify the
prefix for an
explicit
namespace

2, Elements that
explicitly use the
prefix comes
under the scope
of the specified
namespace.

3, Explicit
namespaces are
used in an XSD
document that
uses the elements
and attributes
defined in one or
more
namespaces.

4, xmlns keyword
associates a
prefix with a
namespace URI

The above code snippet is not working properly.


Identify the correct code snippet that will help you
achieve this task?

New Section 2 Page 9

namespaces.
<xsd:schema
xmlns:xsd="http://www.w3.org/2001/XMLSche
ma">
:
:
</xsd:schema>
Which of the following statements is NOT true for
the preceding code snippet?
yes

SBM0 You have been assigned a task of creating a XSD


1,
2, <xsd:choice>
44
schema. You need to ensure that the value entered <xsd:sequence>
by the user for the element addressType should be
either office or residence. Which of the following
options will you use to achieve this task?

3, <xsd:all>

4, <xsd:group>

1,
SBM0 You have created the following XSD schema that
45
will enable you to use the elements in any order of <xsd:schema
xmlns:xsd="htt
your choice:
p://www.w3.or
g/2001/XMLSc
hema">

3, <xsd:schema
xmlns:xsd="http:
//www.w3.org/20
01/XMLSchema"
>

4, <xsd:schema
xmlns:xsd="http
://www.w3.org/2
001/XMLSchem
a">

2,
<xsd:schema
xmlns:xsd="htt
p://www.w3.or
g/2001/XMLSc
hema">

<xsd:element
<xsd:element
<xsd:element
name="EMPLOY name="EMPLOY name="EMPLOYE
EE"/>
EE"
E"/>
type="emptype"
/>
<xsd:schema
<xsd:complexT <xsd:complexT <xsd:complexTyp
xmlns:xsd="http://www.w3.org/2001/XMLSche ype
ype
e
ma">
name="emptyp name="emptyp name="emptype"
e">
e">
>
<xsd:element name="EMPLOYEE" type="emptype"
<xsd:sequenc
/>
e>
<xsd:complexType name="emptype">

<xsd:all>

<xsd:element
name="EMPLOYE
E"
type="emptype"
/>
<xsd:complexTy
pe
name="emptype"
>

<xsd:all>

<xsd:sequence
>

<xsd:eleme
nt
name="FIRSTNA
ME"
type="xsd:string
"/>

<xsd:eleme
nt
name="FIRSTNA
ME"
type="xsd:string
"/>

<xsd:elemen
t
name="FIRSTNAM
E"
type="xsd:string"/
>

<xsd:elemen
t
name="FIRSTNA
ME"
type="xsd:string"
/>

<xsd:eleme
nt
name="LASTNA
ME"
type="xsd:string
"/>

<xsd:eleme
nt
name="LASTNA
ME"
type="xsd:string
"/>

<xsd:elemen
t
name="LASTNAM
E"
type="xsd:string"/
>

<xsd:elemen
t
name="LASTNAM
E"
type="xsd:string"
/>

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

<xsd:eleme
nt
name="DESIG"
type="xsd:string
"/>

<xsd:eleme
<xsd:elemen
<xsd:elemen
nt
t name="DESIG" t name="DESIG"
name="DESIG" type="xsd:string"/ type="xsd:string"
type="xsd:string >
/>
"/>

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

<xsd:eleme
nt
name="DEPART
MENT"
type="xsd:string
"/>

<xsd:eleme
nt
name="DEPART
MENT"
type="xsd:string
"/>

<xsd:choice>

<xsd:element name="DESIG"
New Section 2 Page 10

</xsd:sequen

</xsd:all>

<xsd:elemen
t
name="DEPARTM
ENT"
type="xsd:string"/
>
</xsd:all>

<xsd:elemen
t
name="DEPARTM
ENT"
type="xsd:string"
/>
</xsd:sequenc

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

</xsd:sequen
ce>

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

</xsd:complex </xsd:complex </xsd:complexTy </xsd:complexT


Type>
Type>
pe>
ype>

</xsd:choice>

</xsd:schema>

</xsd:all>

</xsd:all>

</xsd:sequenc
e>

</xsd:schema>

</xsd:schema>

</xsd:schema>

2, <schema
xmlns="http://w
ww.w3.org/200
1/XMLSchema
"

3, <schema
xmlns="http://ww
w.w3.org/2001/X
MLSchema"

4, <schema
xmlns="http://w
ww.w3.org/2001
/XMLSchema"

targetNamespac
e="www.ecoma
tcybershop.com
"
xmlns:prd="ww
w.ecomatcybers
hop.com/purcha
se">

targetNamespace
="www.ecomatcy
bershop.com/pur
chase"
xmlns:prd="www.
ecomatcybershop
.com/purchase">

targetNamespace
="www.ecomatcy
bershop.com"
xmlns:prd="www
.ecomatcybersho
p.com/purchase"
>

</xsd:complexType>
</xsd:schema>
However on executing the XSD, it does not work
properly. Identify the correct XSD code that you
need to create so the elements can be used in any
order of your choice.
1, <schema
SBM0 Joe has created the following XSD schema to
46
declare the reusable data types that stores product xmlns="http://
www.w3.org/2
id and order id:
001/XMLSche
ma"
targetNamespac
e="www.ecoma
tcybershop.com
/purchase"
xmlns:prd="ww
w.ecomatcybers
hop.com/purch
ase">

<schema
<include
<include
<include
<include
xmlns="http://www.w3.org/2001/XMLSchema" schemaLocation schemaLocation schema="potype. schema="potype.
="potype.xsd"/> ="potype.xsd"/> xsd"/>
xsd"/>
targetNamespace="www.ecomatcybershop.co <element
m/purchase">
name="PURCHA
SEORDER"
type="prd:puror
d"/>
<simpleType name="prstring">

<restriction base="string">
<pattern value="[P]{1}\d{3}"/>

</restriction>

<element
name="PURCHAS
EORDER"
type="prd:purord
"/>

<element
name="PURCHAS
EORDER"
type="prd:purord
"/>

<complexType <complexType <complexType


name="purord" name="purord" name="purord">
>
>

<complexType
name="purord">

<sequence>

<element
name="PURCHA
SEORDER"
type="prd:puror
d"/>

<sequence>

<sequence>

<sequence>

<element
<element
<element
<element
name="ORDER" name="ORDER" name="ORDER" name="ORDER"
type="prd:ord"/ type="prd:ord"/ type="prd:ord"/> type="prd:ord"/>
>
>
</sequence>

</sequence>

</sequence>

</sequence>

</simpleType>

<attribute
<attribute
<attribute
<attribute
name="PRODID name="PRODID" name="PRODID" name="PRODID"
"
type="prd:prstri type="prd:prstrin type="prd:prstrin
type="prd:prstri ng"/>
g"/>
g"/>
ng"/>

<simpleType name="orstring">

<attribute
name="ORDERI
D"
type="prd:orstri
ng"
use="required"/
>

<restriction base="string">

</complexTyp

New Section 2 Page 11

<attribute
name="ORDERI
D"
type="prd:orstri
ng"
use="required"/
>

<attribute
name="ORDERID"
type="prd:orstrin
g"
use="required"/>

<attribute
name="ORDERID
"
type="prd:orstrin
g"
use="required"/>

</complexType </complexType>

</complexType>

<restriction base="string">
<pattern value="[O]{1}\d{3}"/>

</complexTyp </complexType </complexType>


e>
>
<complexType <complexType <complexType
name="ord">
name="ord">
name="ord">

</restriction>

<sequence>

</simpleType>

<sequence>

</complexType>
<complexType
name="ord">

<sequence>

<sequence>

</schema>
Now, you want to create a schema that will use the
preceding XSD schema. Which of the following
code snippets is the correct code to reuse the
schema created by Joe?

</sequence>

</sequence>

</sequence>

</complexTyp </complexType </complexType>


e>
>
yes

</sequence>

</complexType>

</schema>

</schema>

</schema>

</schema>

SBM0 Which of the following types of list in an HTML


47
document is used to display a set of items with a
preceding number or an alphabet?

1, Nested list

2, Unordered
list

3, Description list 4, Ordered list

SBM0 Consider the following statements:


48

1, Both,
Statement A
and B, are true

2, Both,
3, Statement A is
Statement A and true, B is false
B, are false

4, Statement A is
false, B is true

Statement A: The method attribute of the form tag


is used to indicate how the browser needs to send
the data of the form.
Statement B: The action attribute of the form tag is
used to specify the location to which the contents
of the form data fields are submitted.
yes

SBM0 Which of the following types of site structures is


49
used to present information in an associated path
in which information presented in different pages
of a Web site is interlinked?

1, Grid structure 2, Hierarchy


structure

SBM0 Identify the correct sequence of steps required to


50
deploy a Web site.

1, 1. Register an
account with
the Internet
Service Provider

2, 1. Register an 3, 1. Choose the


account with
Services
the Internet
Service Provider

2. Register a
domain name

2. Register a
domain name

3. Choose the
Services

3. Upload the
3. Register an
files on the Web account with the
Server
Internet Service
Provider

4. Upload the
4. Choose the
files on the Web Services
Server

3, Sequence
structure

4, Web structure

4, 1. Register a
domain name

2. Upload the files 2. Choose the


on the Web
Services
Server

4. Register a
domain name

3. Upload the
files on the Web
Server
4. Test the Web
site

5. Test the Web 5. Test the Web 5. Test the Web


site
site
site
yes

SBM0 Joe is working as a Web page designer with Global 1,


2,
3,
4, scriptEngine()
51
Inc. He is designing a Web page in HTML along with scriptEngineBuil scriptEngineMin scriptEngineMajor
JavaScript. He wants to specify the build version
dVersion()
orVersion()
Version()
number of the current scripting engine. Which of
the following built-in functions should Joe use to
specify the build version number?
New Section 2 Page 12

specify the build version number?


yes

SBM0 Which of the following options correctly defines


52
streaming?

1, Streaming is a
server-side
scripting
technology that
is used to create
dynamic and
interactive Web
pages

2, Streaming is 3, Streaming is a
the serverdatabase query
based
language
technology that
transmits audio
or video content
in a continuous
stream to the
user

4, Streaming is a
protocol
developed by
Netscape for
transmitting
private
documents via
the Internet

SBM0 Which of the following options is the correct code


53
snippet to add a row in a table with the border of
width 5 pixels?

1, <TABLE
BORDER="5">

2, <TABLE >

3, <TABLE >

4, <TABLE
WIDTH="5">

<TR><TD>
Joe</TD><TD>
Martin</TD>
</TR>

<BORDER="5">

<BORDER
WIDTH="5">

<TR><TD>
Joe</TD><TD>
Martin</TD>
</TR>

</TABLE>

<TR><TD>
Joe</TD><TD>
Martin</TD>
</TR>

<TR><TD>
Joe</TD><TD>
Martin</TD>
</TR>

</TABLE>

</BORDER>

</BORDER>

</TABLE>

</TABLE>

2, He should
change the URI
specified with
the xmlns
keyword

3, In XML, you
cannot reuse a
schema

SBM0 Joe has created the following schema named


1, He should
54
potype.xsd that declares the reusable data types to have used the
store product ID and order ID:
schema
attribute in the
include tag
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="www.ecomatcybershop.co
m/purchase">
<simpleType name="prstring">
<restriction base="string">
<pattern value="[P]{1}\d{3}"/>
</restriction>
</simpleType>
<simpleType name="orstring">
<restriction base="string">
<pattern value="[O]{1}\d{3}"/>
</restriction>
</simpleType>
</schema>
Now, he has created the following XSD schema
that reuses the potype.xsd:
<schema
xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="www.ecomatcybershop.com"
xmlns:prd="www.ecomatcybershop.com/purch
ase">
<include schemaLocation="potype.xsd"/>
New Section 2 Page 13

4, He should have
reused the
schema by using
the import
statement.

<include schemaLocation="potype.xsd"/>
<element name="PURCHASEORDER"
type="prd:purord"/>
<complexType name="purord">
<sequence>
<element name="ORDER" type="prd:ord"/>
</sequence>
<attribute name="PRODID"
type="prd:prstring"/>
<attribute name="ORDERID"
type="prd:orstring" use="required"/>
</complexType>
<complexType name="ord">
<sequence>
:
:
</sequence>
</complexType>
</schema>
But he is not able to reuse the schema. Identify the
reason for the same.
SBM0 Consider the following code snippet:
55
var xsdschemacache = new
ActiveXObject("Msxml2.XMLSchemaCache.6.0");
var xmlDoc = new
ActiveXObject("Msxml2.FreeThreadedDOMDocum
ent.6.0");
xmlDoc.validateOnParse=true;
xmlDoc.load("products.xml");
var
namespace=xmlDoc.documentElement.namespace
URI;
xsdschemacache.add(namespace,"products.xsd");
Analyze the code and identify which of the
following options is used to return the namespaceURI specified in the XML document.

New Section 2 Page 14

1,
namespaceURI

2,
3, add
validateOnParse

4, xmlDoc

Das könnte Ihnen auch gefallen