Program for implement xslt, xquery, dtd, xml schema and rdf, Programming Languages

Assignment Help:

The aim of this task is to gain experience in using the popular Web languages XSLT, XQuery, DTD, XML Schema and RDF.

The Content:

The University is organizing a stage show where one of the Shakespeare's plays will be performed. The Tragedy of Romeo and Juliet and The Comedy of Errors are the two plays short listed for this show. The scripts of both of the plays are available in XML files, romeojuliet.xml and comedy.xml. Both of these documents satisfy the DTD, play.dtd. To help in making the final selection, a number of tasks have to be completed.

Tasks

For each of the first two tasks, you are required to separately provide i) a solution using XQuery and ii) a solution using XSLT to carry out the required task.

 

  • Task 1:

You need to produce an overview of each play, in a new XML document. This new document should satisfy overview.dtd. More specifically, your solution should be able to transform the document romeojuliet.xml into romeojulietnew.xml, where the latter conforms to the DTD overview.dtd. Your solution should also be capable of transforming comedy.xml into comedynew.xml, where the latter satisfies overview.dtd.

  • Task2: In order to understand the work load of the actors and actresses in each play, generate an HTML document that summarises roles of all PERSONA, excluding those in using the following format:

???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Play Name

 

Persona

Name

Persona

Description

No. of

Scenes

No. of

Speeches

No. of

Lines

Avg. No. of

Lines per Speech

 

.

.

.

 

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

 

Persona with the most number of lines

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Persona with the least number of lines

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

Assume that only a single play will be given as input for the XQuery/XSLT. Assume also that the 'Avg No.' in the last column must be a rounded up integer (i.e. use the ceiling function).

  • Task 3: XML documents are not very appropriate for reading by people. Mostbrowsers support XSLT to transform XML documents. Write an XSLT transformation that can transform these plays (romeojuliet.xml and comedy.xml) into an HTML document which is more readable and more suitable for viewing in a browser.
  • Task 4 : Consider your answers of Tasks 1-3. Compare the language features of XSLT and XQuery which made it easy/difficult in performing the above tasks.
  • Task 5: You are asked to assess the usability of the XML format being used for the plays. Explain why it is complicated to perform general queries over these XML documents. Propose i) a new DTD, and ii) a new XML Schema for these plays. The new DTD and Schema should be designed to make querying/transformation tasks simpler. Explain why your DTD and Schema are superior to play.dtd.
  • Task 6 : Draw an RDF graph diagram describing the following information about

the plays of Shakespeare. Also provide an XML serialisation of your RDF diagram.

- Shakespeare was a man who liked books.

- The Comedy of Errors and Romeo and Juliet are plays authored by Shakespeare.

- Romeo and Juliet is both a funny and a sad play.

- Dana and Sarah are computer science students who don't enjoy Romeo and Juliet, but do enjoy The Comedy of Errors.

Transformation Execution/Query Processing:

You can use the SAXON processor, which can process queries in XQuery and transformations in XSLT. It is available in the directory /home/subjects/621/local/apps on our systems, or you can download it from the project Web page. The usage is:

  • XSLT: java -cp saxon.jar net.sf.saxon.Transform [xmlfile] [xslfile] > [output]
  • XQuery: java -cp saxon.jar net.sf.saxon.Query [xqlfile] > [output]

Other processors are also fine to use, but it will be your responsibility to ensure that they work.

 


Related Discussions:- Program for implement xslt, xquery, dtd, xml schema and rdf

Programming assignment, The fancy new French restaurant La Food is very p...

The fancy new French restaurant La Food is very popular for its authentic cuisine and high prices. This restaurant does not take reservations. To help improve the efficiency of t

Program to produce the given output , Given a file named maze1.txt whose co...

Given a file named maze1.txt whose contents is 1 0 2 2 1 2 3 0 3 2 2 1 2 0 2 2 3 0 1 1 3 1 0 0 2 0 3 0 0 1 2 0 3 2 2 0 1 2 3 2 1 0 0 1 1 0 0 0 your program when run as a.out

Design and implement program, Tamagochi were all the rage in the 90's as a ...

Tamagochi were all the rage in the 90's as a small toy that had limited functionality but modelled a pet. The "owner" could do the following • Feed the pet • Heal the pet

Jsp - quiz, JSP QUIZ ASSIGNMENT SHOULD BE FUNCTIONAL ON ECLIPSE QUIZ HAS ...

JSP QUIZ ASSIGNMENT SHOULD BE FUNCTIONAL ON ECLIPSE QUIZ HAS TOTAL 20 QUESTIONS REGARDING VARIOUS CAPITALS OF COUNTRIES. WELCOME PAGE OFFERS USER TO ENTER HIS NAME. THEN USER C

insertion sort algortihm, Define a higher order version of the insertion s...

Define a higher order version of the insertion sort algortihm. That is define functions insertBy :: Ord b => (a->b) -> a -> [a] -> [a] inssortBy :: Ord b => (a->b) -> [a] ->

C programming, write a function that raises an integer to a positive intege...

write a function that raises an integer to a positive integer power. call the function x_to_the_n taking two integer arguments x and n. have the function return a long int, which r

Shell script print “gm/afternoon/evening”acc to system time, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Matlab, ,how to write matlab program for fast decoupled method

,how to write matlab program for fast decoupled method

Access modifiers, Access Modifiers Convenience Modifiers or we can say (Acc...

Access Modifiers Convenience Modifiers or we can say (Access Specifies) identifies as the opportunity of accessibility of an Item and its associates. All C# kinds and kind associat

Programming logic???, write c++ source code to find the number of digits i...

write c++ source code to find the number of digits in a given integer? pls ans

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd