You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/reference-guides/schema.md
+51-21Lines changed: 51 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,9 @@ The `@schema` keyword specifies the default URI expansion to use for all element
132
132
133
133
### @documentation
134
134
135
-
`@documentation` specifies documentation global to the entire schema. See the `@documentation` section in the previous [context object](schema.md#code-the-context-object) example. The documentation section contains the keywords:
135
+
`@documentation` specifies documentation global to the entire schema. See the `@documentation` section in the previous [context object](schema.md#code-the-context-object) example. The `@documentation` tag can be a single value, or it can be a list with each element having an additional `@langugage` tag. The `@language` tag must have an IANA language code, and this will be used to select appropriate descriptions when internationalising the schema.
136
+
137
+
The documentation section contains the keywords:
136
138
137
139
#### @title
138
140
@@ -158,9 +160,35 @@ If you would like to add arbitrary JSON structured metadata to a schema, you can
158
160
}
159
161
```
160
162
161
-
## Class keywords
163
+
#### @language
164
+
165
+
If you use the `@language` code, specific documentation results can appear in different circumstances depending on the users language preferences.
166
+
167
+
An example of the `@language` tag for a context is as follows:
168
+
169
+
```json
170
+
{ "@base": "terminusdb:///data/",
171
+
"@schema": "terminusdb:///schema#",
172
+
"@type": "@context",
173
+
"@documentation" : [{
174
+
"@language" : "en",
175
+
"@title" : "Example Schema",
176
+
"@description" : "This is an example schema. We are using it to demonstrate the ability to display information in multiple languages about the same semantic content.",
177
+
"@authors" : ["Gavin Mendel-Gleason"]
178
+
},
179
+
{ "@language" : "ka",
180
+
"@title" : "მაგალითი სქემა",
181
+
"@description" : "ეს არის მაგალითის სქემა. ჩვენ ვიყენებთ მას, რათა ვაჩვენოთ ინფორმაციის მრავალ ენაზე ჩვენების შესაძლებლობა ერთი და იმავე სემანტიკური შინაარსის შესახებ.",
182
+
"@authors" : ["გავინ მენდელ-გლისონი"]
183
+
}
184
+
],
185
+
"xsd" : "http://www.w3.org/2001/XMLSchema#"
186
+
}
187
+
```
188
+
189
+
## Document definition keywords
162
190
163
-
A class definition includes several properties, and the keywords, prefixed `@`, describing class behavior.
191
+
A document definition includes several properties, and the keywords, prefixed `@`, describing class behavior.
164
192
165
193
### @type
166
194
@@ -177,6 +205,8 @@ If you would like to add arbitrary JSON structured metadata to a class, you can
177
205
"name" : "xsd:string" }
178
206
```
179
207
208
+
The three varieties of document are described below:
209
+
180
210
#### Class
181
211
182
212
`Class` designates a standard class document. It contains the definition of several properties and keywords describing various class attributes. An example of a class, and an instance of the class:
@@ -641,21 +671,21 @@ The `@comment` is the class description.
641
671
The `@properties` keyword is a JSON object with pairs of the form:
0 commit comments