TEI Stylesheet family - textstructure.xsl

## The Text Encoding Initiative

# TEI Consortium XSLT stylesheets

Home | Guidelines | Projects | Tutorials | Software | History | FAQs | P5 | Consortium | Activities | SIGs | Join in/Contact | Members area
Stylesheet home page Summary Stylesheet List Template List

# textstructure.xsl

TEI stylesheet dealing with elements from the textstructure module, making HTML output.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA xs
Author:
See AUTHORS
CVS Id:
textstructure.xsl 4849 2008-10-22 22:14:53Z rahtz
Copyright:
2008, TEI Consortium

## Match Templates Summary

/ - source
Process elements /
tei:docAuthor (mode: author) - source
Process elements tei:docAuthor in "author" mode"
tei:* (mode: generateNextLink) - source
Process elements tei:*
tei:* (mode: generatePreviousLink) - source
Process elements looking for something to link to backwards
tei:body (mode: inner) - source
Process elements tei:body in inner mode
* (mode: innertext) - source
Process elements * in inner mode
* (mode: paging) - source
Process elements * in paging mode
processing-instruction()[name()='xmltex'] - source
Process elements processing-instruction()[name()='xmltex']
tei:TEI (mode: split) - source
Process elements tei:TEI
tei:body|tei:back (mode: split) - source
Process elements tei:body|tei:back
tei:TEI - source
Process elements tei:TEI
tei:closer - source
Process elements tei:closer
tei:dateline - source
Process elements tei:dateline
tei:div1[@type='letter']|tei:div[@type='letter'] - source
Process elements tei:div*, @type='letter'
tei:divGen[@type='actions'] - source
Process elements tei:divGen[@type='actions']
tei:divGen[@type='toc'] - source
Process elements tei:divGen[@type='toc']
tei:div[@type='canto'] - source
Process elements tei:div[@type='canto']
tei:div[@type='epistle'] - source
Process elements tei:div[@type='epistle']
tei:div[@type='frontispiece'] - source
Process elements tei:div[@type='frontispiece']
tei:div[@type='illustration'] - source
Process elements tei:div[@type='illustration']
tei:div|tei:div0|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6 - source
Process elements tei:div|tei:div0|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6
tei:docTitle|tei:docAuthor|tei:docImprint|tei:docDate - source
Process elements tei:docTitle, docAuthor, docImprint and tei:docDate
tei:floatingText - source
[html]
tei:list[@type='sidebar'] - source
[html] bypass sidebar lists in normal mode
tei:opener - source
Process elements tei:opener
tei:text - source
Process elements tei:text
tei:titlePage - source
Process elements tei:titlePage
tei:* (param: xpath, actionmode: xpath) - source
Process any element in xpath mode

## Named Templates Summary

aCrumb (param: crumbBody) - source
[html]
addCorpusID - source
[html]
addLangAtt - source
[html]
bodyLayout (param: currentID) - source
[html] arrangment of page as HTML divs
col1 - source
[html] what to do in column 1 of 3 column arrangement
col2 - source
[html] what to do in column 2 of 3 column arrangement
col3 - source
[html] what to do in column 3 of 3 column arrangement
crumbPath - source
[html]
divClassAttribute (param: depth) - source
[html]provide a class attribute and/or ID for each div
doBody (param: Head) - source
[html]
doDivBody (param: Type) - source
[html] Make a section
doDivs - source
[html]
doFrames - source
[html]
doPageTable (param: currentID) - source
[html]
generateDivheading - source
[html]
generateDivtitle - source
[html]
generateUpLink - source
[html]
htmlFileBottom - source
[html]
htmlFileTop - source
[html]
includeCSS - source
[html]
includeJavascript - source
[html] Javascript functions to be declared in HTML header
leftHandFrame (param: currentID) - source
[html] Make contents of left-hand column
linkListContents (param: style) - source
[html] Summary table of contents in left-hand column
mainFrame (param: currentID, minimal) - source
[html] Main page in right-hand column
mainPage (param: currentID) - source
[html] the main page structure
mainTOC (param: force) - source
[html]
mainbody - source
[html]
makeDivPage (param: depth) - source
Create a new output page for a section
makeSidebar - source
[html] Summary links in left-hand column
nextLink - source
[html]
outputChunk (param: ident, content) - source
[html] Generate a chunk of output
pageLayoutCSS (param: currentID) - source
[html] Make a new page using CSS layout
pageLayoutSimple - source
[html] Generate a page using simple layout
pageLayoutTable (param: currentID) - source
[html] Generate a page using table layout
pageLayoutTableBody (param: currentID) - source
[html] The page body, when using table layout
partTOC (param: part, force) - source
No short description available
previousLink - source
[html]
simpleBody - source
No short description available
stdfooter (param: style, file) - source
[html]
stdfooterFrame (param: style) - source
[html]
stdheader (param: title) - source
[html]
subtoc - source
[html]
summaryToc - source
[html]
tocEntry (param: style, id) - source
[html] Make a TOC entry
tocSection (param: style, id, force) - source
[html] Make a TOC section
topNavigation - source
[html]
upLink (param: up, title) - source
[html]
walkTree (param: path, class, whole) - source
[html]
writeDiv - source
[html]
writeFrameToc - source
[html]
writeJavascript (param: content) - source
[html] Write out some Javascript into the HTML
xrefpanel (param: homepage, mode) - source
[html]

## Match Templates Detail

/ - source
Process elements /

processors must support `key'

tei:docAuthor (mode: author) - source
Process elements tei:docAuthor in "author" mode"
tei:* (mode: generateNextLink) - source
Process elements tei:*
tei:* (mode: generatePreviousLink) - source
Process elements looking for something to link to backwards
tei:body (mode: inner) - source
Process elements tei:body in inner mode
* (mode: innertext) - source
Process elements * in inner mode
* (mode: paging) - source
Process elements * in paging mode
processing-instruction()[name()='xmltex'] - source
Process elements processing-instruction()[name()='xmltex']
tei:TEI (mode: split) - source
Process elements tei:TEI

*****************************************

tei:body|tei:back (mode: split) - source
Process elements tei:body|tei:back
tei:TEI - source
Process elements tei:TEI

*****************************************

tei:closer - source
Process elements tei:closer
tei:dateline - source
Process elements tei:dateline
tei:div1[@type='letter']|tei:div[@type='letter'] - source
Process elements tei:div*, @type='letter'
tei:divGen[@type='actions'] - source
Process elements tei:divGen[@type='actions']
tei:divGen[@type='toc'] - source
Process elements tei:divGen[@type='toc']

table of contents

tei:div[@type='canto'] - source
Process elements tei:div[@type='canto']
tei:div[@type='epistle'] - source
Process elements tei:div[@type='epistle']
tei:div[@type='frontispiece'] - source
Process elements tei:div[@type='frontispiece']
tei:div[@type='illustration'] - source
Process elements tei:div[@type='illustration']
tei:div|tei:div0|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6 - source
Process elements tei:div|tei:div0|tei:div1|tei:div2|tei:div3|tei:div4|tei:div5|tei:div6
tei:docTitle|tei:docAuthor|tei:docImprint|tei:docDate - source
Process elements tei:docTitle, docAuthor, docImprint and tei:docDate

Translate these to a corresponding HTML div

tei:floatingText - source
[html]
tei:list[@type='sidebar'] - source
[html] bypass sidebar lists in normal mode
tei:opener - source
Process elements tei:opener
tei:text - source
Process elements tei:text
tei:titlePage - source
Process elements tei:titlePage
tei:* (param: xpath, actionmode: xpath) - source
Process any element in xpath mode

This nice bit of code is from Jeni Tennison

Parameters:
xpath - xpath
action - action

## Named Templates Detail

aCrumb (param: crumbBody) - source
[html]
Parameters:
crumbBody - crumbBody
addCorpusID - source
[html]
addLangAtt - source
[html]
bodyLayout (param: currentID) - source
[html] arrangment of page as HTML divs
Parameters:
currentID - currentID
col1 - source
[html] what to do in column 1 of 3 column arrangement
col2 - source
[html] what to do in column 2 of 3 column arrangement
col3 - source
[html] what to do in column 3 of 3 column arrangement
crumbPath - source
[html]
divClassAttribute (param: depth) - source
[html]provide a class attribute and/or ID for each div
Parameters:
depth - depth of section (1, 2 3, 4 etc)
doBody (param: Head) - source
[html]
Parameters:
Head - Head
doDivBody (param: Type) - source
[html] Make a section
Parameters:
Type - Type
doDivs - source
[html]
doFrames - source
[html]
doPageTable (param: currentID) - source
[html]
Parameters:
currentID - currentID
generateDivheading - source
[html]
generateDivtitle - source
[html]
generateUpLink - source
[html]
htmlFileBottom - source
[html]

*****************************************

htmlFileTop - source
[html]
includeCSS - source
[html]
includeJavascript - source
[html] Javascript functions to be declared in HTML header
leftHandFrame (param: currentID) - source
[html] Make contents of left-hand column
Parameters:
currentID - currentID
linkListContents (param: style) - source
[html] Summary table of contents in left-hand column
Parameters:
style - style
mainFrame (param: currentID, minimal) - source
[html] Main page in right-hand column
Parameters:
currentID - currentID
minimal -
mainPage (param: currentID) - source
[html] the main page structure
Parameters:
currentID -
mainTOC (param: force) - source
[html]
Parameters:
force - force
mainbody - source
[html]

*****************************************

makeDivPage (param: depth) - source
Create a new output page for a section
Parameters:
depth - depth of section (1, 2 3, 4 etc)
makeSidebar - source
[html] Summary links in left-hand column
nextLink - source
[html]

xref to previous and last sections

outputChunk (param: ident, content) - source
[html] Generate a chunk of output
Parameters:
ident - ident
content - content
pageLayoutCSS (param: currentID) - source
[html] Make a new page using CSS layout
Parameters:
currentID - current ID
pageLayoutSimple - source
[html] Generate a page using simple layout
pageLayoutTable (param: currentID) - source
[html] Generate a page using table layout
Parameters:
currentID - currentID
pageLayoutTableBody (param: currentID) - source
[html] The page body, when using table layout
Parameters:
currentID - currentID
partTOC (param: part, force) - source
No short description available
Parameters:
part -
force -
previousLink - source
[html]
simpleBody - source
No short description available
stdfooter (param: style, file) - source
[html]
Parameters:
style -
file -
stdfooterFrame (param: style) - source
[html]
Parameters:
style - CSS style
stdheader (param: title) - source
[html]
Parameters:
title - title
subtoc - source
[html]
summaryToc - source
[html]
tocEntry (param: style, id) - source
[html] Make a TOC entry
Parameters:
style - style
id - id
tocSection (param: style, id, force) - source
[html] Make a TOC section
Parameters:
style - CSS style to use
id - ID to link to
force - whether to force a TOC entry even if other rules would normally prevent it
topNavigation - source
[html]
upLink (param: up, title) - source
[html]
Parameters:
up - the link to which "Up" goes
title - the text of the link
walkTree (param: path, class, whole) - source
[html]
Parameters:
path - path
class - class
whole - whole
writeDiv - source
[html]
writeFrameToc - source
[html]
writeJavascript (param: content) - source
[html] Write out some Javascript into the HTML
Note that it does not have to commented if the output is XHTML
Parameters:
content - The code
xrefpanel (param: homepage, mode) - source
[html]
Parameters:
homepage - homepage
mode - mode