From version < 4.1 >
edited by Outhman Moustaghfir
on 2024/09/25 12:14
To version 1.1 >
edited by Outhman Moustaghfir
on 2024/09/24 16:54
>
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,3 +1,7 @@
1 +
2 +
3 +=== SetFile Method Documentation ===
4 +
1 1  ==== Purpose: ====
2 2  
3 3  The SetFile method is designed to store XML content in a database by saving it as a file and returning the file's unique identifier.
... ... @@ -8,17 +8,6 @@
8 8  * It writes the XML content to a file.
9 9  * The file is saved in the database, and its file ID is returned for future reference.
10 10  
11 -
12 -==== optional parameters: ====
13 -
14 -* **fileName** (optional): Specifies a custom name for the saved file. If not provided (null or empty), the file will be saved with its unique file ID as the name.
15 -* **folder** (optional): Defines the folder where the file will be stored (e.g., "work", "out", etc.). If not specified (null or empty), the file will be placed in the default "work" folder.
16 -
17 -
18 -{{code language="XML"}}
19 -SetFile(xmlContent,fileName,folder)
20 -{{/code}}
21 -
22 22  ==== Usage Example: ====
23 23  
24 24  Consider the following XSLT transformation that calls the SetFile method:
... ... @@ -32,7 +32,7 @@
32 32   xmlns:fn="http://www.w3.org/2005/xpath-functions"
33 33   version="2.0">
34 34  
35 - <xsl:output method="xml" indent="yes"></xsl:output>
28 + <xsl:output method="xml" indent="yes"/>
36 36  
37 37   <!-- Start of the Transformation -->
38 38   <xsl:template match="/">
... ... @@ -65,12 +65,12 @@
65 65   </xsl:variable>
66 66  
67 67   <!-- Call the SetFile method and pass the XML content -->
68 - <xsl:variable name="fileId" select="ixf:SetFile($xmlContent)"></xsl:variable>
61 + <xsl:variable name="fileId" select="ixf:SetFile($xmlContent)"/>
69 69  
70 70   <!-- Output the ID of the saved file -->
71 71   <returnedFiles>
72 72   <fileId>
73 - <xsl:value-of select="$fileId"></xsl:value-of>
66 + <xsl:value-of select="$fileId"/>
74 74   </fileId>
75 75   </returnedFiles>
76 76   </iXDOC>
... ... @@ -84,4 +84,4 @@
84 84  
85 85  The method will return the unique ID of the file saved in the database, which can be accessed as shown in the XSLT example.
86 86  
87 -==== ====
80 +==== ====
This wiki is hosted and managed by iXPath
Powered by XWiki 13.3 debian