summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc-common.rnc
blob: eef4f53b04e17dbe30456a06022d477b187ae1dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Common attributes
# $Id: omdoc-common.rnc 8958 2011-09-02 06:01:13Z kohlhase $
# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdoc-common.rnc $
# See the documentation and examples at http://www.omdoc.org
# Copyright (c) 2004-2010 Michael Kohlhase, released under the GNU Public License (GPL) 

default namespace omdoc = "http://omdoc.org/ns"
namespace local = ""

# all the explicitly namespaced attributes, except xml:lang, which 
# is handled explicitly
nonlocal.attribs = attribute * - (local:* | xml:*) {xsd:string}*

# the attributes for CSS and PRES styling
css.attribs = attribute style {xsd:string}? & attribute class {xsd:string}?

omdocref  = xsd:anyURI         # an URI reference pointing to an OMDoc fragment
omdocrefs = list {xsd:anyURI*}  # a whitespace-separated list of omdocref

xref.attrib = attribute xref {omdocref}
tref = attribute tref {omdocref}

# for the moment, we may get regexp at some point. 
curie = xsd:string
curies = xsd:string 
safecurie = xsd:string

about.attrib =  attribute about {xsd:anyURI|safecurie}  
xmlbase.attrib = attribute xml:base {xsd:anyURI}
xmlid.attrib = attribute xml:id {xsd:ID}

idrest.attribs = css.attribs & nonlocal.attribs &  about.attrib? & xmlbase.attrib?

id.attribs = xmlid.attrib? & idrest.attribs

toplevel.attribs = id.attribs, attribute generated-from {omdocref}?

iso639 = "aa" | "ab" | "af" | "am" | "ar" | "as" |
"ay" | "az" | "ba" | "be" | "bg" | "bh" | "bi" | "bn" | "bo" | "br" | "ca" | "co"
| "cs" | "cy" | "da" | "de" | "dz" | "el" | "en" | "eo" | "es" | "et" | "eu" |
"fa" | "fi" | "fj" | "fo" | "fr" | "fy" | "ga" | "gd" | "gl" | "gn" | "gu" | "ha"
| "he" | "hi" | "hr" | "hu" | "hy" | "ia" | "ie" | "ik" | "id" | "is" | "it" |
"iu" | "ja" | "jv" | "ka" | "kk" | "kl" | "km" | "kn" | "ko" | "ks" | "ku" | "ky"
| "la" | "ln" | "lo" | "lt" | "lv" | "mg" | "mi" | "mk" | "ml" | "mn" | "mo" |
"mr" | "ms" | "mt" | "my" | "na" | "ne" | "nl" | "no" | "oc" | "om" | "or" | "pa"
| "pl" | "ps" | "pt" | "qu" | "rm" | "rn" | "ro" | "ru" | "rw" | "sa" | "sd" |
"sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sq" | "sr" | "ss" | "st"
| "su" | "sv" | "sw" | "ta" | "te" | "tg" | "th" | "ti" | "tk" | "tl" | "tn" |
"to" | "tr" | "ts" | "tt" | "tw" | "ug" | "uk" | "ur" | "uz" | "vi" | "vo" | "wo"
| "xh" | "yi" | "yo" | "za" | "zh" | "zu"

xml.lang.attrib  = attribute xml:lang {iso639}?

Anything = (AnyElement|text)*
AnyElement = element * {AnyAttribute,(text | AnyElement)*}
AnyAttribute = attribute * { text }*

## useful classes to be extended in the modules
inline.class = empty
omdoc.class = empty
plike.class = empty

## mixed models 
inline.model = text & inline.class

metadata.model &= dublincore