Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

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.

 

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M9524858

Have any Question?


Related Questions in Programming Language

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Background informationthis assignment tests your

Background Information This assignment tests your understanding of and ability to apply the programming concepts we have covered throughout the unit. The concepts covered in the second half of the unit build upon the fun ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As