From version 1.1 >
edited by Outhman Moustaghfir
on 2023/07/24 12:53
To version < 6.1 >
edited by Outhman Moustaghfir
on 2023/07/24 14:49
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,7 +5,41 @@
1 -{{box cssClass="floatinginfobox" title="**Contents**"}}
2 -{{toc/}}
3 -{{/box}}
4 -
5 5  = FileToBase64 =
6 6  
7 -
3 +
4 +This function encodes a file into Base64 format.
5 +
6 += Uses =
7 +
8 +The syntax to be used : //**AddFileConnector({connectorAlias} , {sensType}, {fileType})**//
9 +
10 +where :
11 +
12 +* connectorAlias: the alias used in the scenario to define a connector. (SplitXML1 , AlertJob2 ...)
13 +* sensType: input or output files ( //IN //or //OUT //), it's optional and takes as default value //ANY.//
14 +* fileType: EDI, Format, StyleSheet ...
15 +
16 +==== Examples ====
17 +
18 +[[image:fileTObase64.png]]
19 +
20 +In this example, we send an XML file and try to encode a file.
21 +
22 +the XSL used :
23 +
24 +* connectorAlias: the alias used in the scenario to define a connector. (SplitXML1 , AlertJob2 ...)
25 +* sensType: input or output files ( //IN //or //OUT //), it's optional and takes as default value //ANY.//
26 +* fileType: EDI, Format, StyleSheet ...
27 +
28 +Upon execution, a file is generated, containing the encoded value of the file in base 64 format, enclosed within the 'TEST' tag
29 +
30 +{{code language="XML"}}
31 +<?xml version="1.0" encoding="utf-8"?>
32 + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ixf="http://www.ixPath.com/Function" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ix="localFunction" xmlns:fn="http://www.w3.org/2005/xpath-functions" >
33 + <xsl:output method="xml" indent="yes"/>
34 + <!-- Beginning of the Translation -->
35 + <xsl:template match="/">
36 + <ixDOC>
37 + <TEST><xsl:value-of select="ixf:FileToBase64('FtpListener1')"/></TEST>
38 + </ixDOC>
39 + </xsl:template>
40 +</xsl:stylesheet>
41 +{{/code}}
FileToBase64 (1).xsl
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.omoustaghfir
Size
... ... @@ -1,0 +1,1 @@
1 +595 bytes
Content
... ... @@ -1,0 +1,10 @@
1 +<?xml version="1.0" encoding="windows-1251"?>
2 + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns:ixf="http://www.ixPath.com/Function" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ix="localFunction" xmlns:fn="http://www.w3.org/2005/xpath-functions" >
3 + <xsl:output method="xml" indent="yes"/>
4 + <!-- Beginning of the Translation -->
5 + <xsl:template match="/">
6 + <ixDOC>
7 + <TEST><xsl:value-of select="ixf:FileToBase64('C:\\Users\\Hamza BAYOUD\\Downloads\\copyFilesParams1.png')"/></TEST>
8 + </ixDOC>
9 + </xsl:template>
10 + </xsl:stylesheet>
fileTObase64.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.omoustaghfir
Size
... ... @@ -1,0 +1,1 @@
1 +12.9 KB
Content
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian