Source

perl-begin / lib / XML-Grammar-Vered / vered-xml.rng

<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: testSuite.rng,v 1.12 2003/01/29 12:24:07 jjc Exp $ -->
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
    xmlns:vrd="http://www.shlomifish.org/open-source/projects/XML-Grammar/Vered/"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
    >
    <start>
        <element name="vrd:document">
            <ref name="common_attrs" />
            <attribute name="version">
                <text />
            </attribute>
            <ref name="info" />
            <element name="vrd:body">
                <ref name="common_attrs" />
                <zeroOrMore>
                    <element name="vrd:preface">
                        <ref name="section_contents" />
                    </element>
                </zeroOrMore>
                <oneOrMore>
                    <ref name="section" />
                </oneOrMore>
            </element>
        </element>
    </start>
    <define name="global_attrs">
        <optional>
            <attribute name="xml:id">
                <data type="ID"/>
            </attribute>
        </optional>
        <optional>
            <attribute name="xml:lang">
                <data type="NCName" />
            </attribute>
        </optional>
    </define>
    <define name="common_attrs">
        <ref name="global_attrs" />
        <optional>
            <attribute name="xlink:href">
                <data type="anyURI"/>
            </attribute>
        </optional>
    </define>
    <define name="section_contents">
        <ref name="global_attrs" />
        <ref name="info" />
        <ref name="several_paras" />
        <zeroOrMore>
            <ref name="section" />
        </zeroOrMore>
    </define>
    <define name="section">
        <element name="vrd:section">
            <ref name="global_attrs" />
            <ref name="info" />
            <ref name="several_paras" />
            <zeroOrMore>
                <element name="vrd:item">
                    <ref name="global_attrs" />
                    <ref name="info" />
                    <ref name="several_paras" />
                </element>
            </zeroOrMore>
            <zeroOrMore>
                <ref name="section" />
            </zeroOrMore>
        </element>
    </define>
    <define name="several_paras">
        <zeroOrMore>
            <choice>
                <ref name="blockquote"/>
                <ref name="p"/>
                <ref name="ol"/>
                <ref name="ul"/>
                <ref name="programlisting"/>
                <ref name="bad_code"/>
                <ref name="code_blk"/>
            </choice>
        </zeroOrMore>
    </define>
    <define name="inside_list">
        <oneOrMore>
            <ref name="li" />
        </oneOrMore>
    </define>
    <define name="ol">
        <element name="vrd:ol">
            <ref name="inside_list" />
        </element>
    </define>
    <define name="ul">
        <element name="vrd:ul">
            <ref name="inside_list" />
        </element>
    </define>
    <define name="blockquote">
        <element name="vrd:blockquote">
            <ref name="common_attrs" />
            <ref name="several_paras"/>
        </element>
    </define>
    <define name="li">
        <element name="vrd:li">
            <oneOrMore>
                <ref name="p" />
            </oneOrMore>
        </element>
    </define>
    <define name="p">
        <element name="vrd:p">
            <zeroOrMore>
                <choice>
                    <ref name="text_with_style" />
                    <ref name="span" />
                    <ref name="a" />
                </choice>
            </zeroOrMore>
        </element>
    </define>
    <define name="text_with_style">
        <choice>
            <text />
            <ref name="b" />
            <ref name="i" />
            <element name="vrd:strong">
                <text />
            </element>
            <element name="vrd:em">
                <text />
            </element>
            <element name="vrd:code">
                <text />
            </element>
            <element name="vrd:filepath">
                <text />
            </element>
        </choice>
    </define>
    <define name="span">
        <element name="vrd:span">
            <ref name="common_attrs" />
            <oneOrMore>
                <ref name="text_with_style" />
            </oneOrMore>
        </element>
    </define>
    <define name="a">
        <element name="vrd:a">
            <ref name="common_attrs" />
            <oneOrMore>
                <ref name="text_with_style" />
            </oneOrMore>
        </element>
    </define>
    <define name="b">
        <element name="vrd:b">
            <text />
        </element>
    </define>
    <define name="i">
        <element name="vrd:i">
            <text />
        </element>
    </define>
    <define name="title">
        <element name="vrd:title">
            <text />
        </element>
    </define>
    <define name="code_contents">
        <ref name="common_attrs" />
        <attribute name="syntax">
            <text/>
        </attribute>
        <text/>
    </define>
    <define name="bad_code">
        <element name="vrd:bad_code">
            <ref name="code_contents" />
        </element>
    </define>
    <define name="code_blk">
        <element name="vrd:code_blk">
            <ref name="code_contents" />
        </element>
    </define>
    <define name="programlisting">
        <element name="vrd:programlisting">
            <ref name="code_contents" />
        </element>
    </define>
    <define name="info">
        <element name="vrd:info">
            <ref name="title" />
        </element>
    </define>
</grammar>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.