<!-- $Id: catalog1.1.dtd,v 1.1 2007/02/20 16:11:08 sorin Exp $ -->

<!ENTITY % pubIdChars "CDATA">
<!ENTITY % publicIdentifier "%pubIdChars;">
<!ENTITY % partialPublicIdentifier "%pubIdChars;">
<!ENTITY % uriReference "CDATA">
<!ENTITY % string "CDATA">
<!ENTITY % systemOrPublic "(system|public)">

<!ENTITY % p "">
<!ENTITY % s "">
<!ENTITY % nsdecl "xmlns%s;">

<!ENTITY % catalog "%p;catalog">
<!ENTITY % public "%p;public">
<!ENTITY % system "%p;system">
<!ENTITY % uri "%p;uri">
<!ENTITY % rewriteSystem "%p;rewriteSystem">
<!ENTITY % rewriteURI "%p;rewriteURI">
<!ENTITY % systemSuffix "%p;systemSuffix">
<!ENTITY % uriSuffix "%p;uriSuffix">
<!ENTITY % delegatePublic "%p;delegatePublic">
<!ENTITY % delegateSystem "%p;delegateSystem">
<!ENTITY % delegateURI "%p;delegateURI">
<!ENTITY % nextCatalog "%p;nextCatalog">
<!ENTITY % group "%p;group">

<!ENTITY % local.catalog.mix "">
<!ENTITY % local.catalog.attribs "">

<!ELEMENT %catalog; (%public;|%system;|%uri;
                     |%rewriteSystem;|%rewriteURI;
                     |%systemSuffix;|%uriSuffix;
                     |%delegatePublic;|%delegateSystem;|%delegateURI;
                     |%nextCatalog;|%group; %local.catalog.mix;)+>
                     <!ATTLIST %catalog;
        %nsdecl;        %uriReference;          #FIXED
                'urn:oasis:names:tc:entity:xmlns:xml:catalog'
        id              ID                      #IMPLIED
        prefer          %systemOrPublic;        #IMPLIED
        xml:base        %uriReference;          #IMPLIED
        %local.catalog.attribs;
>

<!ENTITY % local.public.attribs "">

<!ELEMENT %public; EMPTY>
<!ATTLIST %public;
        id              ID                      #IMPLIED
        publicId        %publicIdentifier;      #REQUIRED
        uri             %uriReference;          #REQUIRED
        xml:base        %uriReference;          #IMPLIED
        %local.public.attribs;
>

<!ENTITY % local.system.attribs "">

<!ELEMENT %system; EMPTY>
<!ATTLIST %system;
        id              ID                      #IMPLIED
        systemId        %string;                #REQUIRED
        uri             %uriReference;          #REQUIRED
        xml:base        %uriReference;          #IMPLIED
        %local.system.attribs;
>

<!ENTITY % local.uri.attribs "">

<!ELEMENT %uri; EMPTY>
<!ATTLIST %uri;
        id              ID                      #IMPLIED
        name            %string;                #REQUIRED
        uri             %uriReference;          #REQUIRED
        xml:base        %uriReference;          #IMPLIED
        %local.uri.attribs;
>

<!ENTITY % local.rewriteSystem.attribs "">

<!ELEMENT %rewriteSystem; EMPTY>
<!ATTLIST %rewriteSystem;
        id              ID                      #IMPLIED
        systemIdStartString     %string;        #REQUIRED
        rewritePrefix           %string;                #REQUIRED
        %local.rewriteSystem.attribs;
>

<!ENTITY % local.rewriteURI.attribs "">

<!ELEMENT %rewriteURI; EMPTY>
<!ATTLIST %rewriteURI;
        id              ID                      #IMPLIED
        uriStartString  %string;                #REQUIRED
        rewritePrefix   %string;                #REQUIRED
        %local.rewriteURI.attribs;
>

<!ENTITY % local.systemSuffix.attribs "">

<!ELEMENT %systemSuffix; EMPTY>
<!ATTLIST %systemSuffix;
        id              ID                      #IMPLIED
        systemIdSuffix          %string;        #REQUIRED
        uri                     %string;        #REQUIRED
        %local.systemSuffix.attribs;
>

<!ENTITY % local.uriSuffix.attribs "">

<!ELEMENT %uriSuffix; EMPTY>
<!ATTLIST %uriSuffix;
        id              ID                      #IMPLIED
        uriSuffix               %string;        #REQUIRED
        uri                     %string;        #REQUIRED
        %local.uriSuffix.attribs;
>

<!ENTITY % local.delegatePublic.attribs "">

<!ELEMENT %delegatePublic; EMPTY>
<!ATTLIST %delegatePublic;
        id              ID                      #IMPLIED
        publicIdStartString     %partialPublicIdentifier;       #REQUIRED
        catalog         %uriReference;          #REQUIRED
        xml:base        %uriReference;          #IMPLIED
        %local.delegatePublic.attribs;
>

<!ENTITY % local.delegateSystem.attribs "">

<!ELEMENT %delegateSystem; EMPTY>
<!ATTLIST %delegateSystem;
        id              ID                      #IMPLIED
        systemIdStartString     %string;        #REQUIRED
        catalog         %uriReference;          #REQUIRED
        xml:base        %uriReference;          #IMPLIED
        %local.delegateSystem.attribs;
>

<!ENTITY % local.delegateURI.attribs "">

<!ELEMENT %delegateURI; EMPTY>
<!ATTLIST %delegateURI;
        id              ID                      #IMPLIED
        uriStartString  %string;                #REQUIRED
        catalog         %uriReference;          #REQUIRED
        xml:base        %uriReference;          #IMPLIED
        %local.delegateURI.attribs;
>

<!ENTITY % local.nextCatalog.attribs "">

<!ELEMENT %nextCatalog; EMPTY>
<!ATTLIST %nextCatalog;
        id              ID                      #IMPLIED
        catalog         %uriReference;          #REQUIRED
        xml:base        %uriReference;          #IMPLIED
        %local.nextCatalog.attribs;
>

<!ENTITY % local.group.mix "">
<!ENTITY % local.group.attribs "">

<!ELEMENT %group; (%public;|%system;|%uri;
                   |%rewriteSystem;|%rewriteURI;
                   |%systemSuffix;|%uriSuffix;
                   |%delegatePublic;|%delegateSystem;|%delegateURI;
                   |%nextCatalog; %local.group.mix;)+>
                   <!ATTLIST %group;
        id              ID                      #IMPLIED
        prefer          %systemOrPublic;        #IMPLIED
        xml:base        %uriReference;          #IMPLIED
        %local.group.attribs;
>