namespace dc = "http://purl.org/dc/elements/1.1/"
namespace dcterms = "http://purl.org/dc/terms/"
namespace pm = "http://www.politicalmashup.nl"
namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"
namespace owl = "http://www.w3.org/2002/07/owl#"
namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"

# http://dublincore.org/documents/dces/#relation
# 
# References to related resources
#
# For proceedings, most common usage is listing every person that has spoken in a meeting. e.g.:
#       <pm:subject xsi:type ="speaker">
#          <pm:actor pm:role ="chair">
#              <pm:person pm:name ="Dolman" pm:member-id ="nl.m.12345"/>
#          </pm:actor>
#          <pm:actor pm:role ="government">
#              <pm:person pm:name ="Zalm" pm:member-id ="nl.m.12345"/>
#          </pm:actor>
#      </pm:subject>
#
# Try to use as much information as possible from the occurence in the source.
#
# For political parties: 'Party identifiers are used in proceedings XML files which validate with respect
#                         to http://schema.politicalmashup.nl/proceedings.rnc, and in biographies of political
#                         persons which validate with respect to http://schema.politicalmashup.nl/member.rnc.'
# For politicians: 'Member identifiers are used in proceedings XML files which validate with
#                   respect to http://schema.politicalmashup.nl/proceedings.rnc.'
#
# When used in the third child of root, it may contain a owl:sameAs element, linking the current entity to another. Attribute 

DcRelation =
         element dc:relation {
             element dcterms:media {
                 (text | xsd:anyURI),
                 MediaAttributes 
             }*
             # Preferred way of indicating relations: specify the actor and the type of the relation.
             & PmSubject*
             & PmPetitioner*       # used in parliamentary-documents
             & PmEvent*
             & Link*
             # Documents can be replaced by other documents while retaining the original (e.g. with reprints).
             & element pm:replaces {
               attribute pm:title {text}?,
               DocRef?,
               text
             }*
             & element pm:replaced-by {
               attribute pm:title {text}?,
               DocRef?,
               text
             }*
             & element pm:dossiers {
                 (element pm:dossier {DutchIdentifier} 
                 | text
                 | empty
                 | Entity)*
             }?
             & element owl:sameAs{                      # http://www.w3.org/TR/owl-ref/#sameAs-def
                    attribute rdf:resource {text}      # A reference to another document/member/party which is about the same entity. It's format should be one of PartyRef, DocRef, or MemberRef.
                    & element pm:comment {text}?        # Explain in a comment why there are more than one documents describing the same entity.
                }*
             & text # for Parties and Members, dc:relation is a string describing the relation of this document with others from the collection
         }
         
PmSubject = element pm:subject {   
                        attribute xsi:type {   DutchDocEntityRelationType },
                        Actor
                    }

      
PmEvent = element pm:event {   
                        attribute xsi:type {   DutchDocEntityRelationType | VoteType },
                        DocRef?,
                        Vote
                    }


Entity = element pm:entity { 
                     mixed{
                        Entity?,
                        attribute pm:id {text}?
                        }}

PmPetitioner = element pm:petitioner {   
                        attribute xsi:type {   DutchDocEntityRelationType },
                        Actor
                    }