forked from usnistgov/metaschema-xslt
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMETASCHEMA-XSD.xpl
42 lines (30 loc) · 1.36 KB
/
METASCHEMA-XSD.xpl
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
<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0"
xmlns:metaschema="http://csrc.nist.gov/ns/metaschema/1.0"
type="metaschema:METASCHEMA-XSD" name="METASCHEMA-XSD">
<!-- Input: a metaschema (root) module -->
<!-- Output: An XSD (correct or not) -->
<!-- Purpose: Generate an XSD and present it without pre-testing e.g. for diagnostics or performance -->
<!-- &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& -->
<!-- Ports -->
<p:input port="METASCHEMA" primary="true"/>
<p:input port="parameters" kind="parameter"/>
<p:serialization port="XSD" method="xml" indent="true"/>
<p:output port="XSD" primary="true">
<p:pipe port="result" step="make-xsd"/>
</p:output>
<!-- &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& -->
<!-- Import (subpipeline) -->
<p:import href="../compose/metaschema-compose.xpl"/>
<!-- &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& &&& -->
<!-- Pipeline -->
<p:identity name="echo-input"/>
<metaschema:metaschema-compose name="compose"/>
<p:identity name="composed"/>
<p:xslt name="make-xsd">
<p:input port="stylesheet">
<p:document href="XSD/make-metaschema-xsd.xsl"/>
</p:input>
</p:xslt>
</p:declare-step>