util.xsl
Utility functions used by other stylesheets
Author:
ibirrer
CVS Id:
util.xsl 24 2005-01-04 10:13:06Z ibirrer
Copyright:
2004, P&P Software GmbH
XSLT Version:
2.0
Namespace Prefix Summary:
util - http://www.pnp-software.com/util
xd - http://www.pnp-software.com/XSLTdoc
xs - http://www.w3.org/2001/XMLSchema
xsl - http://www.w3.org/1999/XSL/Transform
Template Modes Summary
No short description available
No short description available
No short description available
Match Templates Summary
Helper template for xmlToString function
Functions Summary
Appends an element to another element
Extracts the filename of an URI
Extracts the folder part of an URI
Returns the relative link of a given folder resolved to another folder
Builds realive link between to files
Get the shared path of two folders
Adds indentation to each line of a text
Adds indentation to each line of a text
Tests if a the given path describes an absolute path
If the uri does not end with a slash, a slash is added at the end.
Replaces triple slashes '///' by a single slash
Transforms a filesystem path to a URI.
Removes all indentation from each line of a text
Removes specific indentation from each line of a text
Repeats a string several times
Strips all xml elements and comments from a set of nodes and returns only the text nodes
Returns the string after the last occurence of a given character
No short description available
Transforms an XML structure to a plain string
Template Modes Detail
No short description available
Templates Using This Mode:
Match Templates Detail
Helper template for stripXML function
Do not output elements, but process subelements
Helper template for xmlToHtml function
Namespace Prefix Summary:
#default - http://www.w3.org/1999/xhtml
Helper template for xmlToHtml function
Namespace Prefix Summary:
#default - http://www.w3.org/1999/xhtml
Helper template for xmlToString function
Functions Detail
Appends an element to another element
Parameters:
element() container -
element() element -
Parameters:
fileUri -
Extracts the filename of an URI
Parameters:
xs:string uri -
Extracts the folder part of an URI
Parameters:
xs:string uri -
Returns the relative link of a given folder resolved to another folder
Parameters:
xs:string from - An absolute URI of a folder
xs:string to - An absolute URI of a folder
Builds realive link between to files
Parameters:
xs:string from - An absolute URI of a file
xs:string to - An absolute URI of a file
xs:boolean reverse -
Get the shared path of two folders
If no shared path is found the empty string is returned.
Parameters:
xs:string folder1 -
xs:string folder2 -
Adds indentation to each line of a text
Parameters:
string text - The text the indentation should be added to.
string indent - String that is used for indentation.
Adds indentation to each line of a text
Parameters:
string text - The text the indentation should be added to.
string indent - String that is used for indentation.
boolean indentFirstLine - If true the first line is not indented
Tests if a the given path describes an absolute path
Parameters:
xs:string path -
If the uri does not end with a slash, a slash is added at the end.
Otherwise the uri is left unchanged.
The result is normalized with normalizeUri
Parameters:
xs:string uri - An uri that points to a folder.
Replaces triple slashes '///' by a single slash
Also removes any
single-dot path segments.
Parameters:
xs:string uri - The uri to be normalized.
Transforms a filesystem path to a URI.
Backward slashes are transformed to forward slashes and the
prefix
file:/
is added, if the goven path is an absoulte path.
If the argument is already a URI, it is left unchanged.
Parameters:
xs:string path - The Path to be transformed as a string
Removes all indentation from each line of a text
Parameters:
string text - The text the indentation should be added to.
Removes specific indentation from each line of a text
Parameters:
string text - The text the indentation should removed from.
string indent - The indentation to be removed.
Repeats a string several times
Parameters:
string text - The string to repeat
int count - how many times should the string be repeated
Strips all xml elements and comments from a set of nodes and returns only the text nodes
Parameters:
nodes -
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
No short description available
Parameters:
item()* xml -
Transforms an XML structure to a plain string
Parameters:
item()* xml - XML Element. Can also be a sequence of elements.