<!-- 
     This DTD fragment is identified by and should be available at
         http://www.w3.org/Metadata/RDF/Group/9710/rdf.dtd

     Copyright 1997, 1999 by MIT, INRIA, and Keio
     $Id: rdf.dtd,v 1.3 1999/02/08 17:41:51 connolly Exp $

     It is a transcription of the grammar in
       Resource Description Framework (RDF) Model and Syntax
       Ora Lassila and Ralph R. Swick
       Version 0.2, 01-Oct-1997
       http://www.w3.org/Metadata/RDF/Group/9710/WD-rdf-syntax-971002
       updated for
       http://www.w3.org/TR/1999/PR-rdf-syntax-19990105


     The grammar is presented in a different order because SGML
     requires parameter entities to be declared before they are referenced.

     Typical usage:

     <!DOCTYPE rdf:RDF system
             "http://www.w3.org/XML/9710rdf-dtd/rdf.dtd">
     <rdf:RDF>...</rdf:RDF>

     Documents that include this DTD fragment by reference
     SHOULD NOT reference parameter entities declared herein
     (e.g. %RDF;).

     These names are intended to be "private."
     Only the element and attribute names are intended to be exported.

     The parameter entity rdf-namespace-prefix is intended to
     be "imported" ala:

    <!DOCTYPE [
    <!ENTITY % rdf-namespace-prefix "blort:">
    <!ENTITY % rdf-dtd system
             "http://www.w3.org/XML/9710rdf-dtd/rdf.dtd">
    %rdf-dtd;
    ]>
    <blort:RDF>...</blort:RDF>

     Oh for real SGML/XML namespaces... ;-)
-->

<!-- I'm not sure about the following: -->
<!-- ?? capitalization of href (from XLL) -->
<!-- ?? capitalization of rdf terms: RDF:, bag, alternatives, ... -->
<!-- ?? underscore (_) allowed in XML names? -->

<!ENTITY % rdf-namespace-prefix "rdf"> <!-- usually -->
<!ENTITY % rdf-namespace-address "http://www.w3.org/971002/rdf"><!--@@??-->
<!ENTITY % rdf-namespace-declaration
               'xmlns:%rdf-namespace-prefix; CDATA #FIXED
                                "%rdf-namespace-address;"'>

<!-- exported names: -->
<!ENTITY % RDF "%rdf-namespace-prefix;:RDF">
<!ENTITY % description   "%rdf-namespace-prefix;:Description">
<!ENTITY % sequence      "%rdf-namespace-prefix;:seq">
<!ENTITY % bag           "%rdf-namespace-prefix;:bag">
<!ENTITY % alternatives  "%rdf-namespace-prefix;:alternatives">
<!ENTITY % li            "%rdf-namespace-prefix;:li">
<!ENTITY % propvalue     "%rdf-namespace-prefix;:propvalue">

<!--
  [6.4] container      ::= sequence | bag | alternative
-->
<!ENTITY % container "%sequence; | %bag; | %alternatives;">

<!--
  [6.2] obj            ::= description | container
-->
<!ENTITY % obj "%description; | %container;">

<!--
  [6.1] RDF            ::= ['<rdf:RDF>'] obj* ['</rdf:RDF>']
-->
<!ELEMENT %RDF; (%obj;)*>
<!ATTLIST %RDF; %rdf-namespace-declaration;><!--@@hmmm... FIXED?-->

<!--
  [6.5] idAboutAttr    ::= idAttr | aboutAttr | aboutEachAttr
  [6.6] idAttr         ::= ' ID="' IDsymbol '"'
  [6.7] aboutAttr      ::= ' about="' URI-reference '"'
  [6.8] aboutEachAttr  ::= ' aboutEach="' URI-reference '"'
                         | ' aboutEachPrefix="' string '"'
  [6.9] bagIdAttr      ::= ' bagID="' IDsymbol '"'

-->
<!--hmmm... how is ID globally reserved? 
    It's not: it's only reserved for elements in
    the RDF namespace (and namespaces derived from there) -->

<!ENTITY % idAttrOpt               "ID               ID    #IMPLIED">
<!ENTITY % aboutAttrOpt            "about            CDATA #IMPLIED">
<!ENTITY % aboutEachAttrOpt        "aboutEach        CDATA #IMPLIED
                                    aboutEachPrefix  CDATA #IMPLIED">

<!-- x | y isn't expressible in an XML/SGML attribute list -->
<!ENTITY % idAboutAttr   "%aboutAttrOpt; %idAttrOpt; %aboutEachAttrOpt;">

<!--
  [6.9] bagIdAttr      ::= ' bagID="' IDsymbol '"'
  -->
<!ENTITY % bagIdAttrOpt  "bagID  NMTOKEN  #IMPLIED"> <!-- @@two ID attrs prob-->

<!ENTITY % propNameAttr ""> <!-- @@EXPORT! define your property attributes here -->
<!ENTITY % propAttrStar "type CDATA #IMPLIED
                          %propNameAttr;">

<!--
  [6.3] description    ::= '<rdf:Description' idAboutAttr? bagIdAttr? propAttr*
 '/>'
                         | '<rdf:Description' idAboutAttr? bagIdAttr? propAttr*
 '>'
                                propertyElt* '</rdf:Description>'
                         | typedNode
-->
<!ENTITY % propertyEltStar "ANY"> <!-- @@EXPORT! redefine this
                                if you want to validate your properties -->
<!ELEMENT %description; %propertyEltStar;>
<!ATTLIST %description;
            %idAboutAttr;
            %bagIdAttrOpt;
            %propAttrStar;
>


