Professional Documents
Culture Documents
eXtensible Stylesheet
Language and Cascading
Style Sheets
Scenario of document generation
Web server
2
Layer Model
Processing Layer
Logic Style sheets
Storage Layer
RDBMS XML Repository File System ...
3
Extensible Stylesheet Language
Processing Layer
XSLT-, XSL-FO-Processors, XPath,… XSL stylesheets
Used as integrative
eXtensible Markup Language
data representation
4
XML Path Language (XPath)
Examples:
• child::person[child::name] all children of type “person”
which have a child of type “name”
• /descendant::person[position()=23] selects the twenty third
person in the document (absolute location path) 5
XML Path Language
nodename Selects all child nodes of the node of type “title” selects all child
‘nodename’ elements “title”
XML
Input file
XSLT XML
Processor Output file
XSLT
declarations
(stylesheet)
8
XSL Transformation
Service Requestor
Service Provider
XML SOAP
XSLT Network Service
data envelope
SOAP
style
transformation
document html
<xsl:apply-templates select="chapter"/>
...
<xsl:template match="chapter">
<html:h1>
<xsl:value-of select="title"/>
</html:h1>
<xsl:value-of select="paragraph"/>
</template>
...
transformation
document html
<table>
<tr>
<td>Hawking</td><td>Stephen</td>
<td>Professor</td><td>42</td>
</tr>
<tr>
<td>Newton</td><td>Isaac</td>
<td>Sir</td><td>43</td>
</tr>
</table> 12
XSLT language constructs
13
XHTML generation
XML XSLT
XHTML
document + document
XSL Presentation
+ layout
Stylesheet
CSS
document
14
XHTML generation
XHTML XHTML
web server web browser
XHTML Documents
XML XHTML
web server web browser
XSLT stylesheet
XML XML
web server web browser
XSLT Stylesheet
15
XHTML generation on server
Web browser
1 Request for a dynamically
generated document
1 6
2 Web accessible logic (e.g.
Script code in form of Java
Web server
Server Pages or Active Server
XHTML Pages) is executed on
Script code file application server
3 Load XML and XSL data into
2 5
memory
Application server 4 Pass the XML and XSL data to
4 XSLT processor
a XSLT processor
16
XHTML generation on client
17
XHTML generation on client
Web browser
1 Request for a document and
JavaScript-Engine delivery of this document
XHTML
2 2 Web browser executes
<html> tags
5 JavaScript code
JavaScript-
Code 6 3 JavaScript code loads XML
</html> XML XSL data
4 JavaScript code loads XSL
3 4 data
1
5 The transformation of XML
Web server data to XHTML tags is done
inside the JavaScript-Engine
6 Generated XHTML-tags are
included into the document
that finally can be displayed
18
Transformation on client
19
Client-dependent transformation
Regular
XHTML Scheme web browser
chooses Categorizer request
HTML5 Scheme
Mobile
Client
XSLT Adapted
workflow reply
document
Web server
20
Generating XML
21
XSLT processors
22
XSLT processors
23
CSS 3 - Overview
Pseudo classes
Pseudo classes
div { Page
height: 100px;
width: 100px;
transform:
translate(80px,
80px)
scale(1.5, 1.5)
rotate(45deg);
}
Property Description
transition Shorthand property for defining the four transition
properties into a single property
transition-property Specifies the name of the CSS property to which
the transition is applied
transition-duration Defines the length of time that a transition takes
29
CSS 3 - Transitions
The transition
<html> has a duration
<style> of 1 second
.button { and starts after
background: #500; color: #fff; padding: 7px 10px; 2 seconds
text-decoration: none; modifying all
border-radius: 10px; newly defined
properties in a
box-shadow: 0px 0px 3px #212121;
linear manner.
transition: all 1s linear 2s;
} On mouse-over
.button:hover { (“hover”) the
background: #b00; properties of
box-shadow: 0px 0px 10px #000; the button are
changed in the
}
manner defined
</style> within the
<p><a class="button" href="...">Improved Button</a> transition.
</p></html> 30
CSS 3 – Media Queries
• CSS 3 allows specification of style sheets for different media types and
media characteristics thus enabling designers and developers to create
styles adapted to the capabilities of the presentation media
Logical and
Processing Layer
XSLT
processor
Storage Layer
32
References
Links at W3C:
Further Links
SAX http://www.saxproject.org/
SAXON http://saxon.sourceforge.net/
XALAN http://xalan.apache.org/
XSL Formatter http://www.antennahouse.com/
33