summaryrefslogtreecommitdiff
path: root/schema/odf1.1/OpenDocument-manifest-schema-v1.1.rng
blob: 4082d4ba95d67d9102b9b932ac88fe3283b44193 (plain)
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
<?xml version="1.0" encoding="UTF-8"?>
<!--
    OASIS OpenDocument v1.1
    OASIS Standard, 1 Feb 2007
    Relax-NG Manifest Schema

    $Id$

    © 2002-2007 OASIS Open
    © 1999-2007 Sun Microsystems, Inc.
-->

<grammar 
    xmlns="http://relaxng.org/ns/structure/1.0"

    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"

    xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">
<define name="manifest">
    <element name="manifest:manifest">
        <oneOrMore>
            <ref name="file-entry"/>
        </oneOrMore>
    </element>
</define>

<start>
    <choice>
        <ref name="manifest"/>
    </choice>
</start>
<define name="file-entry">
    <element name="manifest:file-entry">
        <ref name="file-entry-attlist"/>
        <optional>
            <ref name="encryption-data"/>
        </optional>
    </element>
</define>
<define name="file-entry-attlist" combine="interleave">
    <attribute name="manifest:full-path">
        <data type="string"/>
    </attribute>
</define>
<define name="file-entry-attlist" combine="interleave">
    <optional>
        <attribute name="manifest:size">
            <data type="nonNegativeInteger"/>
        </attribute>
    </optional>
</define>
<define name="file-entry-attlist" combine="interleave">
    <attribute name="manifest:media-type">
        <data type="string"/>
    </attribute>
</define>
<define name="encryption-data">
    <element name="manifest:encryption-data">
        <ref name="encryption-data-attlist"/>
        <ref name="algorithm"/>
        <ref name="key-derivation"/>
    </element>
</define>
<define name="encryption-data-attlist" combine="interleave">
    <attribute name="manifest:checksum-type">
        <data type="string"/>
    </attribute>
</define>
<define name="encryption-data-attlist" combine="interleave">
    <attribute name="manifest:checksum">
        <data type="base64Binary"/>
    </attribute>
</define>
<define name="algorithm">
    <element name="manifest:algorithm">
        <ref name="algorithm-attlist"/>
        <empty/>
    </element>
</define>
<define name="algorithm-attlist" combine="interleave">
    <attribute name="manifest:algorithm-name">
        <data type="string"/>
    </attribute>
</define>
<define name="algorithm-attlist" combine="interleave">
    <attribute name="manifest:initialisation-vector">
        <data type="base64Binary"/>
    </attribute>
</define>
<define name="key-derivation">
    <element name="manifest:key-derivation">
        <ref name="key-derivation-attlist"/>
        <empty/>
    </element>
</define>
<define name="key-derivation-attlist" combine="interleave">
    <attribute name="manifest:key-derivation-name">
        <data type="string"/>
    </attribute>
</define>
<define name="key-derivation-attlist" combine="interleave">
    <attribute name="manifest:salt">
        <data type="base64Binary"/>
    </attribute>
</define>
<define name="key-derivation-attlist" combine="interleave">
    <attribute name="manifest:iteration-count">
            <data type="nonNegativeInteger"/>
        </attribute>
</define>
</grammar>