forked from javaee/javaee-jsp-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxsd.txt
More file actions
322 lines (219 loc) · 11.1 KB
/
xsd.txt
File metadata and controls
322 lines (219 loc) · 11.1 KB
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
---------------------------------------------------------------------------
Building the schemas:
1. Create a child teamware workspace of /java/j2ee/XMLSchemas/deployment
bringover -w ~/xmlschemas-deployment -p /java/j2ee/XMLSchemas/deployment .
or
cd ~/xmlschemas-deployment
bringover
This is the workspace that Umit created before she left.
It contains all the J2EE schemas in it
The *.xsds files are the source files for the .xsd output files.
They contain things like #include that are not valid .xsd but this
allows us to more easily maintain our schemas.
2. Type make
This will produce *.xsd and *.mif for inclusion in the spec.
3. Read the README file (included below), in particular the "THINGS YOU SHOULD KNOW IN
USING MIF" section. This section will tell you the correct way to
import the mif into the spec chapter. Yes, more manual steps :(
Modifying the schemas:
1. Edit the .xsds file for web-jsptaglibrary_2_1.xsd or jsp_2_0.xsd
(eventually we need to create a jsp_2_1.xsd as well).
2. Run make to generate the .xsd
3. cd testarea/
4. Edit the taglib-2_1.xml or web-app.xml to write a test case for the new
changes to the schema.
5. Run 'make jsp-tld' or 'make web-app' to test the TLD or JSP portion
of the web.xml, respectively.
6. If the tests pass, check in the new test and schema
7. Build the schema as above and update the spec chapter
8. Update the .vthought diagrams for the TLD, if necessary
9. Check the latest version of the .xsd schemas into the
jakarta-servletapi-5/src/share/dtd directory and commit the changes.
Hope this helps!
- Mark
---------------------------------------------------------------------------
Publishing the schemas
---------------------------------------------------------------------------
Bill,
I just put back the first revision of the JSP 2.1 TLD schema to our
/java/j2ee/XMLSchemas/deployment workspace.
I just wanted to verify with you that we're still going to use this
same workspace for our J2EE 5.0 schemas.
I had to modify Makefile to build both JSP 2.0 and JSP 2.1 schemas.
The previous Makefile assumed that only one version could be built at
a time.
-----
Yes, I was planning to continue to use that workspace.
When you're ready to publish your new schema to the web, let me know.
-----
The current plan of record is for JSP and JSF to hand our respective
EDRs to the JCP on December 3.
When do you recommend we publish the schema to the web? Can it be done after EDR?
-----
Yes. When you publish is up to you. Publish it when you think a lot of
people will go to the web site looking for it.
---------------------------------------------------------------------------
TLD Diagram
---------------------------------------------------------------------------
Pierre,
Attached is the MIF (and .vthought source) to replace the diagram in the
TLD chapter for the JSP 2.1 TLD.
Do you have any .vthought files in your repository? For some reason
it said that it wasn't part of the repository. Maybe I never checked
them in?
I just noticed I could have done a better job with the schema and
prevented the user from specifying both <deferred-value> and
<deferred-method>, but this should do for now. I'll see if I can fix
that before EDR.
Let me know if you have any trouble integrating the new diagram or
schema into the spec.
- Mark
TOOL is: Visual Thought (confluent www.confluent.com)
=============================================================================
README from xmlschemas-deployment
HOW TO USE SCHEMA GENERATOR:
Necessary Files:
(1) This directory contains a copy of
xml.xsd
XMLSchema.dtd
datatypes.dtd
The originals can be found in http://www.w3.org/2001 directory. They
are also in the source code repository.
PLEASE USE THEM AS IS. w3c grants us use as is. The license issue was resolved
within the W3CLicense file. Please refer to it.
We use the local files for testing, because importing remote files to schema can
be problematic. This can be handled however by reusing a local copy of the
files.
(2) You have several common files which you should include into your spec with
#include. They MUST BE included as annotations (XML Schema comments) to your
spec.
annotations: contain copyright information that is generated by Bonnie which
MUST BE included in the preemble of each schema file
glossary: Definition of common terms that are defined in common schemas such as
j2ee_<version>.xsds that adopts its meaning given the scope it is included in.
common: conventions that will apply to all files
The best thing is to look at one of the .xsds files to see an example to use
#include.
HOW TO USE THIS DIRECTORY:
-- Create an .xsds file. This is the source document for a schema file. Some
guidelines:
-- Each line in the .xsds file should be at most 70 characters.
-- Provide a
<xsd:annotation>
<xsd:documentation>
...
block as comments for each type or element you create.
DO NOT use XML comments. This is markup and the documentation of each
element follows the declaration as you use other tools, such as XML Spy.
Escape any sample XML markup used as documentation. The recommended
way to do this is to use a CDATA section. For example,
<xsd:documentation>
<![CDATA[
Any documentation including markup can go here.
For example: <a-tag>foo</a-tag>
]]>
</xsd:documentation>
See *.xsds file for other examples. This prevents some conformant
XSD processors from trying to validate the content of the
<xsd:documentation> node itself, which would typically fail.
-- Element declarations should have type, {min|max}Occurs in separate lines.
I am not sure this rule totally makes sense b/c in a sense
{min,max}Occurs attributes are related and it improves readability
to have them on the same line. Also, I see many places where they
are on the same line so this guideline should probably be
removed. [eeg 4oct02]
-- Follow the indentation conventions. (For emacs, you should turn
tabify off and use blanks instead). When in doubt, select the
buffer and run M-x untabify.
-- Use <xsd:group ref="j2ee:descriptionGroup"/> for consistency with
the following convention: Don't forget to use description,
display-name and icon elements in the order with minOccurs=0 and
maxOccurs="unbounded". In the Schema version, we have xml:lang
attributes which allow for separate languages to be used for each of
these definitions.
-- Use the make file to generate your specs .xsd and .mif files. The
make file uses xsdc to make the xsd and mif files.
-- The targets in the Makefile are for each specification area:
all: for all specs
web-app: servlet
ejb-jar: ejb
connector: as implied
jsp: as implied
jsp-tld: tag library
platform: app-client, application and j2ee schemas
j2ee: common j2ee schema only
clean: removes mif, xsd, and class files.
There are also targets to build the validator.jar file. Please see below
for the details.
-- Use make file target to make your xsd file.
-- You may get some errors. The xsdc compiler does several things:
-- Formatting (Including copyright file, common definitions, basically
#includes);
-- Sorting the definitions (The output includes the preemble and
the top level element first, followed by sorted global types).
-- Checking referenced but not existing definitions in your
file. It does not load the definitions in the files that are
referenced (Some of the references are not local). Therefore, if you
have used common defs which are in j2ee_<*>.xsd files, you will get
errors such as:
ejb-jar_2_1.xsd: type deployment-extensionType referenced but never defined
Please examine the error messages. If you think that there is a type
which should have appeared in your xsd file but did not, revisit your
.xsds file and fix the references to it. The types that are from
referenced files will appear in the warnings, as shown in the example.
-- After you make your xsd file, cd to testarea and run tests for your spec.
You should read the README in that directory.
-- When you need to publish the schema, you should copy it to a different
directory so that subsequent builds do not corrupt the schema, such as
leighs_area directory.
-- The website is maintained by Bill Shannon. If you need help, see Bonnie.
MODIFYING THE VALIDATOR JAR:
Please see the README file in the testarea for details.
THE GORY DETAILS:
xsdc is the xsd "compiler". It's written in perl.
use commands:
sh ./xsdc <xsds_file> to generate an .xsd file.
sh ./xsdc -m <xsds_file> to generate the mif file.
THINGS YOU SHOULD KNOW IN USING MIF:
(A) You must first import the paragraph formats from new_formats_5.5.doc to your
specification. If this is already done, skip to (B).
Open the new_formats_5.5.doc document with framemaker. You will see the
instructions. However, here they are here for completeness:
1. With the new formats file and your spec open, select
File->Import->Formats IN THE SPEC document.
2. In the Import from Documentation box choose new_formats_5.5.
3. Make sure that only the Paragraph Formats checkbox is selected.
4. Click on the Import button.
5. You should see 5 different paragraph formats in the available paragraphs
all named starting with "Schema-"
(B). Select a location to include the schema.
(C) File-Import-File and choose the mif file that corresponds to your schema,
i.e. ejb-jar_2_1.mif. Import the file.
(D) You should see the document nicely formatted, namely annotations are in
italics, the types are bold, etc.
OTHER STUFF:
There are several directories which are of interest:
- testarea/ contains an instance file to test your schema with. You must run
the test in the area for sanity check of your schema.
- libraries/ contains the jar files to run the test script.
- string_usage.html contains the usage of string based content with respect to
each spec.
SRC FILE for VALIDATOR.JAR:
Validation is enabled by building the validator.jar jar file which contains a
simple validator.
The src directory contains the source for the validator program. The makefile
targets that are relevant for building are:
classes: makes the classes directory for class files.
build: builds everything
validator.jar builds the validator.jar in the current directory.
Please DO SET your JAVA_HOME env variable appropriately.
The testarea requires a validator.jar to be present to be able to run the tests.
Please note the following:
The validator program cheats by using a Properties file to get the schema
that would be used for validating an instance document. In a real DD
processing, a double pass for validation would be necessary to determine the
version number and the schema document first and then use the information to
drive the parser to validate with a specific schema file. In this version, I
used a property file to drive the validator.
Please also see the README for adding additional tests by using the Property
files.