Function Reference
AsFilePath
Converts an uriAsString to a file path.
Syntax:
wwuri:AsFilePath($uriAsString)
Parameters:
Name
Type
Description
uriAsString
string
The URI as string.
Returns:
string: File path as string.
Example:

<xsl:variable name="VarFilePath1" select="wwuri:AsFilePath('\\\\network\\filesystem\\file')">

<xsl:variable name = "VarFilePath2" select="wwuri:AsFilePath('file:///network/filesystem/file')">

AsURI
Convert file paths to URIs.
Syntax:
wwuri:AsURI($uriAsString)
Parameters:
Name
Type
Description
uriAsString
string
The URI as string.
Returns:
string: URI as string.
Example:

<xsl:variable name="VarURI" select="wwuri:AsURI('C:\\file')" />

EscapeData
Convert unescaped string into an escaped URI data.
Syntax:
wwuri:EscapeData($unescapedString)
Parameters:
Name
Type
Description
unescapedString
string
The unescaped string.
Returns:
string: Escaped string.
Example:
<xsl:variable name="VarEscapedData" select="wwuri:EscapeData('http://www.webworks.com/name with spaces.html')" />

EscapeUri
Convert unescaped URI into an escaped URI path.
Syntax:
wwuri:EscapeUri($unescapedUri)
Parameters:
Name
Type
Description
unescapedUri
string
URI of the unescaped.
Returns:
string: Escaped URI as a string.
Example:
<xsl:variable name="VarEscapedURI" select="wwuri:EscapeUri('http://www.webworks.com/name with spaces.html')" />

GetRelativeTo
Convert an absolute URI into a relative URI.
Syntax:
wwuri:GetRelativeTo($uriAsString, $anchorUriAsString)
Parameters:
Name
Type
Description
uriAsString
string
The URI as string.
anchorUriAsString
string
The anchor URI as string.
Returns:
string: The relative to.
Example:
<xsl:variable name="VarRelativeURI" select="wwuri:GetRelativeTo('http://www.webworks.com/css/webworks.css', 'http://www.webworks.com/information/index.html')" />

IsFile
Determine if the supplied URI refers to the file system.
Syntax:
wwuri:IsFile($uriAsString)
Parameters:
Name
Type
Description
uriAsString
string
The URI as string.
Returns:
bool: True if file, false if not.
Example:

<xsl:if test="wwuri:IsFile('\\\\network\\filesystem\\file')">
<xsl:variable name = "VarLog" select="wwlog:Message('File!')" />
</xsl:if>

<xsl:if test="wwuri:IsFile('file:///network/filesystem/file')">
<xsl:variable name = "VarLog" select="wwlog:Message('File!')" />
</xsl:if>

MakeAbsolute
Convert a relative URI into an absolute URI. If the second parameter is already an absolute URI, it will be returned unchanged.
Syntax:
wwuri:MakeAbsolute($absoluteUriAsString, $uriAsString)
Parameters:
Name
Type
Description
absoluteUriAsString
string
The absolute URI as string.
uriAsString
string
The URI as string.
Returns:
string: URI as string.
Example:
<xsl:variable name="VarCSSURI" select="wwuri:MakeAbsolute('http://www.webworks.com/information/index.html', '../css/webworks.css')" />

PossibleResolvedUris
Convert file paths to URIs.
Syntax:
wwuri:PossibleResolvedUris($uriAsString)
Parameters:
Name
Type
Description
uriAsString
string
The URI as string.
Returns:
XPathNodeIterator: A node set of possible resolved URIs for the given virtual URI.
Example:
<wwuri:Uris>
<wwuri:Uri value = "file:///C:/Users/user/Projects/Targets/Reverb/Transforms/pages.xsl" />
< wwuri:Uri value = "file:///C:/Users/user/Projects/Formats/WebWorks Reverb/Transforms/pages.xsl" />
< wwuri:Uri value = "file:///C:/Program Files (x86)/WebWorks/ePublisher/2012.4/Formats/WebWorks Reverb/Transforms/pages.xsl" />
</ wwuri:Uris>

Unescape
Convert URI escaped string into unescaped string (%20 to space, etc.).
Syntax:
wwuri:Unescape($escapedString)
Parameters:
Name
Type
Description
escapedString
string
The escaped string.
Returns:
string: Unescaped string.
Example:

<xsl:variable name="VarUnescape" select="wwuri:Unescape('name%20with%20spaces.html')" />

Was this helpful?
Last modified date: 01/12/2026