namespace pm = "http://www.politicalmashup.nl"

# Identifier, references to identifiers, and CommonAttributes

# Identifiers and references to identifiers always follow the same pattern:
# First: country-code, followed by a dot
# Then: specifiy the collection with letters, using the dot as a separator for sub-collections
# Then: specify the type of document:
#   'd': proceedings or other parliamentary documents
#   'p': political party
#   'm': politician/member of parliament
# Then: a string identifying the document within the collection. Dots not allowed here.
# Then: to specify a location within the document hierarchy, use again the dot as a separator
#
# Examples: nl.proc.sgd.d.199019910000901, nl.p.pvv, nl.m.02207

Id = attribute pm:id { xsd:token { pattern = "([a-zA-Z]+\.)+[p|m|d]\.[^.]+.+"}  }

# Arjan: temporarily reverted to all id's allowed. TODO: maybe do this only in schematron for parties and members?
#PartyRef = attribute pm:party-ref { xsd:token { pattern = "([a-zA-Z]+\.)+p\.[^.]+"} }
DocRef = attribute pm:doc-ref { xsd:token { pattern = "([a-zA-Z]+\.)+d\.[^.]+"} }
#MemberRef = attribute pm:member-ref { xsd:token { pattern = "([a-zA-Z]+\.)+m\.[^.]+"} }
PartyRef = attribute pm:party-ref { text }
MemberRef = attribute pm:member-ref { text }

PartyName = attribute pm:party-name { text } # Used in Parties, where sometimes a membership may not have a PartyRef and the source explained why (e.g. 'partijloos')

Place = attribute pm:place {text} # used in Members, place of birth/death

Ref = attribute pm:ref { text } # a generalized reference, could reference to a party-id but also other id's.


CommonAttributes = SourceAttributes & MediaAttributes

Type = attribute pm:type {text} # The usage of Type depends on the context; the element it is used in. Typically it is redefined to narrow the pm:type options.

Comment = element pm:comment {text}

Title = attribute pm:title { text }