Unicorn Use Cases
System
The system is composed by the core of UniCORN, that is to say, no module nor output template. The framework itself, no more, no less.
But considering the need of modules and outputs for UniCORN to be useful, we will also use an "extended" system composed of the framework, some observers (CSS validator, Markup validator, link checker) and outputs (xhtml, soap).
Users
There are two types of users:
- Framework maintainers are the ones who create new output formats, or new observers. It will probably be people working at/for the W3C.
-
Those who will use
UniCORN
as a tool to check documents. They can also be separated in two:
- humans beings
- computers doing automatic validation/check
Humans will mostly use the Web interface to check documents, whereas computers will build the request directly and get a "computer readable" document (in SOAP for example).
Framework maintainers use cases
Adding a new observer
A framework maintainer might need to add new micro-observers (when a new recommendation is out for example).
- First, he will have to create the observer corresponding to the need and having output format compatible with the framework (it specification will be available here).
- Then, he has to create the contract document in order to plug the observer in the framework. The contract format specification will also be available.
- The maintainer adds the location of the WADL and RDF contract files in a UniCORN's configuration file.
- Finally, the maintainer creates a task for this observer, or extends existing ones.
- The framework reads the new contract and includes the observer in its observers list, same thing for the tasks (maybe after a restart, or a command issued by the maintainer).
Adding a new output format
New recommendations imply new output formats. So, the maintainer will have to build new output templates. To do so, it's quite "simple". He needs to create a new template page:
- According to the template and output format specifications, he builds the new template.
- He places the new template in the templates directory.
- The framework discovers the new output format and makes it available for the users.
Users use cases
In this part we will use the extended system, because if we consider only the framework, the user won't be able to do anything, since the framework provides as many services as there are observers and output templates: zero observer means zero service.
Single observer
- A user comes on the framework webpage
- He enters the URL of a document in the URL text box
- He selects a task that will involve a single observer: the markup validation for example
- The framework displays a list of parameters for this task
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework validates the document against XHTML specification, using the XHTML observer
- It returns the result of the validation in a new webpage
Output format selection
- A user comes on the framework webpage
- He enters the URL of a document in the URL text box
- He selects the output format: SOAP
- He selects a task that will involve a single observer: the markup validation for example
- The framework displays a list of parameters for this task
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework validates the document against XHTML specification, using the XHTML observer
- It returns the result of the validation in as a SOAP document
Multiple observers
- A user comes on the framework webpage
- He enters the URL of a document in the URL text box
-
He selects the task HTML+CSS+Links which involves three observers:
- XHTML validation
- CSS validation
- Link check
- The framework displays a list of parameters
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework validates the document against XHTML and CSS specifications, using XHTML and CSS observers, and checks the links through the link checker observer
- It returns the result of the validations and check in a new webpage
File upload
- A user comes on the framework webpage
- He clicks on the browse button of the "Validate by file upload" section and selects the XHTML document he wants to test in the File Chooser.
-
He selects the task HTML+CSS+Links which involves three observers:
- XHTML validation
- CSS validation
- Link check
- The framework displays a list of parameters
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework downloads the document and tries to guess it's type (xml, html, css, ...). It finds it is an XHTML document
- The framework validates the document against XHTML and CSS specifications, using XHTML and CSS observers, and checks the links through the link checker observer
- It returns the result of the validations and check in a new webpage
Direct input
- A user comes on the framework webpage
- He writes an XHTML fragment in the "Direct input" section's textarea. The fragment is complete (has a doctype declaration).
-
He selects the task HTML+CSS+Links which involves three observers:
- XHTML validation
- CSS validation
- Link check
- He selects the MIME-type of the code, so that the framework can know what type of document it is
- The framework displays a list of parameters
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework validates the document against XHTML and CSS specifications, using XHTML and CSS observers, and checks the links through the link checker observer
- It returns the result of the validations and check in a new webpage
Advanced interface
- A user comes on the framework webpage
- He enters the URL of a document in the URL text box
-
He selects the task HTML+CSS+Links which involves three observers:
- XHTML validation
- CSS validation
- Link check
- The framework displays a list of parameters
- The user clicks on the "More parameters" link in the CSS validation section
- More parameters appear in the CSS validation section
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework validates the document against XHTML and CSS specifications, using XHTML and CSS observers, and checks the links through the link checker observer
- It returns the result of the validations and check in a new webpage
Language selection
- A user comes on the framework webpage
- He selects the language he prefers
- The webpage is reloaded with the new language
- He enters the URL of a document in the URL text box
- He selects the task he wants to activate: XHTML in that case
- The framework displays a list of parameters for this task
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework validates the document against XHTML specification, using the XHTML observer
- It returns the result of the validation in a new webpage, in the selected language
Incompatible checks
- A user comes on the framework webpage
- He enters the URL of a CSS document in the URL text box
-
He selects the task HTML+CSS:
- XHTML validation
- CSS validation
- The framework displays a list of parameters
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework validates the document against CSS specification using the CSS observer, but can't validate it against XHTML specification.
- It returns the result of the validation in a new webpage.
Input redirection
- A user comes on the framwork webpage
- He clicks on the browse button of the "Validate by file upload" section and selects the XHTML document he wants to test in the File Chooser.
- He select the task "CSS validation".
- The framework displays a list of parameters
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework check mime type of the document and found it doesn't handle by CSS observer with this input method.
- The framework find about another input method which CSS observer can handle this mime type and found the URI input method.
- The framework redirect input from upload to uri input method and returns the result of the validation in a new web page.
Error use cases
Resource not found
- A user comes on the framework webpage
- He enters the URL of a document in the URL text box
- He selects the task he wants to activate: XHTML in that case
- The framework displays a list of parameters
- The user sets the parameters he wants
- He pushes the "Check" button
- The framework does not find the document at the specified URL
- It reports the error in a new webpage
