Skip to main content
summaryrefslogtreecommitdiffstats
blob: 32e1d25e823e0c50617c879f260e46ecaa9876f4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="IBM Software Development Platform">
<link rel="STYLESHEET" href="../../../book.css" charset="ISO-8859-1" type="text/css"/>
<TITLE>&lt;ws:file&gt; - Standard JET2 Workspace Tags</TITLE>
</HEAD>
<BODY>
<TABLE border="0" cellpadding="0" cellspacing="1" width="100%">
	<TBODY>
		<TR>
			<TH align="left">
			<P>&lt;ws:file&gt;</P></TH>
			<TH align="right"><A href="overview.html">Standard JET2 Workspace Tags</A></TH>
		</TR>
	</TBODY>
</TABLE>
<HR>
<P><B>file</B></P>
<P><P>               Create or write an Eclipse workspace file. If the file does not exist, the tag attempts to create it and any containing folders. An error occurs if the file does not exist and cannot be created.<P><P>Note that the actual creation of the workspace file is deferred until the JET2Context passed to the executing template has the 'commit' method calls. If the template is part of a JET2 transformation, this occurs once all templates have executed.<P><P>If the 'file' tag is contained directly or indirectly by a 'folder' or 'project' tag AND the 'path' attribute on this tag is relative (does not start with a '/'), then the 'path' attribute is treated as relative to the containing 'folder' or 'project'.<P><P>An absolute 'path' (one starting with '/') is treated as a workspace relative path. That is, the first component after the slash is interpreted as the name of an Eclipse Project, and subsequence segments are treated as folder names, with the last segment being interpreted as the file name.<P><P>When executing, this tag will cause the implicit creation of any folders containing the folder to be created. It will not implicitly create a containing workspace project.<P>            </P>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Tag Summary</TH></TR>
		<TR>
			<TD width="10%">required</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;ws:file path=&quot;<I>value</I>&quot; template=&quot;<I>value</I>&quot;/&gt;<br>
			</SPAN></TD>
		</TR>
		<TR>
			<TD width="10%">full tag</TD>
			<TD><SPAN style="font-family: monospace">
			&lt;ws:file path=&quot;<I>value</I>&quot; template=&quot;<I>value</I>&quot; encoding=&quot;<I>value</I>&quot; replace=&quot;<I>value</I>&quot; derived=&quot;<I>value</I>&quot;/&gt;<br>
			</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<exists node="tag/attribute use='required'">
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Required Attributes</TH></TR>
		<TR>
			<TD width="10%">path</TD>
			<TD><BR>                  A relative path (no initial '/') or an absolute path.<BR>               </TD>
		</TR>
		<TR>
			<TD width="10%">template</TD>
			<TD><BR>                  A project-relative path of a JET template to execute. The template provides the file's contents.<BR>               </TD>
		</TR>
	</TBODY>
</TABLE>
</exists>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Optional Attributes</TH></TR>
		<TR>
		<TR>
			<TD width="10%">encoding</TD>
			<TD><BR>                  The character encoding of the file. If omitted, then the Eclipse workspace determines the encoding. If provided, then the encoding is changed to the specified value. A value of '#default' restores the encoding of the file to the workspace determined default.<BR>               </TD>
		</TR>
		<TR>
			<TD width="10%">replace</TD>
			<TD><BR>                  A boolean ('true' or 'false') value. If 'true', the tag will overwrite an existing file, otherwise it will not. If omitted, a value of 'true' is assumed.<BR>               </TD>
		</TR>
		<TR>
			<TD width="10%">derived</TD>
			<TD><BR>                  A boolean value ('true' or 'false') determining the value of the workspace 'derived' attribute for the file. If omitted, a value of 'false' is assumed.<BR>               </TD>
		</TR>
	</TBODY>
</TABLE>
<HR>
<TABLE border="1" width="100%">
	<TBODY>
		<TR>
			<TH colspan="2" align="left">Example</TH></TR>
		<TR>
			<TD width="10%"></TD>
			<TD><SPAN style="font-family: monospace">
<!-- Begin file example -->

			&lt;ws:file path=&quot;<I>value</I>&quot; template=&quot;<I>value</I>&quot;/&gt;<br>
<!-- End file example -->
</SPAN></TD>
		</TR>
	</TBODY>
</TABLE>
<P></P></BODY>
</HTML>

Back to the top