You are on page 1of 17

XML

QuestionNo: 1 Which of the following is NOT an advantage of Electronic Data Interchange (EDI) ? 1,Better customer service 2,Reduced ordering time 3,Reduced data entry errors 4,Flexible business rules QuestionNo: 2 Which of the following is NOT a feature of the eXtensible Markup Language? 1,Cross-platform compatibility 2,Hardware independence 3,Software independence 4,B2B non-compatibility QuestionNo: 3 Which of the following is NOT a markup language? 1,Java 2,HTML 3,SGML 4,XML

QuestionNo: 4 Which of the 1,Facilitates 2,Facilitates 3,Facilitates 4,Facilitates

following is NOT a benefit of XML? smart searches user-selected view of data creation of domain-specific vocabulary application specific view of data

QuestionNo: 5 Which of the following does NOT hold true for XML? 1,XML supports a wide variety of applications. 2,XML is compatible with SGML. 3,XML is compatible with HTML. 4,XML design needs to be formal.

QuestionNo: 6 Which of the following statements correctly states the difference between and XML? 1,HTML focuses only on the presentation of data, while XML focuses on data ll as its presentation. 2,HTML focuses on data, while XML focuses on the presentation of data. 3,HTML focuses on presentation of data, while XML focuses only on data and n its presentation. 4,HTML focuses on data as well as its presentation, while XML focuses only ta.

HTML as we not o on da

QuestionNo: 7 Which of the following statements is correct for XML? Statement A: XML is a text-based markup language that enables you to store data in a structured format by using meaningful tags. Statement B: XML allows you to present data as per the requirements of the appli cation. 1,Statement A is true and statement B is false. 2,Statement A is false and statement B is true. 3,Both the statements are false. 4,Both the statements are true.

QuestionNo: 8 Assertion: XML plays an important role as a very robust data interchange format . Reason: XML allows you to store structured data in a plain-text format. 1,Both, the assertion and the reason, are true and the reason is a correct expla nation of the assertion. 2,Both, the assertion and the reason, are true and the reason is not a correct e xplanation of the assertion. 3,The assertion is true and the reason is false. 4,The assertion is false. Therefore, the reason does not apply.

QuestionNo: 9 Assertion: Implementing EDI involves high costs. Reason: EDI has slow pace of standards evolution. 1,Both, the assertion and the reason, are true and the reason is a correct expla nation of the assertion. 2,Both, the assertion and the reason, are true but the reason is not a correct e xplanation of the assertion. 3,The assertion is true and the reason is false. 4,The assertion is false. Therefore, the reason does not apply.

QuestionNo: 10 Consider the following statements: Statement A: XML enables you to store data in a structured format by allowing yo u to create customized tags. Statement B: XML documents can be easily interpreted by target systems. Which of the following options is correct with respect to the preceding statemen ts? 1,Statement A is true and statement B is false. 2,Statement A is false and statement B is true. 3,Both the statements are true. 4,Both the statements are false.

QuestionNo: 11 Which one of the following code fragments should tell the processor to apply th e template rule to only the child elements of the BOOK element? 1,<xsl:template match="BOOK"> 2,<xsl:apply-templates/> 3,<xsl:template match="BOOK[text()]"> 4,<xsl:apply-templates select="BOOK"/>

QuestionNo: 12 Consider the following XML document: <?xml version= 1.0 ?> <LESSONS> <LESSON1 SUMMARY= In the lesson Learning XML Basics , you learned about the basic com ponents of an XML document. > <OBJECTIVE> Identify the need for XML </OBJECTIVE> <OBJECTIVE> Identify the components of an XML document </OBJECTIVE> </LESSON1> </LESSONS> When the above document is opened in IE 5.0, it displays an error message. What could be the cause of the error? 1,The OBJECTIVE element is used within the LESSON1 element multiple times. 2,LESSON1 is an invalid element name. 3,The SUMMARY attribute of the LESSON1 element has a value containing double quo tes in it. 4,The OBJECTIVE tag should be closed after LESSON1 tag.

QuestionNo: 13 Identify the type of content of the EMP element in the following XML code fragm ent. <COMPDETAILS> <EMP>Marketing Executive <EMP_ID>EMP001 </EMP_ID> <EMP_NAME>Robert Williams</EMP_NAME> </EMP> </COMPDETAILS> 1,Empty 2,Mixed content 3,Element content 4,Data content

QuestionNo: 14 Identify the type of content of the PRODUCT element in the following XML code f ragment. <PRODDET> <PRODUCT PRODID= P001 > <PRODDESC>Baby Food </PRODDESC> <PRICEPERUNIT> 12 </PRICEPERUNIT> </PRODUCT> </PRODDET> 1,Element 2,Data 3,Mixed 4,Empty

QuestionNo: 15 Consider the following extract from an XML document, which contains the details about a product and the order details for the product: <PRODUCT PRODID= P001 NAME= CD > <PRICE> $10 </PRICE> </PRODUCT>

<ORDER ORDNO= 100 > <QTY> 200 </QTY> </ORDER> When the above document is opened in IE 5.0, it gives an error message. What cou ld be the cause of the error? 1,The XML document does not contain the processing instruction. 2,The XML document contains more than one root element. 3,The value of the ORDNO attribute is numeric and, therefore, should not be encl osed in quotes. 4,The tags are not nested correctly.

QuestionNo: 16 Lewis is the IT head of a mobile organization that manufactures and sells mobil e parts. The organization has presence in all the major cities of the US and oth er countries. All branch offices of the organization maintain their data locally . Lewis wants to centralize the data warehouse of the organization. Only the hea d office should be able to access all the data. In addition, Lewis also wants th at the sales personnel should be able to access sales data easily from mobile de vices, such as palmtops and mobile phones. This sales information should have a brief description of the mobile, the price, and the available inventory in an or ganized format. How can Lewis achieve the preceding goals? 1,Develop an online application by using HTML, which provides differential acces s to information and allows data interchange among homogeneous computer systems. 2,Develop an online application by using HTML, which provides differential acces s to information and allows data interchange among heterogeneous computer system s. 3,Develop an online application using XML, which provides differential access to information and allows data interchange among homogeneous computer systems. 4,Develop an online application by using XML, which provides differential access to information and allows data interchange among heterogeneous computer systems .

QuestionNo: 17 You want to create a simple type named PHONENO in an XML schema. You want to en sure that any element or attribute that uses the simple type must contain a valu e in the format XXX-XXX-XXXX (where X represents a single digit). Which of the fol lowing code snippets will you use to create the simple type? 1,<xsd:simpleType name="PHONENO"> <xsd:length value="12"/> <xsd:pattern value="\d{3}-\d{3}-\d{4}"/> </xsd:simpleType> 2,<xsd:SimpleType name="PHONENO"> <xsd:restriction base="xsd:string"> <xsd:length value="12"/> <xsd:pattern value="\d{3}-\d{3}-\d{4}"/> </xsd:restriction> </xsd:SimpleType> 3,<xsd:simpleType name="PHONENO"> <xsd:restriction base="xsd:string"> <xsd:length value="12"/> <xsd:pattern value="\d{3}-\d{3}-\d{4}"/> </xsd:restriction> </xsd:simpleType>

4,<xsd:simpleType name="PHONENO" base= " />

xsd:string patternvalue="\d{3}-\d{3}-\d{4}

QuestionNo: 18 The following is a file containing the details about the stationary available a t the Books On-Demand Stores. It contains data about the item, itemid, itemtype and itemcode. <STATIONARYDETAILS ITEMCODE=C089> <STATIONARY> <ITEMTYPE>"Pen"<ITEMTYPE> <ITEMCOLOR>"Blued"</ITEMCOLOR> </STATIONARYDETAIL> The data structure matches the schema but there are errors in the code. Identify the errors. 1,1. The STATIONARYDETAILS and ITEMTYPE tags are not closed properly. 2. The attribute data should be enclosed in quotes. 3. The STATIONARY tag should have a closing tag. 2,1. The STATIONARYDETAILS, ITEMID and ITEMTYPE tags are not closed properly. 2. The data between the tags should not be enclosed in double quotes. 3. The STATIONARY tag should have a closing tag. 3,1. The STATIONARYDETAILS and ITEMID tags are not closed properly. 2. The data between the tags should be enclosed in exclamation marks. 3. The STATIONARY tag should have a closing tag. 4,1. The STATIONARYDETAILS and ITEMCOLOR tags are not closed properly. 2. The data between the tags should not be enclosed in hyphens. 3. The DRESS tag should have a closing tag.

QuestionNo: 19 The following code is an XML schema which contains the declaration of an elemen t DRESS. The dress element is also linked with a complex data type called CLOTH. <xsd:element name="DRESS" type="DRESSID"/> <xsd:sequence> <xsd:element name="DRESSNAME" type="xsd:string"/> <xsd:element name="DETAILS" type="xsd:string"/> <xsd:element name="PRICE" type="xsd:positiveInteger"/> <xsd:element name="QUANTITY" type="xsd:integer"/> <xsd:attribute name= DRESSID type= xsd:string use= required > </xsd:attribute> </xsd:element> <xsd:complexType name="CLOTH"> </xsd:sequence> </xsd:complexType> Analyze the schema and identify the errors contained in it. 1,The schema contains the following errors: 1. The type declaration of the DRESS element should be equal to CLOTH. 2. The </xsd:sequence> tag should be closed before the <xsd:attribute> tag. 3.The <xsd:complexType name="CLOTH"> tag should be declared before the <xsd:sequ ence> tag. 4. The </xsd:complexType> tag should be closed before </xsd:element> tag.

2,The schema contains the following errors: 1. The type declaration of the DRESS element should be equal to CLOTH. 2. The </xsd:sequence> tag should be closed before the </xsd:attribute> tag. 3. The <xsd:complexType name="CLOTH"> tag should be declared after the </xsd:seq uence> tag. 4. The </xsd:complexType> tag should be closed before </xsd:element> tag. 3,The schema contains the following errors: 1. The type declaration of the DRESS element should be equal to CLOTH. 2. The </xsd:sequence> tag should be closed after the </xsd:element> tag. 3. The <xsd:complexType name="CLOTH"> tag should be declared after the </xsd:att ribute> tag. 4. The </xsd:complexType> tag should be closed before </xsd:element> tag. 4,The schema contains the following errors: 1. The type declaration of the DRESS element should be equal to CLOTH. 2. The </xsd:sequence> tag should be closed after the </xsd:element> tag. 3. The <xsd:complexType name="CLOTH"> tag should be declared before <xsd:element name="DRESS" type="DRESSID"/> tag. 4. The </xsd:complexType> tag should be closed before </xsd:element> tag.

QuestionNo: 20 The given document is validated based on the given schema. Analyze the schema a nd the document and identify the errors that will be generated in the validation process. SCHEMA: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="STUDENT" type="STUDENTTYPE" /> <xsd:complexType name="STUDENTTYPE"> <xsd:sequence> <xsd:element name="STUDENTID" type="xsd:numeric"/> <xsd:element name="STUDENTLASTNAME" type="xsd:string"/> <xsd:element name="GRADE" type="xsd:string"/> <xsd:element name="STREAM" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:schema> DOCUMENT: <?xml version= 1.0 ?> <STUDENT> <STUDENTLASTNAME> Lewis </STUDENTLASTNAME> <STUDENTID> 12 </ STUDENTID > <STREAM> commerce </STREAM> <GRADE> a </GRADE> </STUDENT> 1,The declaration of the attribute data types in the schema ata types in the document. 2,The declaration of the sequence of elements in the schema equence of elements in the document. 3,The declaration of the STUDENTTYPE complex element in the nced anywhere in the document. 4,The element STUDENTTYPE should be declared as simple type ype.

does not match the d does not match the s schema is not refere instead of complex t

QuestionNo: 21 Which of the following is the advantage of creating an XML schema by using XSD?

1,XSD provides control over the type of data that can be assigned to elements an d attributes. 2,XSD enables you to specify restrictions on data 3,XML schema is self documenting. 4,XSD does not allow you to create your own data types. QuestionNo: 22 Which of the following data type contains a set of values of an atomic data typ e? 1,Binary 2,Varchar 3,Boolean 4,List QuestionNo: 23 Which of the following is NOT a valid type of an element content? 1,Character 2,Element 3,Mixed 4,Null QuestionNo: 24 Which of the following symbol is used to display the less than (<) symbol? 1,&&lt 2,lt 3,lt; 4,&&lt; QuestionNo: 25 Which of the following elements will you use to allow a user to use either the OLLEGE element or the SCHOOL element? 1,xsd:sequence 2,xsd:all 3,xsd:choice 4,xsd:group QuestionNo: 26 Which of the following code snippets 1,<EMPLOYEE EMPNO="E001"> <EMPNAME> James Williams </EMPNAME> <EMPADD> <STREET> Lions Street <CITY> YEE> 2,<EMPLOYEE EMPNO= E001 /> <EMPNAME> James Williams </EMPNAME> <EMPADD> <STREET> Lions Street <CITY> YEE> 3,<EMPLOYEE EMPNO=E001> <EMPNAME> James Williams </EMPNAME> <EMPADD> <STREET> Lions Street <CITY> YEE> 4,<EMPLOYEE EMPNO= E001 > <EMPNAME> James Williams </EMPNAME> <EMPADD> <STREET> Lions Street <CITY> yee> is well-formed? BOSTON </CITY> </STREET> </EMPADD> </EMPLO C

BOSTON </CITY> </STREET> </EMPADD> </EMPLO

BOSTON </CITY> </STREET> </EMPADD> </EMPLO

BOSTON </CITY> </STREET> </EMPADD> </emplo

QuestionNo: 27 Which of the following code snippets is well-formed? m 1,<PURCHASE PONUM= P001 > <PRODUCT CATEGORY= STATIONERY NAME= PEN ORDQTY= 200 >

</PURCHASE> 2,<PURCHASE PONUM= <PRODUCT CATEGORY= </PURCHASEDET> 3,<PURCHASE PONUM= <PRODUCT CATEGORY= </PURCHASE> 4,<PURCHASE PONUM= <PRODUCT CATEGORY= </PURCHASE>

P001 > STATIONERY P001 > STATIONERY P001 > STATIONERY

NAME= PEN NAME= PEN NAME= PEN

ORDQTY= 200

/>

ORDQTY=200 /> ORDQTY= 200 />

QuestionNo: 28 Which of the following XML documents will successfully load in the browser? 1,<DOCUMENTATION><SECTION NAME= SECTION1 > <INSTRUCTION>If number of users greater than 80, please follow the instructions given in Section 2 of this document </DOCUMENTATION></INSTRUCTION></SECTION> 2,<DOCUMENTATION><SECTION NAME= SECTION1 > <INSTRUCTION>If number of users greater than 80, please follow the instructions given in Section 2 of this document</SECTION></INSTRUCTION></DOCUMENTATION> 3,<DOCUMENTATION><SECTION NAME=SECTION1> <INSTRUCTION>If number of users greater than 80, please follow the instructions given in Section 2 of this document</INSTRUCTION></SECTION> </DOCUMENTATION> 4,<DOCUMENTATION><SECTION NAME= SECTION1 > <INSTRUCTION>If number of users greater than 80, please follow the instructions given in Section 2 of this document</INSTRUCTION></SECTION> </DOCUMENTATION> QuestionNo: 29 Consider the following code snippet: <STUDENTREC stdid= S001 > This is a record for a student. <STUDNAME> Alice Peterson <FEES> $2000 </FEES> </STUDNAME> </STUDENTREC> In the given code, the content of the STUDENTREC element is of which type? 1,Element 2,Mixed 3,Character 4,Empty QuestionNo: 30 Which of the following code snippets can be considered well-formed? 1,<EMPLOYEE empid=e01> <EMPNAME> James Peterson</EMPNAME> <BASICPAY> $2000 </BASICPAY> </EMPLOYEE> 2,<EMPLOYEE empid= e01 > <EMPNAME> James Peterson<BASICPAY> $2000 </EMPNAME> </BASICPAY> </EMPLOYEE> 3,<EMPLOYEE empid= e01 > <EMPNAME> James Peterson<BASICPAY> $2000 </BASICPAY></EMPNAME> </EMPLOYEE> 4,<EMPLOYEE empid= e01 > <EMPNAME> James Peterson<BASICPAY> $2000 </BASICPAY></EMPNAME>

</employee> QuestionNo: 31 Which of the following tasks CANNOT be performed through a style sheet? 1,Creating labels and headings 2,Sorting content 3,Implementing filters 4,Specifying attributes for entities QuestionNo: 32 Which of the following is the correct syntax to associate the CSS with the XML document? 1,<?xml-stylesheet type="text/css" href="path-name"?> 2,<?stylesheet type="text/css" href="path-name"?> 3,<xml-stylesheet type="text/css" href="path-name"?> 4,<?xml-stylesheet type="text/css" "path-name"?> QuestionNo: 33 Which of the following is NOT an attribute of the sort element? 1,select 2,order 3,data-type 4,Parent/child QuestionNo: 34 Which of the following is NOT a function provided by XPath? 1,Boolean functions 2,Numeric functions 3,Node-set functions 4,Character functions QuestionNo: 35 Which of the following is NOT a DOM object used for data manipulation? 1,DOMDocument 2,IXMLDOMNode 3,IXMLDOMParse 4,IXMLDOMNodeList

QuestionNo: 36 Which one of the following statements is correct about XSLT? 1,XSLT can format non-textual content only. 2,XSLT cannot reorder, add, delete, or perform operations on elements. 3,XSLT is a superset of CSS. 4,XSLT cannot format non-textual content of XML. QuestionNo: 37 Which one of the following is NOT an XSLT element? 1,xsl:value-of 2,xsl:text 3,xsl:style-sheet 4,xsl:for-each QuestionNo: 38 Consider the following statements: Statement A: The value-of element instructs the XSLT processor to process the in formation for each instance of the specified pattern. Statement B: The sort element has select, order, case-order, and data-type as it s attributes.

Which of the following options is correct about the above statements? 1,Statement A is true and statement B is false. 2,Both statements are false. 3,Both statements are true. 4,Statement A is false and statement B is true. QuestionNo: 39 Consider the following statements: Statement A: XSL consists of XSL Transformations and XML Path. Statement B: CSS is a superset of the XSLT functionality Which of the following options is correct with respect to the preceding statemen ts? 1,Both statements are true. 2,Statement A is false and statement B is true. 3,Statement A is true and statement B is false. 4,Both statements are false. QuestionNo: 40 Consider the following statements: Statement A: Style sheet is used to transform an XML document into resultant tre e structure, which is then used to render the XML document to a specific target. Statement B: Style sheet describes how to present the transformed information. Which of the following options is correct with respect to the preceding statemen ts? 1,Statement A is true and statement B is false. 2,Both Statement A and Statement B are false. 3,Both Statement A and Statement B are True. 4,Statement A is false and Statement B is true.

QuestionNo: 41 The data about books is stored in an XML document. This data needs to be format ted. The data about books priced higher than $100 and all the books priced $75 n eed to be displayed in RED. Which of the following conditional constructs should you use to specify the above criteria? 1,<xsl:if test="PRICE[. > 100 or . = 75]"> 2,<xsl:if test="PRICE[. > 100 and . = 75]"> 3,<xsl:if test="PRICE[. > 100] and PRICE[. = 75]"> 4,<xsl:if test=PRICE[. > 100] or PRICE[. = 75]>

QuestionNo: 42 Select the correct code fragment that should match the elements FIRSTNAME and L ASTNAME to perform the specified action on them. 1,<xsl:template match="FIRSTNAME|LASTNAME"> 2,<xsl:template match="FIRSTNAME [LASTNAME]"> 3,<xsl:template match="FIRSTNAME [@LASTNAME]"> 4,<xsl:template match="FIRSTNAME [@LASTNAME]">

QuestionNo: 43 The data about orders is stored in an XML document. Each order is represented u sing the Order element. The Order element has an attribute named ProductID. You want to extract all Order elements that have a ProductID value of 1. Which of th e following code fragments should you use to do so?

1,<xsl:template match="Order[@ProductID='1']"> 2,<xsl:template match="Order[ProductID= 1 ]"> 3,<xsl:template select="Order[@ProductID= 1 ]"/> 4,<xsl:apply-templates select="@ProductID= 1 "/>

QuestionNo: 44 Which one of the following statements can be used to process the element TICKET ID, having the TICKET element as its ancestor? 1,<xsl:for-each match = "TICKET[TICKETID]" > 2,<xsl:for-each match = "TICKET/TICKETID" > 3,<xsl:for-each select = "TICKETID" > 4,<xsl:for-each match = "TICKET//TICKETID" >

QuestionNo: 45 What will the following XPath expression return? substring-before("2001/07/09","/") 1,/07 2,/09 3,2001/07 4,2001

QuestionNo: 46 Identify the errors in the style sheet template for DRESSDETAILS/DRESS given th at the elements and its children should be displayed in red. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="DRESSDETAILS/DRESS"> <xsl:apply-templates select="DRESSDETAILS/DRESS" /> </xsl:template> <xsl:template match="DRESSDETAILS/DRESS"> <font color="red"> <xsl:apply-templates /> </font = red > </xsl:template> </xsl:stylesheet> 1,The errors in the template are: 1. The color red does not have to be specified in the closure of the font tag. 2. In the first <xsl:template match="DRESSDETAILS/DRESS > tag the value to be matc hed is not correct. 2,The errors in the template are: 1. The color red does not have to be specified in the closure of the font tag. 2. In the second <xsl:template match="DRESSDETAILS/DRESS > tag the value to be mat ched is not correct. 3,The errors in the template are: 1. The color red does not have to be specified in the closure of the font tag. 2. In the first <xsl:apply-templates select="DRESSDETAILS/DRESS" /> tag the valu e to be selected is not correct. 4,The errors in the template are:

1. The color red does not have to be specified in the closure of the font tag. 2. In the second <xsl:apply-templates select="DRESSDETAILS/DRESS" /> tag the val ue to be selected is not correct.

QuestionNo: 47 The following is the default template rule: Line 1: <xsl:template match= "/"> Line 2: <xsl:apply-templates/> Line 3: </xsl:template> Line 4: <xsl:template match="/"> Line 5: <xsl:apply-templates /> Line 6: </xsl:template> Line 7: <xsl:template match="text"> Line 8: </xsl:template> Analyze and identify the error in the preceding code. 1,The code has the following errors: Line 4: The value to be matched is incorrect. The correct value is * . Line 7: The value to be matched is incomplete. The correct value is text() . After line 7 the code statement <xsl:value of select="."> is missing. 2,The code has the following errors: Line 4: The value to be matched is incorrect. The correct value is - . Line 7: The value to be matched is incomplete. The correct value is text* . After line 7 the code statement <xsl:value of select="."> is missing. 3,The code has the following errors: Line 4: The value to be matched is incorrect. The correct value is *. Line 7: The value to be matched is incomplete. The correct value is text (*). After line 8 the code statement <xsl:value of select="."> is missing. 4,The code has the following errors: Line 4: The value to be matched is incorrect. The correct value is %. Line 7: The value to be matched is incomplete. The correct value is text(%). After line 7 the code statement <xsl:value of select="*"> is missing.

QuestionNo: 48 The following code sorts the DRESSCODE, DRESSCATEGORY, and PRICE based on the D ressCO attribute in descending order. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:for-each select="DRESSDETAILS/DRESS"> <xsl:sort select="DressCO" order="DRESSCODE"/> <xsl:text>DressCO: </xsl:text> <font color="blue"><xsl:value-of select="@DRESSCODE"/> </font> <xsl:text> Dress Category: </xsl:text> <font color="green"><xsl:apply-templates select="DRESSCATEGORY"/></font> <xsl:text> Price Per Unit (In U.S. $): </xsl:text> <font color="pink"><xsl:value-of select="PRICE"/></font> </xsl:for-each> </xsl:template> </xsl:stylesheet>

Analyze and identify the errors in the code. 1,The errors in the code are: 1. @ symbol is missing from the sort select statement. 2. The </LI> tag is missing from the <xsl:for-each> declaration. 3. The value of the order parameter is incorrect. 2,The errors in the code are: 1. * symbol is missing from the sort select statement. 2. The </LI> tag is missing from the </xsl:for-each> declaration. 3. The value of the for-each select parameter is incorrect. 3,The errors in the code are: 1. % symbol is missing from the sort select statement. 2. The </LI> tag is missing from the </xsl:for-each> declaration. 3. The value of the sort select parameter is incorrect 4,The errors in the code are: 1. @ symbol is missing from the sort select statement. 2. The </LI> tag is missing from the </xsl:for-each> declaration. 3. The value of the value-of select parameter is incorrect.

QuestionNo: 49 The following code is used to generate a comma separated value listing of the S TUDENTS and STUDENTID elements. <xsl:template match= / > <xsl:for-each select= STUDENTS/STUDENT > <xsl:for-each select="STUDENTID"> <xsl:if test ="position() = =0"> , </xsl:if> <xsl:value-of select="/" /> <xsl:value-of select="/" /> </xsl:for-each> </xsl:for-each> </xsl:template> However, the implementation of the code is unsuccessful. Identify the errors in the code. 1,The code has the following errors: 1. The for-each select parameter is assigned an incorrect value and test conditi on is also incorrect. 2. The value-of select parameters have been assigned incorrect values. 2,The code has the following errors: 1. The template match parameter is assigned an incorrect value. 2. The value-of select parameters have been assigned incorrect values. 3,The code has the following errors: 1. The for-each parameter is assigned an incorrect value. 2. The value-of select parameters have been assigned incorrect values. 4,The code has the following errors: 1. The test condition is incorrect. 2. The value-of select parameters have been assigned incorrect values.

QuestionNo: 50

The following code snippet is written to create a new node called STUDENTGROUP. var myxmldoc = new ActiveXObject("Msxml2.DOMDocument.6.0"); if (myxmldoc.childNodes.length==1) { myroot=myxmldoc.createNode("StudentGroup"); myxmldoc.appendChild(myroot); myxmldoc.save( d:\codedoc.xml ); } However, the implementation of the code fails to create a new node. Identify the error and suggest correction. 1,The code has the following errors: 1. The value for testing the length of the child note is incorrect. The test con dition should check the length to be equal to 0. 2. The parameters passed in the createNode function are incorrect. The correct f unction implementation is createNode(1," StudentGroup "," ") 2,The code has the following errors: 1. The value for testing the length of the child note is incorrect. The test con dition should check the length to be less than 0. 2. The parameters passed in the createNode function are incorrect. The correct f unction implementation is createNode(0," StudentGroup "," ") 3,The code has the following errors: 1. The value for testing the length of the child note is incorrect. The test con dition should check the length to be greater than 0. 2. The parameters passed in the createNode function are incorrect. The correct f unction implementation is createNode(1," StudentGroup ") 4,The code has the following errors: 1. The value for testing the length of the child note is incorrect. The test con dition should check the length to be greater than 1. 2. The parameters passed in the createNode function are incorrect. The correct f unction implementation is createNode( ," StudentGroup "," ")

QuestionNo: 51 Which of the following statements will you use to ensure that the script waits till the XML document gets completely loaded before continuing with the other co de? 1,xmldoc.async = false 2,xmldoc.async = true 3,xmldoc.readystate = 4 4,xmldoc.readystate = false

QuestionNo: 52 Consider the following statements: Statement A: The NodeList object provides the list of nodes present in an XML d ocument for manipulation. Statement B: The NodeList object also enables you to iterate through a collectio n of nodes. Which of the following options is correct with respect to the preceding stateme nts? 1,Statement A is True and Statement B is False.

2,Statement A is False and Statement B is True. 3,Both the Statements are False. 4,Both the statements are True.

QuestionNo: 53 Which of the following statements are NOT true about the DOMDocument object? I)You can use the DOMDocument object to load an XML document, parse it, and vali date it. II)You can use the properties of the DOMDocument object to format data. III)You can use the DOMDocument object to load the schema document associated wi th the XML document. 1,I and II 2,I,II and III 3,II and III 4,I and III

QuestionNo: 54 Which of the following is NOT true about the XMLSchemaCache object? 1,The XMLSchemaCache object is used to hold a collection of schema documents. 2,The XMLSchemaCache object has a property called length, which returns the numb er of schemas that are contained in the schema collection. 3,The XMLSchemaCache object provides a method called add, which adds a new schem a to the collection. 4,The XMLSchemaCache object can contain only a single schema at a time.

QuestionNo: 55 A user writes the following statement in an XSLT style sheet: <xsl:value-of select='sum( COST * ORD)' /> However, when the style sheet is applied to an XML document, the above line caus es an error message to be displayed in the browser. What could be the cause of t he error? 1,The product of COST and ORD returns a numeric value. However, the sum() functi on does not take a numeric value as its parameter. 2,The xsl:value-of element is not closed properly. 3,The sum() function cannot be used within the xsl:value-of element. 4,The select attribute cannot be used with the xsl:value-of element.

Review Time 1. 2. 3. 4. 5. 6. 7. Correct Correct Correct Correct Correct Correct Correct Answer:4 Answer:4 Answer:1 Answer:4 Answer:3 Answer:3 Answer:1

8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55.

Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct Correct

Answer:1 Answer:2 Answer:3 Answer:4 Answer:3 Answer:2 Answer:1 Answer:2 Answer:4 Answer:3 Answer:1 Answer:1 Answer:2 Answer:4 Answer:4 Answer:4 Answer:4 Answer:3 Answer:1 Answer:4 Answer:4 Answer:2 Answer:3 Answer:4 Answer:1 Answer:4 Answer:4 Answer:3 Answer:3 Answer:3 Answer:4 Answer:3 Answer:3 Answer:1 Answer:1 Answer:1 Answer:4 Answer:4 Answer:1 Answer:1 Answer:1 Answer:4 Answer:1 Answer:1 Answer:4 Answer:3 Answer:4 Answer:1

You might also like