首页 > > 详细

讲解CO3098/CO7098、辅导Java程序设计、讲解XML Parsing、Java编程辅导 辅导留学生 Statistics统计、回归、

CO3098/CO7098
Coursework 1
XML Schema, XSLT and XML Parsing
Important Dates:
Handed out: 9-Oct-2018
Deadline: 29-Oct-2018 at 23:59 GMT
The deadline is strict and will not be changed. Please ensure that you submit your work in time.
This coursework counts as 10% of your final mark.
Please read guidelines on plagiarism in the study guide and course documentation.
This coursework requires knowledge about XML Schema, XSLT and DOM/SAX Parsing
Please submit a signed coversheet electronically.
Data Description
Consider an XML document (RESTController.xml):


uk.ac.le.cs.wt

Remote

java.rmi.Remote
java.rmi.RemoteException
java.net.*

public

user
password
serverAddress


RemoteException
SecurityException

boolean


public

link

void


This XML document represents a Java interface below:package uk.ac.le.cs.wt;
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.net.*;
interface RESTController extends Remote{
public boolean authenticateUser(String user, String password, InetAddress serverAddress)
throws RemoteException, SecurityException;
public void activateUser(URL link);
}
Tasks:
Task 1: [35 Marks]
Write an XML Schema (RESTController.xsd) that allows validation of the provided XML
document. Note that the schema must be consistent with these rules in Java:
An interface may extend one or many interfaces.
There can be only one package statement
There can be zero to many import statements
An interface can have zero to many abstract methods
A method only allows one value to be returned (or void)
A method can only have zero or one visibility modifier *
A method can accept zero to many arguments
Exception(s) may be thrown from a method
* If a method has no visibility modifier then it is accessible only within its own package (default
visibility); assuming all methods are non-static.
Task 2: [30 Marks]
Write an XSLT stylesheet (RESTController.xslt) that takes the provided XML document as input
and generates an HTML document as follows:
(Note: You may show the result in a different page layout or colour scheme. The page must display
the controller id, return type and the parameter list of each method)Task 3: [35 Marks]
Write a Java program that reads the XML above and produces an output as follows. Please choose
an appropriate parsing technology (DOM/SAX).
public boolean authenticateUser(String user, String password, InetAddress serverAddress)
throws RemoteException, SecurityException;
public void activateUser(URL link);
(Note: You need to implement either XMLParserDOM.java or XMLParserSAX.java)
Submission
Zip all files in a single zip file for submission.
o RESTController.xsd
o RESTController.xslt
o XMLParserDOM.java (or XMLParserSAX.java, depending on your choice)
The archive should be named CO3098_CW1_email_id.zip or CO7098_CW1_email_id.zip
(e.g. CO3098_CW1_yh37.zip).
Your submission should also include a completed coursework plagiarism coversheet (signed PDF or
image). You need to submit the zip file via Blackboard and you are allowed to re-submit as many
times as you like before the deadline. Marks for any coursework which does not have the
accompanying cover sheet will be withheld till you provide one.
Note: apart from the XML document above, we might use other XML instance documents as the
test suite for assessing task 1, 2 and 3. Your schema and the XPATH used in your XSLT should also
work for these XML documents)

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!