XML
Question 1 |
Which of the following is TRUE only of XML but NOT HTML?
It is derived from SGML | |
It describes content and layout | |
It allows user defined tags | |
It is restricted only to be used with web browsers |
Question 2 |
Consider the XML document fragment given below:

Consider the XPath expression: *[not (self)::TOC]
What would be the result of the given XPath expression when the current node is Book?
The Title and Content elements | |
The Content and TOC elements | |
The Title and TOC elements | |
The Title, Content and TOC elements
|
Question 3 |
Consider the following XML DTD describing course information in a university:
<!ELEMENT Univ (Course+, Prof+)> <!ELEMENT Course (Title, Eval*)> <!ATTLIST Course Number ID #REQUIRED Instructor IDREF #IMPLIED> <!ELEMENT Title (#PCDATA)> <!ELEMENT Eval (#PCDATA)> <!ATTLIST Eval Score CDATA #REQUIRED> <!ELEMENT Prof EMPTY> <!ATTLIST Prof Name ID #REQUIRED Teaches IDREF #IMPLIED>
What is returned by the following XQuery?
let $as := //@Score for $c in /Univ/Course[Eval] let $cs := $c/Eval?@Score where min($cs) > avg($as) return $c
The professor with the lowest course evaluation | |
Professors who have all their course evaluations above the university average | |
The course with the lowest evaluation | |
Courses with all evaluations above the university average |
Question 4 |
A HTML form is to be designed to enable purchase of office stationery. Required items are to be selected (checked). Credit card details are to be entered and then the submit button is to be pressed. Which one of the following options would be appropriate for sending the data to the server. Assume that security is handled in a way that is transparent to the form design.
Only GET | |
Only POST | |
Either of GET or POST | |
Neither GET nor POST |
Question 5 |
Given below is an excerpt of an xml specification.
Given below are several possible excerpts from "library.dtd". For which excerpt would the above specification be valid?
Question 6 |
Consider an XML file called intro.xml and a document type defintion (DTD) file intro.dtd as follows:
A validating parser will classify intro.xml as
Well-formed and validated | |
Well-formed but not validated | |
Validated but not well-formed | |
Neither validated nor well-formed |
Question 7 |
Given below are several usages of the anchor tag in HTML.
Which of the above are valid?
1 and 2 only | |
1 and 3 only | |
1, 2 and 3 only | |
1, 2, 3 and 4 |
Question 8 |
XSL document | |
XML document | |
XHTML document | |
XQuery document |
1. XPath stands for XML Path Language
2. XPath uses "path like" syntax to identify and navigate nodes in an XML document
3. XPath contains over 200 built-in functions
4. XPath is a major element in the XSLT standard
