# The xnote XML DTD - extended notes for RefDB

# (C) 2003-10-29 Markus Hoenicka <markus@mhoenicka.de>

# Invoke with the following declaration

# <!DOCTYPE xnoteset PUBLIC "-//Markus Hoenicka//DTD Xnote V1.4//EN" "http://refdb.sourceforge.net/dtd/xnote-1.4/xnote.dtd">

# version number last bumped due to changes in the link type attribute list, use 1.4 for next released version

# the top-level element, containing one or more extended notes

default namespace = "http://refdb.sourceforge.net/namespaces/xnote"
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"

xnoteset = element xnoteset { attlist.xnoteset, xnote+ }
attlist.xnoteset &= empty
# this element describes one extended note
xnote =
  element xnote {
    attlist.xnote, title?, content?, keyword*, link*, ulink*
  }
attlist.xnote &=
  attribute id { xsd:NMTOKEN }?,
  attribute citekey { xsd:NMTOKEN }?,
  attribute user { xsd:NMTOKEN }?,
  attribute date { xsd:NMTOKEN }?,
  attribute share { "public" | "private" }?
# the optional title of a note
title = element title { attlist.title, text }
attlist.title &= empty
# the contents of the note
content = element content { attlist.content, any }
attlist.content &=
  attribute type { text }?,
  attribute xml:lang { text }?
# keyword for indexing purposes
keyword = element keyword { attlist.keyword, text }
attlist.keyword &= empty
# the link element, defines relations to other objects
link = element link { attlist.link, empty }
attlist.link &=
  attribute type {
    "reference"
    | "refid"
    | "author"
    | "keyword"
    | "journalfull"
    | "journalabbrev"
    | "journalcustabbrev1"
    | "journalcustabbrev2"
  },
  attribute target { text }
# an URL of a web resource
ulink = element ulink { attlist.ulink, text }
attlist.ulink &=
  [ a:defaultValue = "url" ]
  attribute type { "url" | "pdf" | "fulltext" | "related" | "image" }?
start = xnoteset
any =
  (element * {
     attribute * { text }*,
     any
   }
   | text)*
