schematron-nokogiri 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,588 @@
1
+ <?xml version="1.0" ?>
2
+ <!--
3
+ ISO_SVRL.xsl
4
+
5
+ Implementation of Schematron Validation Report Language from ISO Schematron
6
+ ISO/IEC 19757 Document Schema Definition Languages (DSDL)
7
+ Part 3: Rule-based validation Schematron
8
+ Annex D: Schematron Validation Report Language
9
+
10
+ This ISO Standard is available free as a Publicly Available Specification in PDF from ISO.
11
+ Also see www.schematron.com for drafts and other information.
12
+
13
+ This implementation of SVRL is designed to run with the "Skeleton" implementation
14
+ of Schematron which Oliver Becker devised. The skeleton code provides a
15
+ Schematron implementation but with named templates for handling all output;
16
+ the skeleton provides basic templates for output using this API, but client
17
+ validators can be written to import the skeleton and override the default output
18
+ templates as required. (In order to understand this, you must understand that
19
+ a named template such as "process-assert" in this XSLT stylesheet overrides and
20
+ replaces any template with the same name in the imported skeleton XSLT file.)
21
+
22
+ The other important thing to understand in this code is that there are different
23
+ versions of the Schematron skeleton. These track the development of Schematron through
24
+ Schematron 1.5, Schematron 1.6 and now ISO Schematron. One only skeleton must be
25
+ imported. The code has templates for the different skeletons commented out for
26
+ convenience. ISO Schematron has a different namespace than Schematron 1.5 and 1.6;
27
+ so the ISO Schematron skeleton has been written itself with an optional import
28
+ statement to in turn import the Schematron 1.6 skeleton. This will allow you to
29
+ validate with schemas from either namespace.
30
+
31
+
32
+ History:
33
+ 2009-03-18
34
+ * Fix atrribute with space "see " which generates wrong name in some processors
35
+ 2008-08-11
36
+ * RJ Fix attribute/@select which saxon allows in XSLT 1
37
+ 2008-08-07
38
+ * RJ Add output-encoding attribute to specify final encoding to use
39
+ * Alter allow-foreign functionality so that Schematron span, emph and dir elements make
40
+ it to the output, for better formatting and because span can be used to mark up
41
+ semantically interesting information embedded in diagnostics, which reduces the
42
+ need to extend SVRL itself
43
+ * Diagnostic-reference had an invalid attribute @id that duplicated @diagnostic: removed
44
+ 2008-08-06
45
+ * RJ Fix invalid output: svrl:diagnostic-reference is not contained in an svrl:text
46
+ * Output comment to SVRL file giving filename if available (from command-line parameter)
47
+ 2008-08-04
48
+ * RJ move sch: prefix to schold: prefix to prevent confusion (we want people to
49
+ be able to switch from old namespace to new namespace without changing the
50
+ sch: prefix, so it is better to keep that prefix completely out of the XSLT)
51
+ * Extra signature fixes (PH)
52
+ 2008-08-03
53
+ * Repair missing class parameter on process-p
54
+ 2008-07-31
55
+ * Update skeleton names
56
+ 2007-04-03
57
+ * Add option generate-fired-rule (RG)
58
+ 2007-02-07
59
+ * Prefer true|false for parameters. But allow yes|no on some old for compatability
60
+ * DP Diagnostics output to svrl:text. Diagnosis put out after assertion text.
61
+ * Removed non-SVRL elements and attributes: better handled as an extra layer that invokes this one
62
+ * Add more formal parameters
63
+ * Correct confusion between $schemaVersion and $queryBinding
64
+ * Indent
65
+ * Validate against RNC schemas for XSLT 1 and 2 (with regex tests removed)
66
+ * Validate output with UniversalTest.sch against RNC schema for ISO SVRL
67
+
68
+ 2007-02-01
69
+ * DP. Update formal parameters of overriding named templates to handle more attributes.
70
+ * DP. Refactor handling of rich and linkable parameters to a named template.
71
+
72
+ 2007-01-22
73
+ * DP change svrl:ns to svrl:ns-in-attribute-value
74
+ * Change default when no queryBinding from "unknown" to "xslt"
75
+
76
+ 2007-01-18:
77
+ * Improve documentation
78
+ * KH Add command-line options to generate paths or not
79
+ * Use axsl:attribute rather than xsl:attribute to shut XSLT2 up
80
+ * Add extra command-line options to pass to the iso_schematron_skeleton
81
+
82
+ 2006-12-01: iso_svrl.xsl Rick Jelliffe,
83
+ * update namespace,
84
+ * update phase handling,
85
+ * add flag param to process-assert and process-report & @ flag on output
86
+
87
+ 2001: Conformance1-5.xsl Rick Jelliffe,
88
+ * Created, using the skeleton code contributed by Oliver Becker
89
+ -->
90
+ <!--
91
+ Derived from Conformance1-5.xsl.
92
+
93
+ Copyright (c) 2001, 2006 Rick Jelliffe and Academia Sinica Computing Center, Taiwan
94
+
95
+ This software is provided 'as-is', without any express or implied warranty.
96
+ In no event will the authors be held liable for any damages arising from
97
+ the use of this software.
98
+
99
+ Permission is granted to anyone to use this software for any purpose,
100
+ including commercial applications, and to alter it and redistribute it freely,
101
+ subject to the following restrictions:
102
+
103
+ 1. The origin of this software must not be misrepresented; you must not claim
104
+ that you wrote the original software. If you use this software in a product,
105
+ an acknowledgment in the product documentation would be appreciated but is
106
+ not required.
107
+
108
+ 2. Altered source versions must be plainly marked as such, and must not be
109
+ misrepresented as being the original software.
110
+
111
+ 3. This notice may not be removed or altered from any source distribution.
112
+ -->
113
+
114
+ <!-- Ideas nabbed from schematrons by Francis N., Miloslav N. and David C. -->
115
+
116
+ <!-- The command-line parameters are:
117
+ phase NMTOKEN | "#ALL" (default) Select the phase for validation
118
+ allow-foreign "true" | "false" (default) Pass non-Schematron elements and rich markup to the generated stylesheet
119
+ diagnose= true | false|yes|no Add the diagnostics to the assertion test in reports (yes|no are obsolete)
120
+ generate-paths=true|false|yes|no generate the @location attribute with XPaths (yes|no are obsolete)
121
+ sch.exslt.imports semi-colon delimited string of filenames for some EXSLT implementations
122
+ optimize "visit-no-attributes" Use only when the schema has no attributes as the context nodes
123
+ generate-fired-rule "true"(default) | "false" Generate fired-rule elements
124
+
125
+ -->
126
+
127
+ <xsl:stylesheet
128
+ version="1.0"
129
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
130
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
131
+ xmlns:axsl="http://www.w3.org/1999/XSL/TransformAlias"
132
+ xmlns:schold="http://www.ascc.net/xml/schematron"
133
+ xmlns:iso="http://purl.oclc.org/dsdl/schematron"
134
+ xmlns:svrl="http://purl.oclc.org/dsdl/svrl"
135
+ >
136
+
137
+ <!-- Select the import statement and adjust the path as
138
+ necessary for your system.
139
+ If not XSLT2 then also remove svrl:active-pattern/@document="{document-uri()}" from process-pattern()
140
+ -->
141
+ <!--
142
+ <xsl:import href="iso_schematron_skeleton_for_saxon.xsl"/>
143
+ -->
144
+
145
+ <xsl:import href="iso_schematron_skeleton_for_xslt1.xsl"/>
146
+ <!--
147
+ <xsl:import href="iso_schematron_skeleton.xsl"/>
148
+ <xsl:import href="skeleton1-5.xsl"/>
149
+ <xsl:import href="skeleton1-6.xsl"/>
150
+ -->
151
+
152
+ <xsl:param name="diagnose" >true</xsl:param>
153
+ <xsl:param name="phase" >
154
+ <xsl:choose>
155
+ <!-- Handle Schematron 1.5 and 1.6 phases -->
156
+ <xsl:when test="//schold:schema/@defaultPhase">
157
+ <xsl:value-of select="//schold:schema/@defaultPhase"/>
158
+ </xsl:when>
159
+ <!-- Handle ISO Schematron phases -->
160
+ <xsl:when test="//iso:schema/@defaultPhase">
161
+ <xsl:value-of select="//iso:schema/@defaultPhase"/>
162
+ </xsl:when>
163
+ <xsl:otherwise>#ALL</xsl:otherwise>
164
+ </xsl:choose>
165
+ </xsl:param>
166
+ <xsl:param name="allow-foreign" >false</xsl:param>
167
+ <xsl:param name="generate-paths" >true</xsl:param>
168
+ <xsl:param name="generate-fired-rule" >true</xsl:param>
169
+ <xsl:param name="optimize"/>
170
+
171
+ <xsl:param name="output-encoding" ></xsl:param>
172
+
173
+ <!-- e.g. saxon file.xml file.xsl "sch.exslt.imports=.../string.xsl;.../math.xsl" -->
174
+ <xsl:param name="sch.exslt.imports" />
175
+
176
+
177
+
178
+ <!-- Experimental: If this file called, then must be generating svrl -->
179
+ <xsl:variable name="svrlTest" select="true()" />
180
+
181
+
182
+
183
+ <!-- ================================================================ -->
184
+
185
+ <xsl:template name="process-prolog">
186
+ <axsl:output method="xml" omit-xml-declaration="no" standalone="yes"
187
+ indent="yes">
188
+ <xsl:if test=" string-length($output-encoding) &gt; 0">
189
+ <xsl:attribute name="encoding"><xsl:value-of select=" $output-encoding" /></xsl:attribute>
190
+ </xsl:if>
191
+ </axsl:output>
192
+
193
+ </xsl:template>
194
+
195
+ <!-- Overrides skeleton.xsl -->
196
+ <xsl:template name="process-root">
197
+ <xsl:param name="title"/>
198
+ <xsl:param name="contents" />
199
+ <xsl:param name="queryBinding" >xslt1</xsl:param>
200
+ <xsl:param name="schemaVersion" />
201
+ <xsl:param name="id" />
202
+ <xsl:param name="version"/>
203
+ <!-- "Rich" parameters -->
204
+ <xsl:param name="fpi" />
205
+ <xsl:param name="icon" />
206
+ <xsl:param name="lang" />
207
+ <xsl:param name="see" />
208
+ <xsl:param name="space" />
209
+
210
+ <svrl:schematron-output title="{$title}" schemaVersion="{$schemaVersion}" >
211
+ <xsl:if test=" string-length( normalize-space( $phase )) &gt; 0 and
212
+ not( normalize-space( $phase ) = '#ALL') ">
213
+ <axsl:attribute name="phase">
214
+ <xsl:value-of select=" $phase " />
215
+ </axsl:attribute>
216
+ </xsl:if>
217
+ <xsl:if test=" $allow-foreign = 'true'">
218
+ </xsl:if>
219
+ <xsl:if test=" $allow-foreign = 'true'">
220
+
221
+ <xsl:call-template name='richParms'>
222
+ <xsl:with-param name="fpi" select="$fpi" />
223
+ <xsl:with-param name="icon" select="$icon"/>
224
+ <xsl:with-param name="lang" select="$lang"/>
225
+ <xsl:with-param name="see" select="$see" />
226
+ <xsl:with-param name="space" select="$space" />
227
+ </xsl:call-template>
228
+ </xsl:if>
229
+
230
+ <axsl:comment><axsl:value-of select="$archiveDirParameter"/> &#xA0;
231
+ <axsl:value-of select="$archiveNameParameter"/> &#xA0;
232
+ <axsl:value-of select="$fileNameParameter"/> &#xA0;
233
+ <axsl:value-of select="$fileDirParameter"/></axsl:comment>
234
+
235
+
236
+ <xsl:apply-templates mode="do-schema-p" />
237
+ <xsl:copy-of select="$contents" />
238
+ </svrl:schematron-output>
239
+ </xsl:template>
240
+
241
+
242
+ <xsl:template name="process-assert">
243
+ <xsl:param name="test"/>
244
+ <xsl:param name="diagnostics" />
245
+ <xsl:param name="id" />
246
+ <xsl:param name="flag" />
247
+ <!-- "Linkable" parameters -->
248
+ <xsl:param name="role"/>
249
+ <xsl:param name="subject"/>
250
+ <!-- "Rich" parameters -->
251
+ <xsl:param name="fpi" />
252
+ <xsl:param name="icon" />
253
+ <xsl:param name="lang" />
254
+ <xsl:param name="see" />
255
+ <xsl:param name="space" />
256
+ <svrl:failed-assert test="{$test}" >
257
+ <xsl:if test="string-length( $id ) &gt; 0">
258
+ <axsl:attribute name="id">
259
+ <xsl:value-of select=" $id " />
260
+ </axsl:attribute>
261
+ </xsl:if>
262
+ <xsl:if test=" string-length( $flag ) &gt; 0">
263
+ <axsl:attribute name="flag">
264
+ <xsl:value-of select=" $flag " />
265
+ </axsl:attribute>
266
+ </xsl:if>
267
+ <!-- Process rich attributes. -->
268
+ <xsl:call-template name="richParms">
269
+ <xsl:with-param name="fpi" select="$fpi"/>
270
+ <xsl:with-param name="icon" select="$icon"/>
271
+ <xsl:with-param name="lang" select="$lang"/>
272
+ <xsl:with-param name="see" select="$see" />
273
+ <xsl:with-param name="space" select="$space" />
274
+ </xsl:call-template>
275
+ <xsl:call-template name='linkableParms'>
276
+ <xsl:with-param name="role" select="$role" />
277
+ <xsl:with-param name="subject" select="$subject"/>
278
+ </xsl:call-template>
279
+ <xsl:if test=" $generate-paths = 'true' or $generate-paths= 'yes' ">
280
+ <!-- true/false is the new way -->
281
+ <axsl:attribute name="location">
282
+ <axsl:apply-templates select="." mode="schematron-get-full-path"/>
283
+ </axsl:attribute>
284
+ </xsl:if>
285
+
286
+ <svrl:text>
287
+ <xsl:apply-templates mode="text" />
288
+
289
+ </svrl:text>
290
+ <xsl:if test="$diagnose = 'yes' or $diagnose= 'true' ">
291
+ <!-- true/false is the new way -->
292
+ <xsl:call-template name="diagnosticsSplit">
293
+ <xsl:with-param name="str" select="$diagnostics"/>
294
+ </xsl:call-template>
295
+ </xsl:if>
296
+ </svrl:failed-assert>
297
+ </xsl:template>
298
+
299
+ <xsl:template name="process-report">
300
+ <xsl:param name="id"/>
301
+ <xsl:param name="test"/>
302
+ <xsl:param name="diagnostics"/>
303
+ <xsl:param name="flag" />
304
+ <!-- "Linkable" parameters -->
305
+ <xsl:param name="role"/>
306
+ <xsl:param name="subject"/>
307
+ <!-- "Rich" parameters -->
308
+ <xsl:param name="fpi" />
309
+ <xsl:param name="icon" />
310
+ <xsl:param name="lang" />
311
+ <xsl:param name="see" />
312
+ <xsl:param name="space" />
313
+ <svrl:successful-report test="{$test}" >
314
+ <xsl:if test=" string-length( $id ) &gt; 0">
315
+ <axsl:attribute name="id">
316
+ <xsl:value-of select=" $id " />
317
+ </axsl:attribute>
318
+ </xsl:if>
319
+ <xsl:if test=" string-length( $flag ) &gt; 0">
320
+ <axsl:attribute name="flag">
321
+ <xsl:value-of select=" $flag " />
322
+ </axsl:attribute>
323
+ </xsl:if>
324
+
325
+ <!-- Process rich attributes. -->
326
+ <xsl:call-template name="richParms">
327
+ <xsl:with-param name="fpi" select="$fpi"/>
328
+ <xsl:with-param name="icon" select="$icon"/>
329
+ <xsl:with-param name="lang" select="$lang"/>
330
+ <xsl:with-param name="see" select="$see" />
331
+ <xsl:with-param name="space" select="$space" />
332
+ </xsl:call-template>
333
+ <xsl:call-template name='linkableParms'>
334
+ <xsl:with-param name="role" select="$role" />
335
+ <xsl:with-param name="subject" select="$subject"/>
336
+ </xsl:call-template>
337
+ <xsl:if test=" $generate-paths = 'yes' or $generate-paths = 'true' ">
338
+ <!-- true/false is the new way -->
339
+ <axsl:attribute name="location">
340
+ <axsl:apply-templates select="." mode="schematron-get-full-path"/>
341
+ </axsl:attribute>
342
+ </xsl:if>
343
+
344
+ <svrl:text>
345
+ <xsl:apply-templates mode="text" />
346
+
347
+ </svrl:text>
348
+ <xsl:if test="$diagnose = 'yes' or $diagnose='true' ">
349
+ <!-- true/false is the new way -->
350
+ <xsl:call-template name="diagnosticsSplit">
351
+ <xsl:with-param name="str" select="$diagnostics"/>
352
+ </xsl:call-template>
353
+ </xsl:if>
354
+ </svrl:successful-report>
355
+ </xsl:template>
356
+
357
+
358
+ <!-- Overrides skeleton -->
359
+ <xsl:template name="process-dir" >
360
+ <xsl:param name="value" />
361
+ <xsl:choose>
362
+ <xsl:when test=" $allow-foreign = 'true'">
363
+ <xsl:copy-of select="."/>
364
+ </xsl:when>
365
+
366
+ <xsl:otherwise>
367
+ <!-- We generate too much whitespace rather than risking concatenation -->
368
+ <axsl:text> </axsl:text>
369
+ <xsl:apply-templates mode="inline-text"/>
370
+ <axsl:text> </axsl:text>
371
+ </xsl:otherwise>
372
+ </xsl:choose>
373
+ </xsl:template>
374
+
375
+ <xsl:template name="process-diagnostic">
376
+ <xsl:param name="id"/>
377
+ <!-- Rich parameters -->
378
+ <xsl:param name="fpi" />
379
+ <xsl:param name="icon" />
380
+ <xsl:param name="lang" />
381
+ <xsl:param name="see" />
382
+ <xsl:param name="space" />
383
+ <svrl:diagnostic-reference diagnostic="{$id}" >
384
+
385
+ <xsl:call-template name="richParms">
386
+ <xsl:with-param name="fpi" select="$fpi"/>
387
+ <xsl:with-param name="icon" select="$icon"/>
388
+ <xsl:with-param name="lang" select="$lang"/>
389
+ <xsl:with-param name="see" select="$see" />
390
+ <xsl:with-param name="space" select="$space" />
391
+ </xsl:call-template>
392
+ <xsl:text>
393
+ </xsl:text>
394
+
395
+ <xsl:apply-templates mode="text"/>
396
+
397
+ </svrl:diagnostic-reference>
398
+ </xsl:template>
399
+
400
+
401
+ <!-- Overrides skeleton -->
402
+ <xsl:template name="process-emph" >
403
+ <xsl:param name="class" />
404
+ <xsl:choose>
405
+ <xsl:when test=" $allow-foreign = 'true'">
406
+ <xsl:copy-of select="."/>
407
+ </xsl:when>
408
+ <xsl:otherwise>
409
+ <!-- We generate too much whitespace rather than risking concatenation -->
410
+ <axsl:text> </axsl:text>
411
+ <xsl:apply-templates mode="inline-text"/>
412
+ <axsl:text> </axsl:text>
413
+ </xsl:otherwise>
414
+ </xsl:choose>
415
+ </xsl:template>
416
+
417
+ <xsl:template name="process-rule">
418
+ <xsl:param name="id"/>
419
+ <xsl:param name="context"/>
420
+ <xsl:param name="flag"/>
421
+ <!-- "Linkable" parameters -->
422
+ <xsl:param name="role"/>
423
+ <xsl:param name="subject"/>
424
+ <!-- "Rich" parameters -->
425
+ <xsl:param name="fpi" />
426
+ <xsl:param name="icon" />
427
+ <xsl:param name="lang" />
428
+ <xsl:param name="see" />
429
+ <xsl:param name="space" />
430
+ <xsl:if test=" $generate-fired-rule = 'true'">
431
+ <svrl:fired-rule context="{$context}" >
432
+ <!-- Process rich attributes. -->
433
+ <xsl:call-template name="richParms">
434
+ <xsl:with-param name="fpi" select="$fpi"/>
435
+ <xsl:with-param name="icon" select="$icon"/>
436
+ <xsl:with-param name="lang" select="$lang"/>
437
+ <xsl:with-param name="see" select="$see" />
438
+ <xsl:with-param name="space" select="$space" />
439
+ </xsl:call-template>
440
+ <xsl:if test=" string( $id )">
441
+ <xsl:attribute name="id">
442
+ <xsl:value-of select=" $id " />
443
+ </xsl:attribute>
444
+ </xsl:if>
445
+ <xsl:if test=" string-length( $role ) &gt; 0">
446
+ <xsl:attribute name="role">
447
+ <xsl:value-of select=" $role " />
448
+ </xsl:attribute>
449
+ </xsl:if>
450
+ </svrl:fired-rule>
451
+ </xsl:if>
452
+ </xsl:template>
453
+
454
+ <xsl:template name="process-ns">
455
+ <xsl:param name="prefix"/>
456
+ <xsl:param name="uri"/>
457
+ <svrl:ns-prefix-in-attribute-values uri="{$uri}" prefix="{$prefix}" />
458
+ </xsl:template>
459
+
460
+ <xsl:template name="process-p">
461
+ <xsl:param name="icon"/>
462
+ <xsl:param name="class"/>
463
+ <xsl:param name="id"/>
464
+ <xsl:param name="lang"/>
465
+
466
+ <svrl:text>
467
+ <xsl:apply-templates mode="text"/>
468
+ </svrl:text>
469
+ </xsl:template>
470
+
471
+ <xsl:template name="process-pattern">
472
+ <xsl:param name="name"/>
473
+ <xsl:param name="id"/>
474
+ <xsl:param name="is-a"/>
475
+
476
+ <!-- "Rich" parameters -->
477
+ <xsl:param name="fpi" />
478
+ <xsl:param name="icon" />
479
+ <xsl:param name="lang" />
480
+ <xsl:param name="see" />
481
+ <xsl:param name="space" />
482
+ <svrl:active-pattern >
483
+ <xsl:if test=" string( $id )">
484
+ <axsl:attribute name="id">
485
+ <xsl:value-of select=" $id " />
486
+ </axsl:attribute>
487
+ </xsl:if>
488
+ <xsl:if test=" string( $name )">
489
+ <axsl:attribute name="name">
490
+ <xsl:value-of select=" $name " />
491
+ </axsl:attribute>
492
+ </xsl:if>
493
+
494
+ <xsl:call-template name='richParms'>
495
+ <xsl:with-param name="fpi" select="$fpi"/>
496
+ <xsl:with-param name="icon" select="$icon"/>
497
+ <xsl:with-param name="lang" select="$lang"/>
498
+ <xsl:with-param name="see" select="$see" />
499
+ <xsl:with-param name="space" select="$space" />
500
+ </xsl:call-template>
501
+
502
+ <!-- ?? report that this screws up iso:title processing -->
503
+ <xsl:apply-templates mode="do-pattern-p"/>
504
+ <!-- ?? Seems that this apply-templates is never triggered DP -->
505
+ <axsl:apply-templates />
506
+ </svrl:active-pattern>
507
+ </xsl:template>
508
+
509
+ <!-- Overrides skeleton -->
510
+ <xsl:template name="process-message" >
511
+ <xsl:param name="pattern"/>
512
+ <xsl:param name="role"/>
513
+ </xsl:template>
514
+
515
+
516
+ <!-- Overrides skeleton -->
517
+ <xsl:template name="process-span" >
518
+ <xsl:param name="class" />
519
+ <xsl:choose>
520
+ <xsl:when test=" $allow-foreign = 'true'">
521
+ <xsl:copy-of select="."/>
522
+ </xsl:when>
523
+ <xsl:otherwise>
524
+ <!-- We generate too much whitespace rather than risking concatenation -->
525
+ <axsl:text> </axsl:text>
526
+ <xsl:apply-templates mode="inline-text"/>
527
+ <axsl:text> </axsl:text>
528
+ </xsl:otherwise>
529
+ </xsl:choose>
530
+ </xsl:template>
531
+
532
+ <!-- =========================================================================== -->
533
+ <!-- processing rich parameters. -->
534
+ <xsl:template name='richParms'>
535
+ <!-- "Rich" parameters -->
536
+ <xsl:param name="fpi" />
537
+ <xsl:param name="icon" />
538
+ <xsl:param name="lang" />
539
+ <xsl:param name="see" />
540
+ <xsl:param name="space" />
541
+ <!-- Process rich attributes. -->
542
+ <xsl:if test=" $allow-foreign = 'true'">
543
+ <xsl:if test="string($fpi)">
544
+ <axsl:attribute name="fpi">
545
+ <xsl:value-of select="$fpi"/>
546
+ </axsl:attribute>
547
+ </xsl:if>
548
+ <xsl:if test="string($icon)">
549
+ <axsl:attribute name="icon">
550
+ <xsl:value-of select="$icon"/>
551
+ </axsl:attribute>
552
+ </xsl:if>
553
+ <xsl:if test="string($see)">
554
+ <axsl:attribute name="see">
555
+ <xsl:value-of select="$see"/>
556
+ </axsl:attribute>
557
+ </xsl:if>
558
+ </xsl:if>
559
+ <xsl:if test="string($space)">
560
+ <axsl:attribute name="xml:space">
561
+ <xsl:value-of select="$space"/>
562
+ </axsl:attribute>
563
+ </xsl:if>
564
+ <xsl:if test="string($lang)">
565
+ <axsl:attribute name="xml:lang">
566
+ <xsl:value-of select="$lang"/>
567
+ </axsl:attribute>
568
+ </xsl:if>
569
+ </xsl:template>
570
+
571
+ <!-- processing linkable parameters. -->
572
+ <xsl:template name='linkableParms'>
573
+ <xsl:param name="role"/>
574
+ <xsl:param name="subject"/>
575
+
576
+ <!-- ISO SVRL has a role attribute to match the Schematron role attribute -->
577
+ <xsl:if test=" string($role )">
578
+ <axsl:attribute name="role">
579
+ <xsl:value-of select=" $role " />
580
+ </axsl:attribute>
581
+ </xsl:if>
582
+ <!-- ISO SVRL does not have a subject attribute to match the Schematron subject attribute.
583
+ Instead, the Schematron subject attribute is folded into the location attribute -->
584
+ </xsl:template>
585
+
586
+
587
+ </xsl:stylesheet>
588
+