util.xsl

Utility functions used by other stylesheets
Author:
ibirrer
CVS Id:
util.xsl 111 2005-07-18 13:58:18Z ibirrer
Copyright:
2004, P&P Software GmbH

Match Templates Summary

* (mode: stripXML) - source
Helper template for stripXML function
comment() (mode: stripXML) - source
Helper template for stripXML function
text() (mode: stripXML) - source
Helper template for stripXML function
* (mode: xmlToHtml) - source
Helper template for xmlToHtml function
text() (mode: xmlToHtml) - source
Helper template for xmlToHtml function
* (mode: xmlToString) - source
Helper template for xmlToString function

Functions Summary

element()util:appendElement (param: element()container,element()element) - source
Appends an element to another element
util:fileSuffixToHtml (param: fileUri) - source
util:getFile (param: xs:stringuri) - source
Extracts the filename of an URI
util:getFolder (param: xs:stringuri) - source
Extracts the folder part of an URI
util:getIndent (param: item()element) - source
Returns the indentation of any xml element
util:getRelativeUri (param: xs:stringfrom,xs:stringto) - source
Returns the relative link of a given folder resolved to another folder
util:getRelativeUriFiles (param: xs:stringfrom,xs:stringto,xs:booleanreverse) - source
Builds realive link between to files
util:getSharedPath (param: xs:stringfolder1,xs:stringfolder2) - source
Get the shared path of two folders
util:indentText (param: stringtext,stringindent) - source
Adds indentation to each line of a text
util:indentText (param: stringtext,stringindent,booleanindentFirstLine) - source
Adds indentation to each line of a text
xs:booleanutil:isAbsolutePath (param: xs:stringpath) - source
Tests if a the given path describes an absolute path
util:normalizeFolder (param: xs:stringuri) - source
If the uri does not end with a slash, a slash is added at the end.
util:normalizeUri (param: xs:stringuri) - source
Replaces triple slashes '///' by a single slash
util:pathToUri (param: xs:stringpath) - source
Transforms a filesystem path to a URI.
util:removeTextIndent (param: stringtext) - source
Removes all indentation from each line of a text
util:removeTextIndent (param: stringtext,stringindent) - source
Removes specific indentation from each line of a text
util:repeatString (param: stringtext,intcount) - source
Repeats a string several times
util:stripXML (param: nodes) - source
Strips all xml elements and comments from a set of nodes and returns only the text nodes
util:substringAfterLast (param: text,token) - source
Returns the string after the last occurence of a given character
item()*util:xmlToHtml (param: item()*xml) - source
No short description available
util:xmlToString (param: item()*xml) - source
Transforms an XML structure to a plain string

Match Templates Detail

* (mode: stripXML) - source
Helper template for stripXML function
Do not output elements, but process subelements
comment() (mode: stripXML) - source
Helper template for stripXML function
Delete all XML comments
text() (mode: stripXML) - source
Helper template for stripXML function
Output all text nodes
* (mode: xmlToHtml) - source
Helper template for xmlToHtml function
text() (mode: xmlToHtml) - source
Helper template for xmlToHtml function
* (mode: xmlToString) - source
Helper template for xmlToString function

Functions Detail

element()util:appendElement (param: element()container,element()element) - source
Appends an element to another element
Parameters:
element()container -
element()element -
util:fileSuffixToHtml (param: fileUri) - source
Parameters:
fileUri -
util:getFile (param: xs:stringuri) - source
Extracts the filename of an URI
Parameters:
xs:stringuri -
util:getFolder (param: xs:stringuri) - source
Extracts the folder part of an URI
Parameters:
xs:stringuri -
util:getIndent (param: item()element) - source
Returns the indentation of any xml element
Parameters:
item()element - The element to return the indentation from
util:getRelativeUri (param: xs:stringfrom,xs:stringto) - source
Returns the relative link of a given folder resolved to another folder
Parameters:
xs:stringfrom - An absolute URI of a folder
xs:stringto - An absolute URI of a folder
util:getRelativeUriFiles (param: xs:stringfrom,xs:stringto,xs:booleanreverse) - source
Builds realive link between to files
Parameters:
xs:stringfrom - An absolute URI of a file
xs:stringto - An absolute URI of a file
xs:booleanreverse -
util:getSharedPath (param: xs:stringfolder1,xs:stringfolder2) - source
Get the shared path of two folders
If no shared path is found the empty string is returned.
Parameters:
xs:stringfolder1 -
xs:stringfolder2 -
util:indentText (param: stringtext,stringindent) - source
Adds indentation to each line of a text
Parameters:
stringtext - The text the indentation should be added to.
stringindent - String that is used for indentation.
util:indentText (param: stringtext,stringindent,booleanindentFirstLine) - source
Adds indentation to each line of a text
Parameters:
stringtext - The text the indentation should be added to.
stringindent - String that is used for indentation.
booleanindentFirstLine - If true the first line is not indented
xs:booleanutil:isAbsolutePath (param: xs:stringpath) - source
Tests if a the given path describes an absolute path
Parameters:
xs:stringpath -
util:normalizeFolder (param: xs:stringuri) - source
If the uri does not end with a slash, a slash is added at the end.
Parameters:
xs:stringuri - An uri that points to a folder.
util:normalizeUri (param: xs:stringuri) - source
Replaces triple slashes '///' by a single slash
Parameters:
xs:stringuri - The uri to be normalized.
util:pathToUri (param: xs:stringpath) - source
Transforms a filesystem path to a URI.
Parameters:
xs:stringpath - The Path to be transformed as a string
util:removeTextIndent (param: stringtext) - source
Removes all indentation from each line of a text
Parameters:
stringtext - The text the indentation should be added to.
util:removeTextIndent (param: stringtext,stringindent) - source
Removes specific indentation from each line of a text
Parameters:
stringtext - The text the indentation should removed from.
stringindent - The indentation to be removed.
util:repeatString (param: stringtext,intcount) - source
Repeats a string several times
Parameters:
stringtext - The string to repeat
intcount - how many times should the string be repeated
util:stripXML (param: nodes) - source
Strips all xml elements and comments from a set of nodes and returns only the text nodes
Parameters:
nodes -
util:substringAfterLast (param: text,token) - source
Returns the string after the last occurence of a given character
If the given character is not found the text is returned without change.
Parameters:
text - The text from which to extarct the substring
token - The character after which the text should be returned
item()*util:xmlToHtml (param: item()*xml) - source
No short description available
Parameters:
item()*xml -
util:xmlToString (param: item()*xml) - source
Transforms an XML structure to a plain string
Parameters:
item()*xml - XML Element. Can also be a sequence of elements.