-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathstructuredocs.sams
77 lines (61 loc) · 1.03 KB
/
structuredocs.sams
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
67
68
69
70
71
72
73
74
75
76
## Template based approach
!namespace: http://spfeopentoolkit.org/ns/sam-schema
$namespace = http://example.com/ns/structure-docs
$word = \W+
structure-docs: xs:string
description:
~~~(*text-general)(?many)
p:
ul:
ol:
group:(?repeat)
title: xs:string
# The title of the group
description:
# A description of the group
>>>(*text-general)
element:(?repeat)
index:: type, term
>($word), xs:string
type:
xs:string
description:
>>>(*text-general)
# declarative approach using SAM syntax
schema:
block: sturcuture-docs
>>>(#text-general)
group:(#text-general)(?many)
paragraph:
block: ol
block: ul
# declarative approach using custom syntax
structure-docs{}
description
@text-general
*group
title
description
@text-general
+element
@index
type(xs:string)
description
@text-general
@text-general
*{
para=p
ul
ol
}
@annotations
element-name
group-name
@decorations
bold
italic
quotes
code=pre
@index
index
*entry::type(xs:NMTOKEN),+term