type.rng 3.08 KB
Newer Older
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
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
    xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
    ns="http://www.utc.fr/ics/hdoc/xhtml">

    <a:documentation>Last update : 2014-12-04</a:documentation>
    <a:documentation>Changes since last update : 
        In order to manage quiz : 
        - Adding multiple-choice-question and fill-in-the-blank to section
        - Adding question, choice-correct, choice-uncorrect and explanation to div
        - Adding blank to span
        - Externalizing ObjectType and VideoType from main schema
    </a:documentation>
    
    <!-- Type Microdata -->
    <define name="SectionType">
        <optional>
            <attribute name="data-hdoc-type">
                <choice>
                    <value>introduction</value>
                    <value>conclusion</value>
                    <value>unit-of-content</value>
                    <value>multiple-choice-question</value>
                    <value>fill-in-the-blank</value> 
                </choice>
            </attribute>
        </optional>
    </define>

    <define name="DivType">
        <optional>
            <attribute name="data-hdoc-type">
                <choice>
                    <!-- block management -->
                    <value>emphasis</value>
                    <value>complement</value>
                    <value>definition</value>
                    <value>example</value>
                    <value>remark</value>
                    <value>warning</value>
                    <value>advice</value> 
                    <!-- quiz management -->
                    <value>question</value>
                    <value>choice-correct</value>
                    <value>choice-incorrect</value>
                    <value>explanation</value>
48 49
                    <value>explanation-choice-correct</value>
                    <value>explanation-choice-incorrect</value>
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
                </choice>
            </attribute>
        </optional>
    </define>

    <define name="SpanType">
        <optional>
            <attribute name="data-hdoc-type">
                <choice>
                    <value>syntax</value>
                    <value>latex</value>
                    <!-- quiz management -->
                    <value>blank</value>
                </choice>
            </attribute>
        </optional>
    </define>
    
    <define name="ObjectType">
        <attribute name="type">
            <choice>                    
                <value>application/vnd.oasis.opendocument.graphics </value>
                <value>application/vnd.oasis.opendocument.spreadsheet</value>
                <value>application/pdf</value>                    
            </choice>
        </attribute>
    </define>

    <define name="VideoType">
        <attribute name="type">
            <choice>
                <value>video/mp4</value>
                <value>video/ogg</value>
                <value>video/webm</value>
            </choice>
        </attribute>
    </define>
</grammar>