1. 1.Design a detailed xml schema for managing campus placement data including
constraints -8
such as a studnt being able to get only one t1/t2 offer,not being able to attend
interviews after accepting an offer.
2.create 2 diff ns having common name for elements and show how ns can b used in
the xml doc which uses both the ns. - 10
how is this situation handled in relational databases
3.how is data in xml different from data from relational databases tables. -4
4.what are the limitations of DTD?Show how these limitations are overcommed in
ML Schema.Illustrate with examples. -10
5.Given an XML
<employees>
<person>
<firstname>..
<lastname>..
<dob>..
<address>..
</person>
<person>
<firstname>..
<lastname>..
<dob>..
<address>..
</person>
</employees>
Write the xslt using the xpath expressions to find all nodes in
decendent access + the context node,context node is the first person element.
6.what si a predicate in an xpath expression give example.
7.write a line for each of the following xpath functions:
position()
translate()
starts-with()
8.Given an xml as shown below
<?xml..>
<bookstore>
<book catagory="cooking">
<title>..</title>
<author>..</author>
<year>..
</book>
<book catagory="web">
<title>..</title>
<author>..</author>
<year>..
</book>
<book catagory="children">
<title>..</title>
<author>..</author>
<year>..</year>
</book>
<book catagory="web">
<title>..</title>
<author>..</author>
<year>..
</book>
2. </bookstore>
write an xquery to generate the following o/p
<book count="3">
<book>
<title author="">..</title>
</book>
<book>
<title author="">..</title>
</book>
<book>
<title author="">..</title>
</book>
<book>
Display only those books whose year is greater than 2005
Books hav to be ordered by catagory(accending)
Where ever the catagory is same for books elements they have to be
ordered by title(decending)
-4
9.Write an xml documnt and corresponding xml schema doc for the following
requirement.
*root elem purchase order has attribute name "ordered" type is
string(required).Pattern is PID followed by 6 digits.(ex: orderid="PID123456")
*purchase order has sequence in following order ..
order person(type:String) ,
shippedto(String),
item(occurs atleast once and has following
sequence:
itemtype(type:enumeraton possible values are book,electronics,furniture
default:book),
itemcode(type:string pattern: 3chars upper and lower case alphabets and
digts ..... second part is '-' followed by exactly 5 digits),
description(type:string occurs 0/1 times),
Quantity(type:positiveinteger range:5-100).