Vous êtes sur la page 1sur 18

SAQ01 Which of the following is a rule for creating a wellformed XML document?

1,Every element must have an attribute, which provides additional information about the element. 2,Every XML document must contain parent and child elements. 3,Every empty element must be closed using a forward slash (/) before the closing angular bracket. 4,Elements must overlap. Answer-3 SAQ02 Which component of an XML document is used to provide additional information about elements? 1,Processing instruction 2,Tag 3,Entity 4,Attribute Answer-4 SAQ03 Which component of an XML document provides the information about the encoding scheme used in

the XML document? 1,Processing instruction 2,Element 3,Entity 4,Attribute Answer-1 SAQ04 Which component of an XML document provides a shortcut to a chunk of data? 1,Processing instruction 2,Element 3,Entity 4,Attribute Answer-3 SAQ05 Which of the following statements is true about entities? 1,An entity provides additional information about the elements used in an XML document. 2,An entity is used to identify and describe data in an XML document. 3,An entity is the information that is represented by elements in an XML document.

4,An entity is a name that is associated with a block of data. Answer-4 SAQ06 The details about customers of an e-Commerce portal site are stored in an XML document. Which one of the following should you use to check whether the document conforms to the DTD or not? 1,Expat, which is a validating parser 2,MSXML, which is a validating parser 3,Expat, which is a non-validating parser 4,MSXML, which is a non-validating parser Answer-2 SAQ07 What does the + symbol in the content model in a DTD indicate? 1,An element can occur only once. 2,An element can occur zero or multiple times. 3,An element must occur at least once and there can be multiple occurrences. 4,An element has to occur in a specific order. Answer-3

SAQ08 Which of the following value types allows you to specify a list of valid values that can be assigned to an attribute? 1,ID 2,FIXED 3,Enumerated 4,PCDATA Answer-3 SAQ09 Which of the following is NOT a valid element name? 1,<Student.Data> 2,<Student-Data> 3,<Student_Data> 4,<Student#Data> Answer-4 SAQ10 What does the ? symbol in the content model of an element declaration in a DTD indicate? 1,The element is mandatory and can appear only once in the corresponding XML document. 2,The element can occur zero or multiple times in the corresponding XML document.

3,The element must appear at least once and there can be multiple occurrences of the elements in the corresponding XML document. 4,The element is optional. If used, the element can appear only once within the parent element in an XML document. Answer-4 SAQ11 You want to display the largest integer that is less than or equal to the argument. Which of the following XPath functions will you use to achieve this? 1,ceiling() 2,round() 3,int() 4,floor() Answer-4 SAQ12 Which of the following statements should you use to apply the formatting action to all child elements of a node? 1,<xsl:apply-templates/> 2,<xsl:template match=""/""> 3,<xsl:template match=""*"">

4,</xsl:template> Answer-1 SAQ13 Which one of the following should you use to format data based on conditions? 1,The xsl:if element along with the test attribute 2,The xsl:value-of element along with the select attribute 3,The xsl:value-of element along with the test attribute 4,The xsl:template element along with the match attribute Answer-1 SAQ14 "What will the following XPath expression return? substring-before(""2001/07/09"",""/"") 1,/07 2,/09 3,2001/07 4,2001 Answer-4

SAQ15 Which of the following are the parent elements for the xsl:sort element? 1,xsl:if or xsl:for-each 2,xsl:for-each or xsl:apply-templates 3,xsl:choose or xsl:apply-templates 4,xsl:if or xsl:choose element Answer-2 SAQ16 Which of the following statements correctly states the difference between HTML and XML? 1,HTML focuses on presentation of data, while XML focuses on data as well as the presentation of data. 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 not on how the data is to be presented. m 4,HTML focuses on data as well as its presentation, while XML focuses only on data. Answer-3 SAQ17

"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 format data as per the requirements of the application. Evaluate the above statements. " 1,Statement A is correct and statement B is incorrect. 2,Statement A is incorrect and statement B is correct. 3,Both statements are incorrect. 4,Both statements are correct. Answer-4 SAQ18 "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 correct and the reason is a correct explanation of the assertion. 2,Both, the assertion and the reason, are correct but the reason is not a correct explanation of the

assertion. 3,The assertion is correct and the reason is incorrect. 4,The assertion is incorrect. Therefore, the reason does not apply. Answer-1 SAQ19 "Assertion: Implementing EDI involves high costs. Reason: EDI is built on fixed transaction set. " 1,Both, the assertion and the reason, are correct and the reason is a correct explanation of the assertion. 2,Both, the assertion and the reason, are correct but the reason is not a correct explanation of the assertion. 3,The assertion is correct and the reason is incorrect. 4,The assertion is incorrect. Therefore, the reason does not apply. Answer-2 SAQ20 "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. Evaluate the above statements. " 1,Statement A is correct and statement B is incorrect. 2,Statement A is incorrect and statement B is correct. 3,Both statements are correct. 4,Both statements are incorrect. Answer-3 SAQ21 You want to declare elements for storing student details in an XML document. Student details include STUDENTID and STUDENTNAME. Which of the following statements will you use to declare the required elements in a DTD? 1,<!ELEMENT STUDENT (STUDENTID, STUDENTNAME)> <!ELEMENT STUDENTID (#PCDATA)> <!ELEMENT STUDENTNAME (#PCDATA)> " 2,<!ELEMENT STUDENTID (STUDENTNAME)>

<!ELEMENT STUDENTID (#PCDATA)> <!ELEMENT STUDENTNAME (#PCDATA)> " 3,<ELEMENT STUDENT (STUDENTID, STUDENTNAME)> <ELEMENT STUDENTID (STUDENTNAME)> <ELEMENT STUDENTNAME (#PCDATA)> 4,<!ELEMENT STUDENT (STUDENTID, STUDENTNAME)> <!ELEMENT STUDENTID (@PCDATA)> <!ELEMENT STUDENTNAME (@PCDATA)> Answer-1 SAQ22 "Which of the following statements is correct for naming elements in a DTD? Statement A: An element name can start with an underscore or a colon. Statement B: An element name can contain a hyphen or a period. 1,Statement A is correct and statement B is incorrect. 2,Both statements are incorrect. 3,Both statements are correct. 4,Statement A is incorrect and statement B is

correct. Answer-4 SAQ23 "Statement A: Validating parsers validate an XML document against a DTD and do not check for XML syntax rules. Statement B: Non-validating parsers return an error only when there is a problem with the syntax of the XML document. Evaluate the above statements. 1,Statement A is correct and statement B is incorrect. 2,Both statements are incorrect. 3,Both statements are correct. 4,Statement A is incorrect and statement B is correct. Answer-4 SAQ24 "Statement A: A reference to an internal DTD file is included in the XML document. Statement B: Internal DTD files can be used across multiple documents. Evaluate the above statements. 1,Statement A is correct and statement B is

incorrect. 2,Both statements are incorrect. 3,Both statements are correct. 4,Statement A is incorrect and statement B is correct. Answer-2 SAQ25 Which of the following content models is invalid? 1,<!ELEMENT STUDENT ((NAME, ADDRESS) | DATE_OF_JOINING )> 2,<!ELEMENT STUDENT(NAME, ADDRESS) | (NAME, DATE_OF_JOINING))> 3,<!ELEMENT STUDENT (NAME | ADDRESS | DATE_OF_JOINING) > 4,<!ELEMENT STUDENT (NAME, (ADDRESS | DATE_OF_JOINING) ?)> Answer-2 SAQ26 Which one of the following statements is true 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 style non-textual content. Answer-3 SAQ27 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 Answer-3 SAQ28 Statement A: The value-of element instructs the XSLT processor to process the information for each instance of the specified pattern. Statement B: The sort element has select, order, case-order, and data-type as its attributes. Evaluate the above statements. 1,Statement A is correct and statement B is incorrect. 2,Both statements are incorrect. 3,Both statements are correct. 4,Statement A is incorrect and statement B is correct.

Aswer-4 SAQ29 The data about orders is stored in an XML document. Each order is represented using 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 the 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""/> Answer-1 SAQ30 Which of the following is used to apply a cascading stylesheet to an XML document? 1,<?xml-stylesheet type=""text/css"" href=""file1.css""> 2,<xml-stylesheet type=""text/css"" href=""file1.css"">

3,<?xml-stylesheet type=text/css href=file1.css?> 4,<?xsl-stylesheet type=""text/css"" href=""file1.css""?> Answer-1 SAQ31 Which one of the following statements can be used to process the element TICKETID, 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"" > Answer-4 SAQ32 Customer data stored on a Web server needs to be displayed in a browser window. The user may use any browser to view the data. Which of the following XML DOM methods should be used to convert data stored in an XML document into the HTML format and display it in the browser? 1,transform() 2,createObject()

3,getElementsByTagName() 4,load() Answer-1 SAQ33 John needs to find information about all the customers. The details about customers are stored in an XML document. All information about customers is contained in the element named CUSTOMER. Assuming that John uses JavaScript for writing code, which of the following statements should he use to load all the nodes named CUSTOMER? 1,var xmlnodes=xmldoc.getElementsByTagname(""CUS TOMER""); 2,var xmlnodes=xmldoc.getElementsbyname(""CUSTO MER""); 3,var xmlnodes=xmldoc.getElementsbynodename(""CUS TOMER"") "4,var xmlnodes=xmldoc.getElementsnamed(""CUSTOM ER""); Answer-1

SAQ34 Which of the following expressions retrieves the PRODUCT element, which is a child of the SUMMARY element and has the PRODUCTID attribute with the value P001. 1,SUMMARY/PRODUCT[@PRODUCTID='P001'] 2,SUMMARY/PRODUCT[@PRODUCTID] 3,SUMMARY/PRODUCT[@*] 4,PRODUCT[@PRODUCTID='P001'] Answer-1

Vous aimerez peut-être aussi