You are on page 1of 6

n tp XML

1. Which of the following XML code snippets is/are correct? a. <BOOK> <AUTHOR> abc.. <AUTHOR> </BOOK> b. <BOOK> <AUTHOR> abc </BOOK> </AUTHOR> c. <BOOK> <AUTHOR> abc.. </AUTHOR> </Book> d. <BOOK> <AUTHOR> abc</AUTHOR> </BOOK>
2.

Which of the following are valid tags? a. b. c. d. <:APTECH> <APTECH_LTD> <APTECH LTD> <_APTECHLtd>

3. Which of the following defines what is meant by a valid document? a. A document which meets the XML 1.0 specification b. A document which is well-formed c. A document which conforms to the rules of a DTD d. A document which starts with the declaration <?xml version="1.0"?> 4. Which of the following is/are optional in the creation of an XML file? The <?xml version="1.0"?> statement b. The root element c. The opening tag in an element d. Entities
a.

5. Which of these is a valid comment in XML: a. <!-This is a sample XML document> b. <?This is a sample XML document?> c. <!-This data should be hidden <FIRSTNAME>Joe</FIRSTNAME> <LASTNAME>Johnson</LASTNAME> -->

d. <?--This is a sample XML document--> 6. Which of these characters can be included within the text in an XML document in literal form? a. b. c. d. > ; : -

7. The entities that are used only in DTDs are referred to as a. b. c. d. Internal entities External entities Parameter entities General entities

8. Which of the following statements is not true? a. The <!DOCTYPE [] > declaration follows the XML declaration b. Entities that appear anywhere in an XML document are referred to as Parameter entities c. Attributes are added to an element to provide information about the element d. Entities must be declared within the document DOCTYPE declaration 1. Which statements are true? a. The DTD specifies the grammatical structure of an XML document. b. The DTD contains the list of tags allowed within the XML document, and their types and attributes. c. The DTD does not define the way elements relate to one another within the documents tree structure. 2. An XML document, which conforms to its DTD, is called a: a. b. c. d. Well formed Document Valid Document Complete Document XSL Document

3. What does the keyword SYSTEM indicate in the following code? <?xml version =1.0?> <!DOCTYPE Book SYSTEM book.dtd> a. b. c. d. It is a system generated DTD Book.dtd is an internal DTD Book.dtd is an external DTD Book is a system variable

4. What is the significance of the + sign in the code given below?

<!ELEMENT BOOK (AUTHOR+)> a. b. c. d. Indicates that AUTHOR tag can occur zero or more times inside the BOOK element Indicates that AUTHOR tag must occur atleast once inside the BOOK element Indicates that AUTHOR tag can occur zero or one time inside the BOOK element Indicates that multiple AUTHOR tags can occur inside the BOOK element

5. What is the significance of the ? sign in the code given below? <!ELEMENT BOOK (AUTHOR?)> a. b. c. d. Indicates that AUTHOR tag can occur zero or more times inside the BOOK element Indicates that AUTHOR tag must occur atleast once inside the BOOK element Indicates that AUTHOR tag can occur zero or one time inside the BOOK element Indicates that multiple AUTHOR tags can occur inside the BOOK element.

6. #REQUIRED attributes value means: a. The attribute value does not have to be included b.The attribute value is fixed c. The attribute value must be included in the element d.The attribute value is provided by default 7. Namespaces are defined using a. b. c. d. DTDs xmlns:[prefix] attribute namespace attribute Scoping

1. Which of these statements is/are true: a. An XML document can have multiple style sheets. b. While an XML document contains the data, the style sheet takes care of the presentation c. XML can be displayed only using XSL, and not CSS d. The advantage of CSS over XSL is that using CSS, values can be stored in variables and decision structures can also be included. 2. Which of these is the correct syntax to link a CSS file to an XML document? a. b. c. d. <?xml type="text/css" href="url"?> <?xml-stylesheet type="text/css" href="url"/> <?xml-stylesheet type="text/css" href="url"?> <?xml-css href="url"?>

3. In CSS, when a style is applied to an element containing other elements inside it, a. The style is applied to the element and all the other elements contained in it b. The style is applied only to the main element c. The style is applied only to the child elements d. The user is prompted with a message enquiring whether the style is to be applied to the child elements as well

4. If there are 3 elements such as <A>, <A1> and <A2>, how can the same format be provided
to all three elements using CSS? a. b. c. d. . 5. Which of these is the correct syntax to link an XSL file to an XML document? a. b. c. d. <?xmls type="text/xsl" href="candidate.xsl"?> <?xml-stylesheet type="text/xsl" href="candidate.xsl"?> <?xsl type="text/xsl" href="candidate.xsl"?> <?xml:xsl href="candidate.xsl"?> A, A1, A2 {[insert style declarations here]} <xsl: A, A1, A2 {[insert style declarations here]} <xsl:template match= A | A1 | A2> <xsl:template A | A1 | A2>

6. What does the following entry in an XSL file signify: <xsl:template match= / | *>

a. The template is to be applied to all elements which

contains the character * b. The template is to be applied to the whole document c. The template is to be applied to all the nodes in the document d. The template is to be applied to all elements which contains the character / 7. Which of the following needs to be used for switching styles without having to submit the page back to the server and waiting for the page to be reloaded? a. Style sheets b. Templates c. Data Islands Namespaces.

d.

8. Besides, <xsl:import>, which of these can be used to import a style sheet? a. <xsl:input>

b. <xsl:getsheet> c. <xsl:include> d. None of the above 1. With reference to the snippet of code given below, choose the correct syntax to complete the second line in order to create a XML Document Object .. var sample sample = ________________________ a. CreateXMLDocument() b. new ActiveXObject("microsoft.XMLDOM") c. NewXMLDocument d. New XMLDOMObject 2. Which event of the DOMDocument object fires every time a new chunk of data arrives? a. b. c. d. whendataarrives ondataarrival ondataavailable whendataavailable

3. Which object represents the top level of the XML source? a. b. c. d. XML DOMParent DOMDocument None of the above

4. Which of these events is supported by the XMLDOMNode object? a. b. c. d. onDataEntry onValidated onError It does not support any events

5. Most DOM objects such as XMLDOMAttribute, XMLDOMElement, XMLDOMEntity, XMLDOMComment etc have several common methods and properties since they are inherited from a common object. Which object is it? a. b. c. d. DOMDocument XMLDOMNode XMLDOMText XMLDOMMain

3. Which of these properties (of the XMLDOMParseError object) can be used to find out details about an error? a. b. c. d. Line Linepos sourceTxt Reason

1. State which of these elements is/are True: a. DTDs are written in a non-XML syntax. b. DTDs are extensible. c. XML Schema has support for namespaces. d. XML Schemas follow a closed content model as well as Open and Refinable models 2. Which of these data types are basetypes using which additional data types can be generated? a. b. c. d. number integer boolean time

3. Which one of the following is the root element of all XML Schema documents? a. AttributeType b. ElementType c. description d. Schema 4. Which are the two attributes of the Schema element? a. b. c. d. xml and xmlns name and namespace name and xmlns name and urn

You might also like