xstore:// URL Protocol
The xstore://
URL protocol allows you to read any document within the X4 Repository of the current user during the process runtime. It can be used in XSL mappings and adapter parameters to reference a repository file. In XSL mappings, XML documents can be included using the document()
function.
URL Structure
An xstore://
URL must follow the pattern:
xstore://<File-path>
Components of an xstore://
URL:
xstore://
: Protocol declaration; within the X4 BPMS valid during the runtime of the currently executed process.File path
: Path of the file in the user repository folder; folders are separated by slashes (/).
Please note:
To read files from other X4 Repository user folders, use the
x4db:/ protocol
, see (7.4.0-en) x4db:/ URL Protocol.An XSL mapping using this URL protocol cannot be executed in the transformation preview of the Mapping Editor.
Example
In the following example, an XSL mapping retrieves an XML document from the repository using the document()
function and stores it in an XSL variable externalFile
. Any XPath expression can be used to select its nodes.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="UTF-8" method="xml" version="1.0"/>
<xsl:template match="/">
<result>
<xsl:variable select="document('xstore://Project/Folder/Data.xml')" name="externalFile"/>
<xsl:value-of select="$externalFile/child::ElemName"/>
</result>
</xsl:template>
</xsl:stylesheet>