Date post: | 30-Dec-2015 |
Category: |
Documents |
Upload: | shona-craig |
View: | 217 times |
Download: | 1 times |
DSpace in general
A digital library tool useful for storage, maintenance, and retrieval of digital documents
Two types of interaction:– Command line for administrative use– Automatically generated user interface
The original DSpace Interface
http://txspace.tamu.edu/dev/
Automatically created upon installation and deployment
Fully functional from the onset
Dynamically generated through an interaction between Java Servlets and Java Server Pages
The original DSpace Interface (cont.)
1. HTTP Request– Tomcat identifies the Java
servlet2. Java Servlets
– Processes form data– Determines flow control– Invokes the JSP Manager
3. JSP Manager– Calls and applies the JSP
pages4. JSP Pages
– Create the HTML5. HTTP Response
– Transmits HTML to the user
DSpace
Java Servlets
JSP Manager
HTTP Request
HTTP Response
JSP Pages
Editing The JSPs
The JSPs are stored in the DSpace source directory under the /jsp subdirectory
They can be edited by– Copying the .jsp file to be edited into the
/jsp/local subdirectory– Modifying it as needed
The changed JSP will override the one that came with the installation
Issues with the JSP DSpace Interface
JSP pages create the HTML directly, in most cases complete with the styling information
There is one JSP page for each DSpace page, so changes to all of DSpace require modification of most JSP’s
http://txspace.tamu.edu/
The XML based DSpace Interface
http://txspace.tamu.edu/dev-xml2/
DSpace XML UI is generated through an interaction between Java Servlets, XML Objects, XSLT styling language and Cascading Style Sheets– Java Servlets and XML Objects create an XML document
describing a DSpace page– XSLT transforms the XML into HTML– The HTML is rendered using styling rules provided by CSS
XML Based DSpace Interface (cont.)
The end result of JSP based UI is the HTML that will be sent to the browser
The end result of XML based UI is an XML document that contains all the information necessary to build a DSpace page, but none of the visual formatting
The themes are then used to convert the XML into HTML and apply styling rules to it
XML Based DSpace Interface (cont.)
1. HTTP Request– Tomcat identifies the Java servlet
2. Java Servlets– Processes form data– Determines flow control– Instantiates the XML Object
3. XML Manager– Creates the XML Document– Calls the XML Object
4. XML Object– Inserts content into the document
5. Theme Manager– Determines the theme– Applies the theme
6. HTTP Response– Outputs the resulting XML
document
DSpace
Java Servlets
XM
L O
bje
cts XML
Manager
ThemeManager
themes.xml
HTTP Request
HTTP Response
Modifying the DSpace XML UI
You do not edit the Java side of DSpace
Modifications are instead performed on the XSLT and CSS.
HTTP Response
XSLTTemplat
es
XMLDocume
nt
CSSRule
s
HTMLDocume
ntFinal
Output
The XMLXML, or eXtensible Markup Language, is a data storage format
The XML Document generated by the Java Servlets doesn’t do anything on its own
Since it serves as a base for a DSpace page, it is also the same between all themes– http://txspace.tamu.edu/dev-xml2/?theme=intro&XML
– http://txspace.tamu.edu/dev-xml2/?theme=sapphire&XML
– http://txspace.tamu.edu/dev-xml2/?theme=ruby&XML
– http://txspace.tamu.edu/dev-xml2/?theme=space&XML
page
meta optionsbody
trail
item
userAgent
browserVersion
browserType
user
contextPath
title search browse
actions
administrative
language
item
item
item
item
section
tabular
form
link
label label
para
help
emphasize
list
columns
emptyText
pagination
row
label
column
image
item
image
value
params
field
division
label
label
fieldGroup
pagination
*
* * *
λ
*
*
*
*
* * *
*
*
*
*
*
*
*
*
*
*
*
*
λ λ
λ
λ
λ
λ λ
1
1
1
1
1
1
11 1
1
11
1
1
context
item*
λ
0,1 0,1
0,1
0,1
DSpace XML UI Schema
Gray Language element 1 Must be one 0,1 May be one λ May be one group * None or many
Le
ge
nd
labelλ
cell
label
option*
firstName
id
logoutUrl
lastName
lang*
0,1
0,1 0,1
0,1
0,1
The XSL
XSL, or the eXtensible Stylesheet Language, is used to transform the XML data into HTML
It does so through template matching, which applies rules to and generates HTML for matching XML tags
A base library exists to convert XML into HTML that be used or extended by each theme
http://txspace.tamu.edu/dev-xml2/themes/
The CSS
The output of XSL transformations is HTML that can be output and rendered in a browser
It still, however, lacks any visual stylinghttp://txspace.tamu.edu/dev-xml2/?theme=space
Cascading Style Sheet rules can be applied to the HTML to render it graphicallyhttp://txspace.tamu.edu/dev-xml2/?theme=intro
http://txspace.tamu.edu/dev-xml2/themes/intro/main.css
Overall
Most of the visual changes are done in CSS
XSLT templates can also be overridden to make structural modifications
Finally, the theme manager can be configured to apply certain themes to specific DSpace components
HTTP Response
XSLTTemplat
es
XMLDocume
nt
CSSRule
s
HTMLDocume
ntFinal
Output
To recap…
All DSpace pages are boiled down to single XML formatThemes, which are combinations of a CSS style sheet and XSLT templates, convert the XML to styled HTMLDifferent themes can be applied to different subset of DSpacehttp://di.tamu.edu/dspace-xmlui/
References
XML Tutorialhttp://www.w3schools.com/xml/default.aspHTML Tutorialhttp://www.w3schools.com/html/default.aspCSS Tutorialhttp://www.w3schools.com/css/default.aspXSLT Tutorialhttp://www.w3schools.com/xsl/default.asp