mdld-parse 0.9.3 → 0.9.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/dist/README.md +4 -3
- package/dist/docs/API.md +3 -1
- package/dist/docs/Guide.md +660 -166
- package/dist/docs/LiterateRDF.md +472 -0
- package/dist/docs/Nostr.md +544 -0
- package/dist/docs/Parser.md +57 -1
- package/dist/docs/guide-m.md +56 -0
- package/dist/docs/one-page.md +322 -0
- package/dist/docs/primary-subject.md +64 -13
- package/dist/examples/Status-SHACL.md +8 -10
- package/dist/examples/demo/journal.md +110 -9
- package/dist/examples/demo/minimal.md +18 -6
- package/dist/examples/demo/project.md +90 -7
- package/dist/examples/demo/prov.md +107 -0
- package/dist/examples/demo/rdf.md +69 -0
- package/dist/examples/demo/recipe.md +79 -15
- package/dist/examples/demo/research.md +110 -30
- package/dist/examples/demo/shacl.md +161 -0
- package/dist/examples/demo/space-mission.md +109 -28
- package/dist/examples/demo/tasks.md +175 -0
- package/dist/examples/demo/xsd.md +91 -0
- package/dist/index.html +686 -260
- package/dist/index.js +474 -248
- package/dist/spec/Spec-compact.md +13 -8
- package/dist/spec/Spec-ultra.md +14 -3
- package/dist/spec/Spec.md +68 -20
- package/package.json +2 -2
- package/dist/examples/prov-o.md +0 -2367
- package/dist/examples/rdf.md +0 -827
- package/dist/examples/shacl.md +0 -3399
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# MD-LD One Page Guide
|
|
2
|
+
|
|
3
|
+
**Semantic Markdown, no guessing, no magic**
|
|
4
|
+
|
|
5
|
+
MD-LD lets you **add meaning without breaking Markdown**.
|
|
6
|
+
Add `{...}` → you get an RDF graph.
|
|
7
|
+
Delete `{...}` → plain Markdown remains.
|
|
8
|
+
|
|
9
|
+
Everything semantic is **explicit**, **local**, and **traceable**.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 0. Mental model (read once)
|
|
14
|
+
|
|
15
|
+
MD-LD always writes **triples**:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Subject ──predicate──▶ Object / Literal
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
That’s it.
|
|
22
|
+
|
|
23
|
+
At any annotation `{...}`, there may be:
|
|
24
|
+
|
|
25
|
+
| Symbol | Meaning |
|
|
26
|
+
| ------ | ---------------------------------------------------- |
|
|
27
|
+
| **S** | current subject (IRI) |
|
|
28
|
+
| **O** | object IRI (from link, image, or `{+iri}`) |
|
|
29
|
+
| **L** | literal text (from the attached Markdown span/block) |
|
|
30
|
+
|
|
31
|
+
No subject → no triple
|
|
32
|
+
No guessing → no triple
|
|
33
|
+
No `{...}` → no semantics
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 1. Start with a document that *already is* a graph
|
|
38
|
+
|
|
39
|
+
Always declare a subject first.
|
|
40
|
+
|
|
41
|
+
```md
|
|
42
|
+
[alice] <tag:alice@example.com,2026:>
|
|
43
|
+
|
|
44
|
+
# Walnut Bread {=alice:walnut-bread .Recipe name}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
This emits:
|
|
48
|
+
|
|
49
|
+
```turtle
|
|
50
|
+
tag:alice@example.com,2026:walnut-bread
|
|
51
|
+
a schema:Recipe ;
|
|
52
|
+
schema:name "Walnut Bread" .
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Why this matters**
|
|
56
|
+
|
|
57
|
+
* Your note is already an addressable node
|
|
58
|
+
* Everything that follows attaches to it
|
|
59
|
+
* This is how “casual notes” become “knowledge”
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
### 1.1. Prefix Folding: Build Your Namespace
|
|
64
|
+
|
|
65
|
+
Create hierarchical namespaces by referencing previous prefixes:
|
|
66
|
+
|
|
67
|
+
```md
|
|
68
|
+
# Your domain authority
|
|
69
|
+
[my] <tag:mymail@domain.com,2026:>
|
|
70
|
+
|
|
71
|
+
# Build the hierarchy
|
|
72
|
+
[j] <my:journal:>
|
|
73
|
+
[p] <my:property:>
|
|
74
|
+
[c] <my:class:>
|
|
75
|
+
|
|
76
|
+
# Use in content
|
|
77
|
+
# 2026-01-27 {=j:2026-01-27 .c:Event p:date ^^xsd:date}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Resolves to:**
|
|
81
|
+
- `j:2026-01-27` → `tag:mymail@domain.com,2026:journal:2026-01-27`
|
|
82
|
+
- `c:Event` → `tag:mymail@domain.com,2026:class:Event`
|
|
83
|
+
- `p:date` → `tag:mymail@domain.com,2026:property:date`
|
|
84
|
+
|
|
85
|
+
Perfect for personal knowledge graphs without external dependencies.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 2. Value carriers (what can hold meaning)
|
|
90
|
+
|
|
91
|
+
Only these Markdown forms can emit values:
|
|
92
|
+
|
|
93
|
+
**Inline**
|
|
94
|
+
|
|
95
|
+
* `[text] {...}`
|
|
96
|
+
* `*text* {...}`, `**text** {...}`
|
|
97
|
+
* `` `code` {...}``
|
|
98
|
+
|
|
99
|
+
**Block**
|
|
100
|
+
|
|
101
|
+
* Headings
|
|
102
|
+
* List items
|
|
103
|
+
* Blockquotes
|
|
104
|
+
* Code blocks (fence with `{...}`)
|
|
105
|
+
|
|
106
|
+
If `{...}` cannot clearly attach → **nothing is emitted**.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 3. The three predicate forms (the whole algebra)
|
|
111
|
+
|
|
112
|
+
Every triple is written using **one of three predicate shapes**:
|
|
113
|
+
|
|
114
|
+
| Form | Emits |
|
|
115
|
+
| ----- | ------- |
|
|
116
|
+
| `p` | `S → L` |
|
|
117
|
+
| `?p` | `S → O` |
|
|
118
|
+
| `!p` | `O → S` |
|
|
119
|
+
|
|
120
|
+
Nothing else exists.
|
|
121
|
+
|
|
122
|
+
### Example — all three at once
|
|
123
|
+
|
|
124
|
+
```md
|
|
125
|
+
[alice] <tag:alice@example.com,2026:>
|
|
126
|
+
|
|
127
|
+
[Bread] {name}
|
|
128
|
+
[Walnut] {+alice:walnut ?hasIngredient}
|
|
129
|
+
[Recipe](https://en.wikipedia.org/wiki/Recipe) {!hasPart}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Never use shortened CURIE in regular Markdown links. They must be valid URLs for the browser to navigate to.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 4. Literals are always local
|
|
137
|
+
|
|
138
|
+
Text comes **only** from the attached carrier.
|
|
139
|
+
|
|
140
|
+
```md
|
|
141
|
+
[2024] {published ^^xsd:gYear}
|
|
142
|
+
[Delicious bread] {description @en}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
No datatype or language is ever inferred.
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 5. Object IRIs (links or `{+iri}`)
|
|
150
|
+
|
|
151
|
+
Objects exist only if explicitly present.
|
|
152
|
+
|
|
153
|
+
```md
|
|
154
|
+
[alice] <tag:alice@example.com,2026:>
|
|
155
|
+
|
|
156
|
+
[Walnuts](tag:alice@example.com,2026:walnut) {?ingredient}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
or
|
|
160
|
+
|
|
161
|
+
```md
|
|
162
|
+
[Walnuts] {+alice:walnut ?ingredient}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Same graph. Different ergonomics.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 6. Lists = pure Markdown structure, explicit annotations only
|
|
170
|
+
|
|
171
|
+
Lists have **no semantic scope**. Each item must have explicit annotations.
|
|
172
|
+
|
|
173
|
+
```md
|
|
174
|
+
[alice] <tag:alice@example.com,2026:>
|
|
175
|
+
|
|
176
|
+
Ingredients: {=alice:recipe .Container}
|
|
177
|
+
|
|
178
|
+
- Walnuts {+alice:walnut ?member .alice:Ingredient name}
|
|
179
|
+
- Flour {+alice:flour ?member .alice:Ingredient name}
|
|
180
|
+
- Water {+alice:water ?member .alice:Ingredient name}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Result: clean, explicit graph. No implicit semantics.
|
|
184
|
+
|
|
185
|
+
### List Item Requirements
|
|
186
|
+
|
|
187
|
+
**✅ DO - Items with explicit subjects emit semantics:**
|
|
188
|
+
```md
|
|
189
|
+
- **Flour** {=alice:flour} # Clean subject
|
|
190
|
+
- **Walnuts** {=alice:walnuts} # Clean subject
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
**Critical Rule**: **All list items must have explicit subject (`{=iri}` or `{+iri}`) to emit semantics.**
|
|
195
|
+
|
|
196
|
+
**Valid Alternatives for Additional Information:**
|
|
197
|
+
|
|
198
|
+
**✅ Nested Lists (Pure Structure)**
|
|
199
|
+
```md
|
|
200
|
+
- **Flour** {=alice:flour}
|
|
201
|
+
Properties:
|
|
202
|
+
- **Organic** {+alice:organic ?alice:hasProperty .alice:Property label}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**✅ Separate Sections**
|
|
206
|
+
```md
|
|
207
|
+
- **Flour** {=alice:flour}
|
|
208
|
+
|
|
209
|
+
## Flour Description {=alice:flour}
|
|
210
|
+
[*Important*] {priority .Important}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Why?** Lists are **pure Markdown structure**. This keeps them predictable and streaming-safe.
|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## 7. Fragments = structured documents
|
|
218
|
+
|
|
219
|
+
Fragments turn sections into addressable nodes.
|
|
220
|
+
|
|
221
|
+
```md
|
|
222
|
+
[alice] <tag:alice@example.com,2026:>
|
|
223
|
+
|
|
224
|
+
## Instructions {=#steps .HowTo}
|
|
225
|
+
|
|
226
|
+
### Mixing {=#step-1 .HowToStep rdfs:label}
|
|
227
|
+
|
|
228
|
+
> Mix ingredients {text}
|
|
229
|
+
|
|
230
|
+
### Baking {=#step-2 .HowToStep rdfs:label}
|
|
231
|
+
|
|
232
|
+
> Bake for 45 minutes {text}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Emits:
|
|
236
|
+
|
|
237
|
+
```turtle
|
|
238
|
+
tag:alice@example.com,2026:walnut-bread#steps a schema:HowTo .
|
|
239
|
+
tag:alice@example.com,2026:walnut-bread#step-1 a schema:HowToStep ; rdfs:label "Mixing" ; schema:text "Mix ingredients" .
|
|
240
|
+
tag:alice@example.com,2026:walnut-bread#step-2 a schema:HowToStep ; rdfs:label "Baking" ; schema:text "Bake for 45 minutes" .
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Fragments always attach to the **current subject base**.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 8. Blockquotes = descriptions, abstracts, notes
|
|
248
|
+
|
|
249
|
+
```md
|
|
250
|
+
> A dense, rustic bread with toasted walnuts. {description}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Readable prose → structured data.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 9. Code blocks are first-class values
|
|
258
|
+
|
|
259
|
+
````md
|
|
260
|
+
[alice] <tag:alice@example.com,2026:>
|
|
261
|
+
|
|
262
|
+
```txt {=alice:walnut-bread#formula .Recipe text}
|
|
263
|
+
500g flour
|
|
264
|
+
300ml water
|
|
265
|
+
```
|
|
266
|
+
````
|
|
267
|
+
|
|
268
|
+
Code content becomes a literal.
|
|
269
|
+
Language fences stay intact.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## 10. Reverse relations (write from either side)
|
|
274
|
+
|
|
275
|
+
```md
|
|
276
|
+
[alice] <tag:alice@example.com,2026:>
|
|
277
|
+
|
|
278
|
+
Used in: {!hasIngredient}
|
|
279
|
+
|
|
280
|
+
- Salad {=alice:salad}
|
|
281
|
+
````
|
|
282
|
+
|
|
283
|
+
Same graph. Different narrative flow.
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
## 11. What MD-LD never does
|
|
288
|
+
|
|
289
|
+
* ❌ No implicit meaning
|
|
290
|
+
* ❌ No blank nodes
|
|
291
|
+
* ❌ No inferred subjects
|
|
292
|
+
* ❌ No structural guessing
|
|
293
|
+
* ❌ No multi-pass parsing
|
|
294
|
+
* ❌ **No semantic list propagation**
|
|
295
|
+
|
|
296
|
+
Every triple is **authored**, not derived.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## 12. Why this scales (humans + agents)
|
|
301
|
+
|
|
302
|
+
Because MD-LD is:
|
|
303
|
+
|
|
304
|
+
* **Streaming-parseable**
|
|
305
|
+
* **Round-trip safe**
|
|
306
|
+
* **Text-preserving**
|
|
307
|
+
* **SPARQL-addressable**
|
|
308
|
+
|
|
309
|
+
Agents can:
|
|
310
|
+
|
|
311
|
+
* align facts via SPARQL
|
|
312
|
+
* add/remove triples
|
|
313
|
+
* serialize changes back into Markdown
|
|
314
|
+
without breaking prose, layout, or intent.
|
|
315
|
+
|
|
316
|
+
Your document becomes a **shared semantic surface**, not a data export.
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
## One sentence summary
|
|
321
|
+
|
|
322
|
+
> **MD-LD is RDF you can read, write, diff, query, and share—without ever leaving Markdown.**
|
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
# Primary
|
|
1
|
+
# Primary Metadata Example
|
|
2
2
|
|
|
3
|
-
This example demonstrates the Primary
|
|
3
|
+
This example demonstrates the Primary Metadata feature in MD-LD, which provides immediate access to the main entity, type, and label described by a document.
|
|
4
|
+
|
|
5
|
+
## Primary Metadata Trio
|
|
6
|
+
|
|
7
|
+
MD-LD tracks three primary metadata fields during parsing to provide immediate document identity:
|
|
8
|
+
|
|
9
|
+
| Field | Source | Purpose |
|
|
10
|
+
|-------|--------|---------|
|
|
11
|
+
| **primarySubject** | First non-fragment `{=subject}` | Document identity |
|
|
12
|
+
| **primaryType** | First `.Class` declaration | Document category |
|
|
13
|
+
| **primaryLabel** | First `{label}` literal | Human-readable name |
|
|
4
14
|
|
|
5
15
|
## What is a Primary Subject?
|
|
6
16
|
|
|
7
17
|
The Primary Subject is the first non-fragment subject declaration (`{=IRI}`) in a document. It provides a deterministic way to identify the central focus of a document.
|
|
8
18
|
|
|
19
|
+
## What is a Primary Type?
|
|
20
|
+
|
|
21
|
+
The Primary Type is the first `rdf:type` declaration associated with the Primary Subject. It provides a way to identify the type of the main entity described by a document.
|
|
22
|
+
|
|
23
|
+
## What is a Primary Label?
|
|
24
|
+
|
|
25
|
+
The Primary Label is the first `rdfs:label` literal associated with the Primary Subject. It provides a human-readable name for the main entity described by a document.
|
|
26
|
+
|
|
9
27
|
## Example Document
|
|
10
28
|
|
|
11
29
|
```markdown
|
|
@@ -22,21 +40,26 @@ The Primary Subject is the first non-fragment subject declaration (`{=IRI}`) in
|
|
|
22
40
|
This article explains the Primary Subject concept in MD-LD, which allows applications to quickly identify the main entity described by a document.
|
|
23
41
|
```
|
|
24
42
|
|
|
25
|
-
## Parsing with Primary
|
|
43
|
+
## Parsing with Primary Metadata
|
|
26
44
|
|
|
27
45
|
```javascript
|
|
28
46
|
import { parse } from 'mdld-parse';
|
|
29
47
|
|
|
30
|
-
const md = `[ex] <
|
|
48
|
+
const md = `[ex] <tag:alice@example.org,2026:articles/>
|
|
31
49
|
[schema] <http://schema.org/>
|
|
32
50
|
|
|
33
|
-
#
|
|
34
|
-
|
|
51
|
+
# Understanding Primary Subjects {=ex:understanding-primary-subject .schema:Article label}
|
|
52
|
+
`;
|
|
35
53
|
|
|
36
54
|
const result = parse({ text: md });
|
|
37
55
|
|
|
38
|
-
console.log(result.primarySubject);
|
|
39
|
-
|
|
56
|
+
console.log('Primary Subject:', result.primarySubject);
|
|
57
|
+
console.log('Primary Type:', result.primaryType);
|
|
58
|
+
console.log('Primary Label:', result.primaryLabel);
|
|
59
|
+
// Output:
|
|
60
|
+
// Primary Subject: tag:alice@example.org,2026:articles/understanding-primary-subject
|
|
61
|
+
// Primary Type: http://schema.org/Article
|
|
62
|
+
// Primary Label: Understanding Primary Subjects
|
|
40
63
|
```
|
|
41
64
|
|
|
42
65
|
## Key Behaviors
|
|
@@ -98,10 +121,13 @@ console.log(result.primarySubjects.map(s => s.value));
|
|
|
98
121
|
|
|
99
122
|
## Use Cases
|
|
100
123
|
|
|
101
|
-
- **Document
|
|
124
|
+
- **Document Identity** - Primary subject + type + label provide complete document fingerprint
|
|
125
|
+
- **Stream Addressing** - Perfect for Nostr tags and distributed systems
|
|
102
126
|
- **Merge Tracking** - Track which entities are being merged across documents
|
|
103
|
-
- **UI Navigation** - Provide
|
|
104
|
-
- **Query Optimization** - Use primary
|
|
127
|
+
- **UI Navigation** - Provide default focus and display information for document viewers
|
|
128
|
+
- **Query Optimization** - Use primary metadata as default query context and filters
|
|
129
|
+
- **Content Classification** - Automatic categorization based on primary type
|
|
130
|
+
- **Search Indexing** - Use primary label for human-readable search results
|
|
105
131
|
|
|
106
132
|
## RDF Philosophy Alignment
|
|
107
133
|
|
|
@@ -180,8 +206,13 @@ const doc1 = `[blog] <https://example.com/blog/>
|
|
|
180
206
|
[Hello World] {schema:headline}`;
|
|
181
207
|
|
|
182
208
|
const result1 = parse({ text: doc1, context: { blog: 'https://example.com/blog/', schema: 'http://schema.org/' } });
|
|
183
|
-
console.log('Primary
|
|
184
|
-
|
|
209
|
+
console.log('Primary Subject:', result1.primarySubject);
|
|
210
|
+
console.log('Primary Type:', result1.primaryType);
|
|
211
|
+
console.log('Primary Label:', result1.primaryLabel);
|
|
212
|
+
// Output:
|
|
213
|
+
// Primary Subject: https://example.com/blog/post1
|
|
214
|
+
// Primary Type: http://schema.org/BlogPosting
|
|
215
|
+
// Primary Label: My First Post
|
|
185
216
|
|
|
186
217
|
// Multiple documents
|
|
187
218
|
const doc2 = `[blog] <https://example.com/blog/>
|
|
@@ -194,6 +225,26 @@ console.log('Primary subjects:', merged.primarySubjects);
|
|
|
194
225
|
// Output: ['https://example.com/blog/post1', 'https://example.com/blog/post2']
|
|
195
226
|
```
|
|
196
227
|
|
|
228
|
+
## Document Identity Trio
|
|
229
|
+
|
|
230
|
+
The primary metadata trio provides sufficient document/append stream identity for most scenarios:
|
|
231
|
+
|
|
232
|
+
```javascript
|
|
233
|
+
// Nostr integration example
|
|
234
|
+
const nostrTags = [
|
|
235
|
+
['s', result.primarySubject], // subject addressing
|
|
236
|
+
['t', result.primaryType], // type filtering
|
|
237
|
+
['d', result.primaryLabel] // display identifier
|
|
238
|
+
];
|
|
239
|
+
|
|
240
|
+
// Document fingerprint
|
|
241
|
+
const fingerprint = {
|
|
242
|
+
subject: result.primarySubject, // What the document is about
|
|
243
|
+
type: result.primaryType, // What kind of document
|
|
244
|
+
label: result.primaryLabel // Human-readable name
|
|
245
|
+
};
|
|
246
|
+
```
|
|
247
|
+
|
|
197
248
|
## Specification
|
|
198
249
|
|
|
199
250
|
For complete details on Primary Subject semantics, see the [MD-LD Specification](../spec/Spec.md#17-primary-subject).
|
|
@@ -6,28 +6,26 @@ A controlled vocabulary.
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
#
|
|
9
|
+
# Task Shape {=ex:TaskShape .sh:NodeShape label}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Targets all [Task] {+ex:Task ?sh:targetClass} instances to have at least one [status] {+#status ?sh:property sh:name}.
|
|
12
12
|
|
|
13
|
-
## Status Property {
|
|
13
|
+
## Status Property {=#status .sh:PropertyShape}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Required: [1] {sh:minCount ^^xsd:integer}
|
|
15
|
+
Has at least [1] {sh:minCount ^^xsd:integer} [status] {+ex:status ?sh:path} value.
|
|
18
16
|
|
|
19
17
|
---
|
|
20
18
|
|
|
21
19
|
# Test Data
|
|
22
20
|
|
|
23
|
-
##
|
|
21
|
+
## Task with status {=ex:task-valid .ex:Task label}
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
[active] {+ex:Active ?ex:status}
|
|
26
24
|
|
|
27
|
-
|
|
25
|
+
This record should pass validation.
|
|
28
26
|
|
|
29
27
|
---
|
|
30
28
|
|
|
31
|
-
##
|
|
29
|
+
## Task without a status {=ex:task-invalid .ex:Task label}
|
|
32
30
|
|
|
33
31
|
This record should fail validation - missing required status.
|
|
@@ -1,18 +1,119 @@
|
|
|
1
|
-
[
|
|
1
|
+
[j] <tag:alice@example.com,2026:journal:>
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Personal Journal {=j:index .prov:Collection label}
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Daily journal with proper PROV-O provenance and temporal structure.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Includes records for [2026] {+j:2026/index ?prov:hadMember}.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Year 2026 {=j:2026/index .prov:Activity .prov:Collection label}
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
This is all notes made in 2026 collection. It includes monthly collections:
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
- January {+j:2026/01/index ?prov:hadMember}
|
|
14
|
+
- February {+j:2026/02/index ?prov:hadMember}
|
|
15
|
+
- March {+j:2026/03/index ?prov:hadMember}
|
|
16
|
+
- April {+j:2026/04/index ?prov:hadMember}
|
|
17
|
+
- May {+j:2026/05/index ?prov:hadMember}
|
|
14
18
|
|
|
15
|
-
|
|
19
|
+
## May 2026 {=j:2026/05/index .prov:Activity .prov:Collection label}
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
Started: [2026-05-01T00:00:00+04:00] {prov:startedAtTime ^^xsd:dateTime}
|
|
22
|
+
|
|
23
|
+
We have 5 weeks in May - [1-3] {+j:2026/05/week-1/index ?prov:hadMember}, [4-10] {+j:2026/05/week-2/index ?prov:hadMember}, [11-17] {+j:2026/05/week-3/index ?prov:hadMember}, [18-24] {+j:2026/05/week-4/index ?prov:hadMember}, [25-31] {+j:2026/05/week-5/index ?prov:hadMember}.
|
|
24
|
+
|
|
25
|
+
======
|
|
26
|
+
|
|
27
|
+
#### 06 May 2026 {=j:2026/05/06/index .prov:Activity label}
|
|
28
|
+
|
|
29
|
+
It's our first record in [week 2] {+j:2026/05/week-2/index ?prov:wasInformedBy}.
|
|
30
|
+
|
|
31
|
+
Complete day with activities, locations, and emotional state.
|
|
32
|
+
|
|
33
|
+
Started: [2026-05-06T08:00:00+04:00] {prov:startedAtTime ^^xsd:dateTime}
|
|
34
|
+
Ended: [2026-05-06T23:30:00+04:00] {prov:endedAtTime ^^xsd:dateTime}
|
|
35
|
+
|
|
36
|
+
Includes these activities: [morning] {+#morning !prov:wasInformedBy}, [afternoon] {+#afternoon !prov:wasInformedBy} and [social] {+#social !prov:wasInformedBy}.
|
|
37
|
+
|
|
38
|
+
### Morning Activities {=#morning .prov:Activity label}
|
|
39
|
+
|
|
40
|
+
I had a [walk] {+#walk ?prov:wasInformedBy} and a [coffee] {+#coffee-prep ?prov:wasInformedBy}.
|
|
41
|
+
|
|
42
|
+
**Morning Walk** {=#walk .prov:Activity label}
|
|
43
|
+
- Duration: [45] {j:duration ^^xsd:integer} minutes
|
|
44
|
+
- Distance: [2.5] {j:distance ^^xsd:decimal} miles
|
|
45
|
+
- Location: [Central Park] {+j:place/central-park .prov:Location ?prov:atLocation}
|
|
46
|
+
- Equipment: [Running Shoes] {+j:shoes/running ?prov:used}
|
|
47
|
+
- Generated: [Heart Rate Data] {+j:2026/05/06/hr-data ?prov:generated}
|
|
48
|
+
|
|
49
|
+
**Coffee Preparation** {=#coffee-prep .prov:Activity ?prov:used}
|
|
50
|
+
- Location: [Home] {+j:place/home ?prov:atLocation}
|
|
51
|
+
- Resources: [Coffee Beans] {+j:coffee/beans ?prov:used}, [Water] {+j:coffee/water ?prov:used}
|
|
52
|
+
- Generated: [Morning Coffee] {+#morning-coffee ?prov:generated}
|
|
53
|
+
|
|
54
|
+
### Afternoon Activities {=#afternoon .prov:Activity label}
|
|
55
|
+
|
|
56
|
+
**Reading Session** {=#reading .prov:Activity}
|
|
57
|
+
- Book: [Dune] {+j:dune-book .prov:Entity ?prov:used}
|
|
58
|
+
- Pages: [42] {j:pages ^^xsd:integer}
|
|
59
|
+
- Duration: [2] {j:hours ^^xsd:integer}
|
|
60
|
+
- Generated: [Reading Notes] {+j:reading-notes ?prov:generated}
|
|
61
|
+
|
|
62
|
+
**Work Session** {+j:work .prov:Activity ?prov:used}
|
|
63
|
+
- Task: [API Documentation] {+j:api-docs .prov:Entity ?prov:used}
|
|
64
|
+
- Duration: [3] {j:hours ^^xsd:integer}
|
|
65
|
+
- Generated: [Documentation Updates] {+j:doc-updates ?prov:generated}
|
|
66
|
+
|
|
67
|
+
### Social Interactions {=#social .prov:Activity label}
|
|
68
|
+
|
|
69
|
+
**Coffee Meeting** {+j:coffee-meeting .prov:Activity ?prov:used}
|
|
70
|
+
- Associated with: [Sam] {+j:sam .prov:Person ?prov:wasAssociatedWith}
|
|
71
|
+
- Location: [Local Cafe] {+j:cafe .prov:Location ?prov:atLocation}
|
|
72
|
+
- Duration: [30] {j:minutes ^^xsd:integer}
|
|
73
|
+
- Topic: [Career Changes] {j:topic}
|
|
74
|
+
|
|
75
|
+
## Emotional State Tracking {=#emotional-state .prov:Entity label}
|
|
76
|
+
|
|
77
|
+
Daily mood and energy levels with temporal context.
|
|
78
|
+
|
|
79
|
+
### Mood Data {=j:mood-data .prov:Entity label}
|
|
80
|
+
Date: [2026-05-06] {j:date ^^xsd:date}
|
|
81
|
+
Mood: [happy] {j:mood}
|
|
82
|
+
Energy level: [8] {j:energy ^^xsd:integer} out of 10
|
|
83
|
+
Stress level: [2] {j:stress ^^xsd:integer} out of 10
|
|
84
|
+
|
|
85
|
+
### Location History {=j:location-history .prov:Entity label}
|
|
86
|
+
Places visited with frequency and context.
|
|
87
|
+
|
|
88
|
+
Locations:
|
|
89
|
+
- [Central Park] {+j:central-park ?j:visited} - [3] {j:visitCount ^^xsd:integer} times this week
|
|
90
|
+
- [Local Cafe] {+j:cafe ?j:visited} - [2] {j:visitCount ^^xsd:integer} times this week
|
|
91
|
+
- [Home Office] {+j:home-office ?j:visited} - [5] {j:visitCount ^^xsd:integer} days this week
|
|
92
|
+
|
|
93
|
+
## Week 2 May 2026 {=j:2026/05/week-2/index .prov:Activity .prov:Collection label}
|
|
94
|
+
|
|
95
|
+
Started: [2026-05-04T00:00:00+04:00] {prov:startedAtTime ^^xsd:dateTime}
|
|
96
|
+
|
|
97
|
+
Aggregated activities and patterns for the week.
|
|
98
|
+
|
|
99
|
+
Started: [2026-05-06T23:00:00Z] {prov:startedAtTime ^^xsd:dateTime}
|
|
100
|
+
Ended: [2026-05-06T23:15:00Z] {prov:endedAtTime ^^xsd:dateTime}
|
|
101
|
+
|
|
102
|
+
### Activities Summary
|
|
103
|
+
Total activities: [6] {j:totalActivities ^^xsd:integer}
|
|
104
|
+
Reading time: [5] {j:readingHours ^^xsd:integer} hours
|
|
105
|
+
Work time: [8] {j:workHours ^^xsd:integer} hours
|
|
106
|
+
Exercise time: [3] {j:exerciseHours ^^xsd:integer} hours
|
|
107
|
+
|
|
108
|
+
### Goals Progress
|
|
109
|
+
Weekly goals: [Set on Monday] {j:weeklyGoals}
|
|
110
|
+
Completed: [4] {j:goalsCompleted ^^xsd:integer} out of 5
|
|
111
|
+
Carry over: [1] {j:goalsCarryOver ^^xsd:integer} goal
|
|
112
|
+
|
|
113
|
+
This demonstrates:
|
|
114
|
+
- Proper PROV-O activity chains
|
|
115
|
+
- Temporal properties with XSD
|
|
116
|
+
- Location and emotional tracking
|
|
117
|
+
- Activity aggregation and summarization
|
|
118
|
+
- Social interaction modeling
|
|
18
119
|
|
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
[my] <tag:alice@example.com,2026
|
|
1
|
+
[my] <tag:alice@example.com,2026:minimal/>
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# Simple Note {=my:note .prov:Entity label}
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
DOI: [10.1234/ml.2024] {+https://doi.org/10.1234/ml.2024 ?my:doi}
|
|
5
|
+
This demonstrates basic MD-LD annotation patterns.
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
## Basic Properties
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Title: [Hello World] {my:title}
|
|
10
|
+
Status: *draft* {my:status}
|
|
11
|
+
Priority: **medium** {my:priority}
|
|
12
|
+
|
|
13
|
+
## Typed Values
|
|
14
|
+
|
|
15
|
+
Created: `2026-05-06` {my:created ^^xsd:date}
|
|
16
|
+
Count: `42` {my:count ^^xsd:integer}
|
|
17
|
+
Rating: __4.5__ {my:rating ^^xsd:decimal}
|
|
18
|
+
Active: **true** {my:active ^^xsd:boolean}
|
|
19
|
+
|
|
20
|
+
## Simple Link
|
|
21
|
+
|
|
22
|
+
Related to: [Example Project] {+my:example-project ?my:relatedTo .prov:Project label}
|
|
11
23
|
|