<?xml version="1.0" encoding="UTF-8"?>

<?context-directive job ctxfile x-setups.ctx ?>

<cd:interface xmlns:cd="http://www.pragma-ade.com/commands">

    <cd:command name="definemarking" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-name"/>
            <cd:resolve name="keyword-mark-optional"/>
            <cd:assignments list="yes" optional="yes">
                <cd:inherit name="setupmarking"/>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="setupmarking" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark-list-optional"/>
            <cd:assignments list="yes">
                <cd:parameter name="state">
                    <cd:constant type="start" default="yes"/>
                    <cd:constant type="stop"/>
                </cd:parameter>
                <cd:parameter name="expansion">
                    <cd:constant type="yes"/>
                    <cd:constant type="no" default="yes"/>
                </cd:parameter>
                <cd:parameter name="separator">
                    <cd:constant type="cd:command"/>
                </cd:parameter>
                <cd:parameter name="filtercommand">
                    <cd:constant type="cd:oneargument"/>
                </cd:parameter>
            </cd:assignments>
        </cd:arguments>
    </cd:command>

    <cd:command name="relatemarking" level="system" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:resolve name="keyword-mark"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="setmarking" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:resolve name="argument-text"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="resetmarking" level="system" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="synchronizemarking" level="system" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:resolve name="keyword-number"/>
            <cd:keywords optional="yes">
                <cd:constant type="keep"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifelsemarking" level="system" category="conditional" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-mark"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="doifmarkingelse" level="system" category="conditional" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="argument-mark"/>
            <cd:resolve name="argument-true"/>
            <cd:resolve name="argument-false"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="getmarking" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:keywords optional="yes">
                <cd:constant type="page" default="yes"/>
                <cd:constant type="cd:name"/>
            </cd:keywords>
            <cd:keywords optional="yes">
                <cd:resolve name="value-markposition"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="fetchonemark" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:keywords optional="yes">
                <cd:resolve name="value-markposition"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="fetchtwomarks" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="fetchallmarks" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
        </cd:arguments>
    </cd:command>

    <cd:command name="fetchmark" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:keywords optional="yes">
                <cd:resolve name="value-markposition"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="fetchmarking" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:keywords>
                <cd:constant type="page"/>
                <cd:constant type="cd:name"/>
            </cd:keywords>
            <cd:keywords>
                <cd:resolve name="value-markposition"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="fetchonemarking" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:keywords>
                <cd:constant type="page"/>
                <cd:constant type="cd:name"/>
            </cd:keywords>
            <cd:keywords>
                <cd:resolve name="value-markposition"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="fetchtwomarkings" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:keywords>
                <cd:constant type="page"/>
                <cd:constant type="cd:name"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

    <cd:command name="fetchallmarkings" level="style" file="strc-mar.mkiv">
        <cd:arguments>
            <cd:resolve name="keyword-mark"/>
            <cd:keywords>
                <cd:constant type="page"/>
                <cd:constant type="cd:name"/>
            </cd:keywords>
        </cd:arguments>
    </cd:command>

</cd:interface>