mdld-parse 0.3.4 → 0.4.0

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 CHANGED
@@ -265,7 +265,7 @@ Parse MD-LD markdown and return RDF quads with origin tracking.
265
265
 
266
266
  - `markdown` (string) — MD-LD formatted text
267
267
  - `options` (object, optional):
268
- - `context` (object) — Prefix mappings (default: `{ '@vocab': 'http://schema.org/', rdf, rdfs, xsd, schema }`)
268
+ - `context` (object) — Prefix mappings (default: `{ '@vocab': 'http://www.w3.org/2000/01/rdf-schema#', rdf, rdfs, xsd, schema }`)
269
269
  - `dataFactory` (object) — Custom RDF/JS DataFactory
270
270
 
271
271
  **Returns:** `{ quads, origin, context }`
@@ -280,7 +280,7 @@ Parse MD-LD markdown and return RDF quads with origin tracking.
280
280
 
281
281
  ```javascript
282
282
  const result = parse(
283
- `# Article {=ex:article .Article}
283
+ `# Article {=ex:article .ex:Article}
284
284
 
285
285
  [Alice] {=ex:alice ?author}`,
286
286
  { context: { ex: 'http://example.org/' } }
@@ -291,7 +291,7 @@ console.log(result.quads);
291
291
  // {
292
292
  // subject: { termType: 'NamedNode', value: 'http://example.org/article' },
293
293
  // predicate: { termType: 'NamedNode', value: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' },
294
- // object: { termType: 'NamedNode', value: 'http://schema.org/Article' }
294
+ // object: { termType: 'NamedNode', value: 'http://example.org/Article' }
295
295
  // },
296
296
  // ...
297
297
  // ]
@@ -430,16 +430,18 @@ Therefore, the algebra is **closed**.
430
430
  ### Personal Knowledge Management
431
431
 
432
432
  ```markdown
433
- # Meeting Notes {=urn:note:2024-01-15 .Meeting}
433
+ [alice] <tag:alice@example.com,2026:>
434
+
435
+ # Meeting Notes {=alice:meeting-2024-01-15 .Meeting}
434
436
 
435
437
  Attendees: {?attendee name}
436
438
 
437
- - Alice {=urn:person:alice}
438
- - Bob {=urn:person:bob}
439
+ - Alice {=alice:alice}
440
+ - Bob {=alice:bob}
439
441
 
440
442
  Action items: {?actionItem name}
441
443
 
442
- - Review proposal {=urn:task:1}
444
+ - Review proposal {=alice:task-1}
443
445
  ```
444
446
 
445
447
  ### Developer Documentation
@@ -460,10 +462,12 @@ curl https://api.example.com/users/123
460
462
  ### Academic Research
461
463
 
462
464
  ```markdown
463
- # Paper {=doi:10.1234/example .ScholarlyArticle}
465
+ [alice] <tag:alice@example.com,2026:>
466
+
467
+ # Paper {=alice:paper-semantic-markdown .ScholarlyArticle}
464
468
 
465
469
  [Semantic Web] {about}
466
- [Alice Johnson] {=orcid:0000-0001-2345-6789 author}
470
+ [Alice Johnson] {=alice:alice-johnson ?author}
467
471
  [2024-01] {datePublished ^^xsd:gYearMonth}
468
472
 
469
473
  > This paper explores semantic markup in Markdown. {abstract @en}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mdld-parse",
3
- "version": "0.3.4",
3
+ "version": "0.4.0",
4
4
  "description": "A standards-compliant parser for **MD-LD (Markdown-Linked Data)** — a human-friendly RDF authoring format that extends Markdown with semantic annotations.",
5
5
  "type": "module",
6
6
  "main": "index.js",
package/src/utils.js CHANGED
@@ -1,9 +1,10 @@
1
1
  export const DEFAULT_CONTEXT = {
2
- '@vocab': 'http://schema.org/',
2
+ '@vocab': "http://www.w3.org/2000/01/rdf-schema#",
3
3
  rdf: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',
4
4
  rdfs: 'http://www.w3.org/2000/01/rdf-schema#',
5
5
  xsd: 'http://www.w3.org/2001/XMLSchema#',
6
- schema: 'http://schema.org/'
6
+ sh: "http://www.w3.org/ns/shacl#",
7
+ prov: 'http://www.w3.org/ns/prov#'
7
8
  };
8
9
 
9
10
  export const DataFactory = {