Skip to main content
summaryrefslogtreecommitdiffstats
blob: 919ccf58b907f1f02a7a30d10b54792b0a1426c0 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version='1.0'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

  <head>

    <title>Predefined XPath Variables</title>

    <link charset="ISO-8859-1" href="../../book.css" rel="STYLESHEET"
     type="text/css"/>

  </head>

  <body>

    <h2>Predefined XPath Variables</h2>

    <p>When a JET transformation loads a model from an Eclipse 
    resource, the following XPath variables are set.</p>

    <table border="1">

      <tr>

        <th>Variable</th>

        <th>Contents</th>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.name</td>

        <td>the name of the loaded resource</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.type</td>

        <td>the resource type (file, folder, project)</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.location</td>

        <td>the resource location (absolute file system path)</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.rawLocation</td>

        <td>the resource raw location. See 
        <a href="PLUGINS_ROOT/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/resources/IResource.html#getRawLocation()">
        IResource.getRawLocation()</a>.</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.fullPath</td>

        <td>the Eclipse workspace relative path of the resource.</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.projectRelativePath</td>

        <td>the Eclipse project relative path of the resource.</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.fileExtension</td>

        <td>the resource file extension</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.fileName</td>

        <td>the resource file name (without path).</td>

      </tr>

    </table>

    <p>The following variables are defined if the loaded resource is a 
    file or folder.</p>

    <table border="1">

      <tr>

        <th>Variable</th>

        <th>Contents</th>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.parent.name</td>

        <td>The resource&apos;s parent name (files and folders 
        only)</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.parent.location</td>

        <td>The resource&apos;s parent location (files and folders 
        only).</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.parent.rawLocation</td>

        <td>the resource&apos;s parent raw location (files and folders 
        only).</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.parent.fullPath</td>

        <td>the resource&apos;s parent full path (files and folders 
        only).</td>

      </tr>

      <tr>

        <td>org.eclipse.jet.resource.parent.projectRelativePath</td>

        <td>the resource&apos;s parent project relative path (files and 
        folders only).</td>

      </tr>

    </table>

  </body>

</html>

Back to the top