mdld-parse 0.9.2 → 0.9.4

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.
Files changed (64) hide show
  1. package/dist/.nojekyll +0 -0
  2. package/dist/CNAME +1 -0
  3. package/dist/README.md +425 -0
  4. package/dist/docs/API.md +397 -0
  5. package/dist/docs/Architecture.md +190 -0
  6. package/dist/docs/Guide.md +816 -0
  7. package/dist/docs/LLM-MDLD-Inducer.md +550 -0
  8. package/dist/docs/Parser.md +654 -0
  9. package/dist/docs/Performance.md +238 -0
  10. package/dist/docs/Spec-render.md +1439 -0
  11. package/dist/docs/Subject.md +180 -0
  12. package/dist/docs/Syntax.md +463 -0
  13. package/dist/docs/TodoList.md +215 -0
  14. package/dist/docs/Use-Cases.md +354 -0
  15. package/dist/docs/guide-m.md +56 -0
  16. package/dist/docs/index.html +108 -0
  17. package/dist/docs/index.md +56 -0
  18. package/dist/docs/one-page.md +322 -0
  19. package/dist/docs/origin.md +459 -0
  20. package/dist/docs/polarity.md +586 -0
  21. package/dist/docs/primary-subject.md +199 -0
  22. package/dist/docs/statements.md +226 -0
  23. package/dist/docs/tokenization-performance-report.md +164 -0
  24. package/dist/examples/Cookbook.md +32 -0
  25. package/dist/examples/Status-SHACL.md +31 -0
  26. package/dist/examples/demo/index.md +35 -0
  27. package/dist/examples/demo/journal.md +119 -0
  28. package/dist/examples/demo/minimal.md +23 -0
  29. package/dist/examples/demo/project.md +98 -0
  30. package/dist/examples/demo/prov.md +107 -0
  31. package/dist/examples/demo/rdf.md +69 -0
  32. package/dist/examples/demo/recipe.md +95 -0
  33. package/dist/examples/demo/research.md +126 -0
  34. package/dist/examples/demo/shacl.md +161 -0
  35. package/dist/examples/demo/space-mission.md +129 -0
  36. package/dist/examples/demo/tasks.md +175 -0
  37. package/dist/examples/demo/xsd.md +91 -0
  38. package/dist/examples/dogfood.md +288 -0
  39. package/dist/examples/few-shot.md +309 -0
  40. package/dist/examples/graph/rdf-graph.html +473 -0
  41. package/dist/examples/graph/rdf_force_graph_web_component.html +506 -0
  42. package/dist/examples/index.md +45 -0
  43. package/dist/examples/llm-time-workflow.md +173 -0
  44. package/dist/examples/statements.md +43 -0
  45. package/dist/examples/workflow.md +150 -0
  46. package/dist/index.html +3253 -0
  47. package/dist/index.js +1770 -0
  48. package/dist/logo.svg +7 -0
  49. package/dist/spec/Spec-compact.md +363 -0
  50. package/dist/spec/Spec-ultra.md +221 -0
  51. package/dist/spec/Spec.md +1068 -0
  52. package/dist/spec/index.md +46 -0
  53. package/package.json +7 -8
  54. package/src/constants.js +0 -31
  55. package/src/generate.js +0 -245
  56. package/src/highlight.js +0 -362
  57. package/src/index.js +0 -13
  58. package/src/locate.js +0 -23
  59. package/src/merge.js +0 -157
  60. package/src/parse.js +0 -711
  61. package/src/render.js +0 -576
  62. package/src/shared.js +0 -577
  63. package/src/tokenizers.js +0 -594
  64. package/src/utils.js +0 -430
@@ -0,0 +1,161 @@
1
+ [sh] <http://www.w3.org/ns/shacl#>
2
+ [rdf] <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3
+ [rdfs] <http://www.w3.org/2000/01/rdf-schema#>
4
+ [xsd] <http://www.w3.org/2001/XMLSchema#>
5
+ [my] <tag:alice@example.com,2026:>
6
+
7
+ # SHACL Validation Demo {=my:shacl-demo .prov:Entity label}
8
+
9
+ Demonstrates SHACL validation shapes with self-documenting examples.
10
+
11
+ ## Person Validation Shape
12
+
13
+ ### Person Shape {=my:PersonShape .sh:NodeShape label}
14
+
15
+ Validates all [Person] {+my:Person ?sh:targetClass} nodes with proper constraints.
16
+
17
+ **Name Rule** {+my:PersonShape-name .sh:PropertyShape ?sh:property}
18
+ Path: [name] {+rdfs:label ?sh:path}
19
+ Required: [1] {sh:minCount ^^xsd:integer sh:maxCount ^^xsd:integer}
20
+ Datatype: [string] {+xsd:string ?sh:datatype}
21
+
22
+ > Every person must have exactly one name. {sh:message}
23
+
24
+ **Email Rule** {+my:PersonShape-email .sh:PropertyShape ?sh:property}
25
+ Path: [email] {+my:email ?sh:path}
26
+ Required: [1] {sh:minCount ^^xsd:integer}
27
+ Datatype: [string] {+xsd:string ?sh:datatype}
28
+ Pattern: [.*@.*] {sh:pattern}
29
+
30
+ > Email must be a valid email address. {sh:message}
31
+
32
+ **Age Rule** {+my:PersonShape-age .sh:PropertyShape ?sh:property}
33
+ Path: [age] {+my:age ?sh:path}
34
+ Datatype: [integer] {+xsd:integer ?sh:datatype}
35
+ Minimum: [0] {sh:minInclusive ^^xsd:integer}
36
+ Maximum: [150] {sh:maxInclusive ^^xsd:integer}
37
+
38
+ > Age must be between 0 and 150 years. {sh:message}
39
+
40
+ ## Test Data
41
+
42
+ ### Valid Person {=my:valid-person .my:Person label}
43
+
44
+ Name: [Alice Smith] {rdfs:label}
45
+ Email: [alice@example.com] {my:email}
46
+ Age: [30] {my:age ^^xsd:integer}
47
+
48
+ ### Invalid Person {=my:invalid-person .my:Person label}
49
+
50
+ Name: [Bob] {rdfs:label}
51
+ Age: [-5] {my:age ^^xsd:integer}
52
+
53
+ ## Product Validation Shape
54
+
55
+ ### Product Shape {=my:ProductShape .sh:NodeShape label}
56
+
57
+ Validates [Product] {+my:Product ?sh:targetClass} nodes with business rules.
58
+
59
+ **SKU Rule** {+my:ProductShape-sku .sh:PropertyShape ?sh:property}
60
+ Path: [sku] {+my:sku ?sh:path}
61
+ Required: [1] {sh:minCount ^^xsd:integer sh:maxCount ^^xsd:integer}
62
+ Datatype: [string] {+xsd:string ?sh:datatype}
63
+ Min length: [3] {sh:minLength ^^xsd:integer}
64
+ Max length: [50] {sh:maxLength ^^xsd:integer}
65
+
66
+ > Product SKU must be 3-50 characters. {sh:message}
67
+
68
+ **Price Rule** {+my:ProductShape-price .sh:PropertyShape ?sh:property}
69
+ Path: [price] {+my:price ?sh:path}
70
+ Required: [1] {sh:minCount ^^xsd:integer}
71
+ Datatype: [decimal] {+xsd:decimal ?sh:datatype}
72
+ Minimum: [0.01] {sh:minInclusive ^^xsd:decimal}
73
+
74
+ > Product price must be positive. {sh:message}
75
+
76
+ **Category Rule** {+my:ProductShape-category .sh:PropertyShape ?sh:property}
77
+ Path: [category] {+my:category ?sh:path}
78
+ Required: [1] {sh:minCount ^^xsd:integer}
79
+ In: [Electronics, Books, Clothing] {+my:categories ?sh:in}
80
+
81
+ > Category must be one of: Electronics, Books, Clothing. {sh:message}
82
+
83
+ ## Test Data
84
+
85
+ ### Valid Product {=my:valid-product .my:Product label}
86
+
87
+ SKU: [ELEC-001] {my:sku}
88
+ Name: [Wireless Mouse] {rdfs:label}
89
+ Price: [29.99] {my:price ^^xsd:decimal}
90
+ Category: [Electronics] {my:category}
91
+
92
+ ### Invalid Product {=my:invalid-product .my:Product label}
93
+
94
+ SKU: [AB] {my:sku}
95
+ Price: [-10.00] {my:price ^^xsd:decimal}
96
+ Category: [Toys] {my:category}
97
+
98
+ ## Complex Validation Shape
99
+
100
+ ### Order Validation Shape {=my:OrderShape .sh:NodeShape label}
101
+
102
+ Validates [Order] {+my:Order ?sh:targetClass} with conditional logic.
103
+
104
+ **Customer Rule** {=my:OrderShape-customer .sh:PropertyShape ?sh:property}
105
+ Path: [customer] {+my:customer ?sh:path}
106
+ Required: [1] {sh:minCount ^^xsd:integer}
107
+ Node: [Person] {+my:Person ?sh:node}
108
+
109
+ > Order must have a valid customer. {sh:message}
110
+
111
+ **Items Rule** {=my:OrderShape-items .sh:PropertyShape ?sh:property}
112
+ Path: [items] {+my:items ?sh:path}
113
+ Min count: [1] {sh:minCount ^^xsd:integer}
114
+ Node kind: [BlankNodeOrIRI] {+sh:BlankNodeOrIRI ?sh:nodeKind}
115
+
116
+ > Order must have at least one item. {sh:message}
117
+
118
+ **Total Validation** {=my:OrderShape-total .sh:PropertyShape ?sh:property}
119
+ Path: [total] {+my:total ?sh:path}
120
+ Datatype: [decimal] {+xsd:decimal ?sh:datatype}
121
+ Min inclusive: [0.01] {sh:minInclusive ^^xsd:decimal}
122
+
123
+ > Order total must be positive. {sh:message}
124
+
125
+ ## Logical Constraints
126
+
127
+ ### Exclusive Properties Shape {=my:ExclusiveShape .sh:NodeShape label}
128
+
129
+ Shows OR (sh:or) and XOR (sh:xone) constraints.
130
+
131
+ **Either/Or Rule** {=my:ExclusiveShape-either .sh:PropertyShape ?sh:property}
132
+ Path: [identifier] {+my:identifier ?sh:path}
133
+ Or: [email, phone] {+my:email ?sh:or +my:phone ?sh:property}
134
+
135
+ > Must have either email OR phone. {sh:message}
136
+
137
+ **Exactly One/XOne Rule** {=my:ExclusiveShape-exactly .sh:PropertyShape ?sh:property}
138
+ Path: [primaryContact] {+my:primaryContact ?sh:path}
139
+ Xone: [email, phone] {+my:email ?sh:xone +my:phone ?sh:property}
140
+
141
+ > Must have exactly one primary contact method. {sh:message}
142
+
143
+ ## Test Data
144
+
145
+ ### Valid Contact {=my:valid-contact .my:Person label}
146
+
147
+ Email: [contact@example.com] {my:email}
148
+ Phone: [555-1234] {my:phone}
149
+ Primary contact: [email] {my:primaryContact}
150
+
151
+ ### Invalid Contact {=my:invalid-contact .my:Person label}
152
+
153
+ Phone: [555-5678] {my:phone}
154
+ Primary contact: [email] {my:primaryContact}
155
+
156
+ This demonstrates:
157
+ - NodeShape targeting with sh:targetClass
158
+ - PropertyShape constraints (datatype, min/max, patterns)
159
+ - Logical constraints (sh:or, sh:xone, sh:in)
160
+ - Self-validating examples with clear violations
161
+ - Complex validation scenarios
@@ -0,0 +1,129 @@
1
+ [prov] <http://www.w3.org/ns/prov#>
2
+ [nasa] <http://nasa.gov/>
3
+ [xsd] <http://www.w3.org/2001/XMLSchema#>
4
+
5
+ # Apollo 11 Mission {=nasa:apollo11 .prov:Activity label}
6
+
7
+ Historic lunar landing mission with complete provenance tracking.
8
+
9
+ ## Mission Overview {=nasa:mission-overview .prov:Entity label}
10
+
11
+ Launch date: [1969-07-16] {nasa:launchDate ^^xsd:date}
12
+ Landing date: [1969-07-20] {nasa:landingDate ^^xsd:date}
13
+ Mission duration: [8] {nasa:durationDays ^^xsd:integer} days
14
+ Budget: [$2.5] {nasa:budget ^^xsd:decimal} billion USD
15
+ Status: [Success] {nasa:missionStatus}
16
+
17
+ ## Mission Timeline {=nasa:timeline .prov:Activity label}
18
+
19
+ Complete chronological sequence of mission events.
20
+
21
+ ### Launch Phase {=nasa:launch .prov:Activity label}
22
+ Started: [1969-07-16T13:32:00Z] {prov:startedAtTime ^^xsd:dateTime}
23
+ Ended: [1969-07-16T13:35:00Z] {prov:endedAtTime ^^xsd:dateTime}
24
+ Associated with: [Launch Team] {+nasa:launch-team ?prov:wasAssociatedWith .prov:Organization}
25
+ Used: [Saturn V Rocket] {+nasa:saturnv .nasa:Rocket ?prov:used}
26
+ Generated: [Earth Orbit] {+nasa:earth-orbit ?prov:generated}
27
+
28
+ ### Trans-Lunar Injection {=nasa:tli .prov:Activity label}
29
+ Started: [1969-07-16T13:35:00Z] {prov:startedAtTime ^^xsd:dateTime}
30
+ Ended: [1969-07-16T16:00:00Z] {prov:endedAtTime ^^xsd:dateTime}
31
+ Informed by: [Launch Phase] {+nasa:launch ?prov:wasInformedBy}
32
+ Used: [Saturn V S-IVB Stage] {+nasa:saturnv-stage ?prov:used}
33
+ Generated: [Lunar Trajectory] {+nasa:lunar-trajectory ?prov:generated}
34
+
35
+ ### Lunar Landing {=nasa:landing .prov:Activity label}
36
+ Started: [1969-07-20T20:05:00Z] {prov:startedAtTime ^^xsd:dateTime}
37
+ Ended: [1969-07-20T20:17:00Z] {prov:endedAtTime ^^xsd:dateTime}
38
+ Informed by: [Trans-Lunar Injection] {+nasa:tli ?prov:wasInformedBy}
39
+ Used: [LM Eagle] {+nasa:eagle .nasa:Module ?prov:used}
40
+ Generated: [Lunar Surface Presence] {+nasa:lunar-presence ?prov:generated}
41
+
42
+ ## Personnel {=nasa:crew .prov:Entity label}
43
+
44
+ Mission crew with defined roles and responsibilities.
45
+
46
+ ### Mission Commander {=nasa:armstrong .prov:Person label}
47
+ Name: [Neil Armstrong] {rdfs:label}
48
+ Born: [1930-08-05] {nasa:birthDate ^^xsd:date}
49
+ Role: [Commander] {nasa:missionRole}
50
+ First step: [First human on Moon] {nasa:achievement}
51
+
52
+ ### Lunar Module Pilot {=nasa:aldrin .prov:Person label}
53
+ Name: [Buzz Aldrin] {rdfs:label}
54
+ Born: [1930-01-20] {nasa:birthDate ^^xsd:date}
55
+ Role: [Lunar Module Pilot] {nasa:missionRole}
56
+ EVA duration: [2h 18m] {nasa:evaDuration ^^xsd:string}
57
+
58
+ ### Command Module Pilot {=nasa:collins .prov:Person label}
59
+ Name: [Michael Collins] {rdfs:label}
60
+ Born: [1930-10-31] {nasa:birthDate ^^xsd:date}
61
+ Role: [Command Module Pilot] {nasa:missionRole}
62
+ Responsibility: [Orbital operations] {nasa:responsibility}
63
+
64
+ ## Equipment {=nasa:equipment .prov:Entity label}
65
+
66
+ All mission hardware and systems used.
67
+
68
+ ### Launch Vehicle {=nasa:saturnv .nasa:Rocket label}
69
+ Name: [Saturn V] {rdfs:label}
70
+ Manufacturer: [Boeing] {nasa:manufacturer}
71
+ Height: [363] {nasa:height ^^xsd:integer} ft
72
+ Thrust: [7.6] {nasa:thrust ^^xsd:decimal} million lbs
73
+
74
+ ### Lunar Module {=nasa:eagle .nasa:Module label}
75
+ Name: [Eagle] {rdfs:label}
76
+ Manufacturer: [Grumman Aircraft] {nasa:manufacturer}
77
+ Mass: [15,897] {nasa:mass ^^xsd:decimal} lb
78
+ Crew capacity: [2] {nasa:crewCapacity ^^xsd:integer}
79
+
80
+ ### Command Module {=nasa:columbia .nasa:Module label}
81
+ Name: [Columbia] {rdfs:label}
82
+ Manufacturer: [North American Aviation] {nasa:manufacturer}
83
+ Mass: [28,801] {nasa:mass ^^xsd:decimal} lb
84
+ Crew capacity: [3] {nasa:crewCapacity ^^xsd:integer}
85
+
86
+ ## Mission Objectives {=nasa:objectives .prov:Entity label}
87
+
88
+ Primary goals and their achievement status.
89
+
90
+ ### Primary Objective {=nasa:primary-goal .nasa:Goal label}
91
+ Description: [Land humans on Moon and return safely] {rdfs:label}
92
+ Status: [Achieved] {nasa:achievementStatus}
93
+ Achievement date: [1969-07-20] {nasa:achievementDate ^^xsd:date}
94
+
95
+ ### Secondary Objectives
96
+
97
+ #### Lunar Sample Collection {=nasa:sample-goal .nasa:Goal label}
98
+ Description: [Collect lunar samples for scientific analysis] {rdfs:label}
99
+ Status: [Achieved] {nasa:achievementStatus}
100
+ Sample weight: [21.5] {nasa:sampleWeight ^^xsd:decimal} kg
101
+
102
+ #### EVA Operations {=nasa:eva-goal .nasa:Goal label}
103
+ Description: [Conduct extravehicular activities] {rdfs:label}
104
+ Status: [Achieved] {nasa:achievementStatus}
105
+ EVA duration: [2h 18m] {nasa:evaDuration ^^xsd:string}
106
+
107
+ ## Mission Control {=nasa:mission-control .prov:Organization label}
108
+
109
+ Ground support team with delegation structure.
110
+
111
+ ### Flight Directors {=nasa:flight-directors .prov:Organization label}
112
+ Role: [Mission supervision] {nasa:role}
113
+ Personnel: [Gene Kranz, Glynn Lunney, Gerald Griffin] {nasa:personnel}
114
+
115
+ ### Delegation Pattern {=nasa:operation-delegation .prov:Delegation ?prov:qualifiedDelegation}
116
+
117
+ NASA Administrator delegates operational authority to Mission Control.
118
+
119
+ Delegator: [NASA Administrator] {+nasa:admin ?prov:delegate}
120
+ Responsible: [Mission Control] {+nasa:mission-control ?prov:responsible}
121
+ Activity: [Flight Operations] {+nasa:flight-ops ?prov:hadActivity}
122
+ Role: [Flight Director] {+nasa:flight-director ?prov:hadRole}
123
+
124
+ This demonstrates:
125
+ - Complete PROV-O activity chains
126
+ - Proper temporal properties with XSD
127
+ - Organizational structure and delegation
128
+ - Equipment tracking and relationships
129
+ - Goal achievement modeling
@@ -0,0 +1,175 @@
1
+ [rdf] <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
2
+ [rdfs] <http://www.w3.org/2000/01/rdf-schema#>
3
+ [xsd] <http://www.w3.org/2001/XMLSchema#>
4
+ [prov] <http://www.w3.org/ns/prov#>
5
+ [sh] <http://www.w3.org/ns/shacl#>
6
+ [my] <tag:alice@example.com,2026:>
7
+
8
+ # Task Management System {=my:taskSystem .rdfs:Resource label}
9
+
10
+ Comprehensive task management combining multiple W3C ontologies for real-world workflow automation.
11
+
12
+ ## Ontology Foundation
13
+
14
+ ### User Class {=my:User .rdfs:Class label}
15
+
16
+ A user is a person who can be assigned tasks and projects.
17
+
18
+ Subclass of: [Person] {+rdfs:Person ?rdfs:subClassOf}
19
+
20
+ Properties:
21
+ - **Name**: [string] {+xsd:string ?rdfs:range}
22
+ - **Email**: [string] {+xsd:string ?rdfs:range}
23
+ - **Active**: [boolean] {+xsd:boolean ?rdfs:range}
24
+ - **Created**: [dateTime] {+xsd:dateTime ?rdfs:range}
25
+
26
+ ### Task Class {=my:Task .rdfs:Class label}
27
+
28
+ A task represents work to be completed with status and priority.
29
+
30
+ Subclass of: [Entity] {+rdfs:Resource ?rdfs:subClassOf}
31
+
32
+ Properties:
33
+ - **Title**: [string] {+xsd:string ?rdfs:range}
34
+ - **Description**: [string] {+xsd:string ?rdfs:range}
35
+ - **Status**: [string] {+xsd:string ?rdfs:range}
36
+ - **Priority**: [integer] {+xsd:integer ?rdfs:range}
37
+ - **Due Date**: [dateTime] {+xsd:dateTime ?rdfs:range}
38
+ - **Assigned To**: [User] {+my:User ?rdfs:range}
39
+
40
+ ### Project Class {=my:Project .rdfs:Class label}
41
+
42
+ A project contains multiple related tasks with timelines and goals.
43
+
44
+ Subclass of: [Entity] {+rdfs:Resource ?rdfs:subClassOf}
45
+
46
+ Properties:
47
+ - **Name**: [string] {+xsd:string ?rdfs:range}
48
+ - **Start Date**: [date] {+xsd:date ?rdfs:range}
49
+ - **End Date**: [date] {+xsd:date ?rdfs:range}
50
+ - **Status**: [string] {+xsd:string ?rdfs:range}
51
+ - **Budget**: [decimal] {+xsd:decimal ?rdfs:range}
52
+
53
+ ## Instance Data with Provenance
54
+
55
+ ### Project Alpha {=my:project-alpha .my:Project label}
56
+
57
+ Name: [Website Redesign] {rdfs:label}
58
+ Start date: [2026-06-01] {my:startDate ^^xsd:date}
59
+ End date: [2026-08-31] {my:endDate ^^xsd:date}
60
+ Budget: [50000.00] {my:budget ^^xsd:decimal}
61
+ Status: [active] {my:status}
62
+
63
+ **Project Creation Activity** {=my:project-creation .prov:Activity label}
64
+ - Started: [2026-05-15T09:00:00Z] {prov:startedAtTime ^^xsd:dateTime}
65
+ - Associated with: [Project Manager] {+my:project-manager .prov:Person ?prov:wasAssociatedWith}
66
+ - Used: [Requirements Document] {+my:requirements ?prov:used}
67
+ - Generated: [Project Alpha] {+my:project-alpha ?prov:generated}
68
+
69
+ ### Task Instances
70
+
71
+ #### Design Task {=my:task-design .my:Task label}
72
+
73
+ Title: [Design Homepage Layout] {rdfs:label}
74
+ Description: [Create responsive design for main website pages] {my:description}
75
+ Status: [in-progress] {my:status}
76
+ Priority: [1] {my:priority ^^xsd:integer}
77
+ Due date: [2026-06-15T17:00:00Z] {my:dueDate ^^xsd:dateTime}
78
+ Assigned to: [Alice Johnson] {+my:alice .my:User ?my:assignedTo}
79
+
80
+ **Task Assignment Activity** {=my:task-assignment .prov:Activity label}
81
+ - Started: [2026-06-01T10:00:00Z] {prov:startedAtTime ^^xsd:dateTime}
82
+ - Associated with: [Alice Johnson] {+my:alice ?prov:wasAssociatedWith}
83
+ - Used: [Design Task] {+my:task-design ?prov:used}
84
+ - Generated: [Task Assignment Record] {+my:assignment-record ?prov:generated}
85
+
86
+ #### Development Task {=my:task-dev .my:Task label}
87
+
88
+ Title: [Implement Homepage Backend] {rdfs:label}
89
+ Description: [Build API endpoints and database schema for homepage] {my:description}
90
+ Status: [todo] {my:status}
91
+ Priority: [2] {my:priority ^^xsd:integer}
92
+ Due date: [2026-06-30T17:00:00Z] {my:dueDate ^^xsd:dateTime}
93
+ Assigned to: [Bob Smith] {+my:bob .my:User ?my:assignedTo}
94
+
95
+ #### Testing Task {=my:task-test .my:Task label}
96
+
97
+ Title: [Test Homepage Functionality] {rdfs:label}
98
+ Description: [Comprehensive testing of all homepage features] {my:description}
99
+ Status: [todo] {my:status}
100
+ Priority: [3] {my:priority ^^xsd:integer}
101
+ Due date: [2026-07-15T17:00:00Z] {my:dueDate ^^xsd:dateTime}
102
+ Assigned to: [Carol Davis] {+my:carol .my:User ?my:assignedTo}
103
+
104
+ ## SHACL Validation Shapes
105
+
106
+ ### User Validation Shape {=my:UserShape .sh:NodeShape label}
107
+
108
+ Validates all [User] {+my:User ?sh:targetClass} instances.
109
+
110
+ **Name Constraint** {=my:UserShape-name .sh:PropertyShape ?sh:property}
111
+ Path: [name] {+rdfs:label ?sh:path}
112
+ Required: [1] {sh:minCount ^^xsd:integer sh:maxCount ^^xsd:integer}
113
+ Datatype: [string] {+xsd:string ?sh:datatype}
114
+
115
+ > User must have exactly one name. {sh:message}
116
+
117
+ **Email Constraint** {=my:UserShape-email .sh:PropertyShape ?sh:property}
118
+ Path: [email] {+my:email ?sh:path}
119
+ Required: [1] {sh:minCount ^^xsd:integer}
120
+ Pattern: [.*@.*] {sh:pattern}
121
+
122
+ > User must have valid email address. {sh:message}
123
+
124
+ ### Task Validation Shape {=my:TaskShape .sh:NodeShape label}
125
+
126
+ Validates all [Task] {+my:Task ?sh:targetClass} instances.
127
+
128
+ **Status Constraint** {=my:TaskShape-status .sh:PropertyShape ?sh:property}
129
+ Path: [status] {+my:status ?sh:path}
130
+ Required: [1] {sh:minCount ^^xsd:integer}
131
+ In: [todo, in-progress, done, blocked] {+my:status-values ?sh:in}
132
+
133
+ > Task status must be one of: todo, in-progress, done, blocked. {sh:message}
134
+
135
+ **Priority Constraint** {=my:TaskShape-priority .sh:PropertyShape ?sh:property}
136
+ Path: [priority] {+my:priority ?sh:path}
137
+ Required: [1] {sh:minCount ^^xsd:integer}
138
+ Datatype: [integer] {+xsd:integer ?sh:datatype}
139
+ Minimum: [1] {sh:minInclusive ^^xsd:integer}
140
+ Maximum: [5] {sh:maxInclusive ^^xsd:integer}
141
+
142
+ > Task priority must be between 1 and 5. {sh:message}
143
+
144
+ ## Test Data for Validation
145
+
146
+ ### Valid User {=my:valid-user .my:User label}
147
+
148
+ Name: [Alice Johnson] {rdfs:label}
149
+ Email: [alice@example.com] {my:email}
150
+ Active: [true] {my:active ^^xsd:boolean}
151
+
152
+ ### Invalid User {=my:invalid-user .my:User label}
153
+
154
+ Name: [Bob] {rdfs:label}
155
+ Email: [invalid-email] {my:email}
156
+
157
+ ### Valid Task {=my:valid-task .my:Task label}
158
+
159
+ Title: [Complete Documentation] {rdfs:label}
160
+ Status: [done] {my:status}
161
+ Priority: [2] {my:priority ^^xsd:integer}
162
+ Due date: [2026-06-30T17:00:00Z] {my:dueDate ^^xsd:dateTime}
163
+
164
+ ### Invalid Task {=my:invalid-task .my:Task label}
165
+
166
+ Title: [Invalid Task] {rdfs:label}
167
+ Status: [cancelled] {my:status}
168
+ Priority: [6] {my:priority ^^xsd:integer}
169
+
170
+ This comprehensive example demonstrates:
171
+ - **RDF/RDFS**: Class definitions, property domains/ranges, subclass relationships
172
+ - **XSD**: Typed literals for dates, numbers, strings, booleans
173
+ - **PROV-O**: Complete provenance chains for project and task creation
174
+ - **SHACL**: Validation shapes with constraints and test data
175
+ - **Integration**: All ontologies working together in real task management scenario
@@ -0,0 +1,91 @@
1
+ [xsd] <http://www.w3.org/2001/XMLSchema#>
2
+ [my] <tag:alice@example.com,2026:>
3
+
4
+ # XSD Datatypes Demo {=my:xsd-demo .prov:Entity label}
5
+
6
+ Demonstrates proper use of XSD datatypes in MD-LD annotations.
7
+
8
+ ## String Datatypes
9
+
10
+ ### Plain String
11
+ Title: [Data Types Demo] {my:title}
12
+
13
+ ### Language-Tagged String
14
+ Description: [This example shows language tagging] {my:description @en}
15
+ Description: [Este ejemplo muestra etiquetado de idioma] {my:description @es}
16
+ Description: [Cet exemple montre l'étiquetage de langue] {my:description @fr}
17
+
18
+ ## Numeric Datatypes
19
+
20
+ ### Integer
21
+ Count: [42] {my:count ^^xsd:integer}
22
+ Year: [2026] {my:year ^^xsd:gYear}
23
+ Month: [5] {my:month ^^xsd:gMonth}
24
+ Day: [6] {my:day ^^xsd:gDay}
25
+
26
+ ### Decimal
27
+ Price: [19.99] {my:price ^^xsd:decimal}
28
+ Percentage: [87.5] {my:percentage ^^xsd:decimal}
29
+ Ratio: [3.14159] {my:ratio ^^xsd:decimal}
30
+
31
+ ## Temporal Datatypes
32
+
33
+ ### Date
34
+ Created: [2026-05-06] {my:created ^^xsd:date}
35
+ Birthday: [1990-12-25] {my:birthday ^^xsd:date}
36
+
37
+ ### DateTime
38
+ Started: [2026-05-06T14:30:00Z] {my:startedAt ^^xsd:dateTime}
39
+ Deadline: [2026-12-31T23:59:59Z] {my:deadline ^^xsd:dateTime}
40
+
41
+ ### Time
42
+ Meeting time: [09:30:00] {my:meetingTime ^^xsd:time}
43
+ Duration: [02:45:00] {my:duration ^^xsd:time}
44
+
45
+ ### Duration
46
+ Project duration: [P1Y2M3DT4H30M] {my:projectDuration ^^xsd:duration}
47
+ Sprint length: [P2W] {my:sprintLength ^^xsd:duration}
48
+
49
+ ## Boolean and Binary
50
+
51
+ ### Boolean
52
+ Active: [true] {my:isActive ^^xsd:boolean}
53
+ Completed: [false] {my:isCompleted ^^xsd:boolean}
54
+ Available: [1] {my:isAvailable ^^xsd:boolean}
55
+
56
+ ## Specialized Types
57
+
58
+ ### URI/IRI
59
+ Website: [https://example.com] {my:website}
60
+ Identifier: [urn:isbn:978-3-16-148410-0] {my:isbn}
61
+
62
+ ### Base64 Binary
63
+ Avatar data: [SGVsbG8gdG8gdGVuIGRhdGE=] {my:avatar ^^xsd:base64Binary}
64
+
65
+ ## Real-World Example
66
+
67
+ ### Product Catalog Entry {=my:product .prov:Entity label}
68
+
69
+ Name: [Wireless Headphones] {my:title}
70
+ SKU: [WH-1000] {my:sku ^^xsd:string}
71
+ Price: [$79.99] {my:price ^^xsd:decimal}
72
+ Weight: [0.25] {my:weight ^^xsd:decimal}
73
+ In stock: [true] {my:inStock ^^xsd:boolean}
74
+ Release date: [2026-06-15] {my:releaseDate ^^xsd:date}
75
+ Last updated: [2026-05-06T09:15:00Z] {my:lastUpdated ^^xsd:dateTime}
76
+
77
+ ### Customer Order {=my:order .prov:Activity label}
78
+
79
+ Order ID: [ORD-2026-0542] {my:orderId ^^xsd:string}
80
+ Order date: [2026-05-06] {my:orderDate ^^xsd:date}
81
+ Total amount: [158.97] {my:totalAmount ^^xsd:decimal}
82
+ Priority shipping: [false] {my:priorityShipping ^^xsd:boolean}
83
+ Estimated delivery: [2026-05-08T14:00:00Z] {my:estimatedDelivery ^^xsd:dateTime}
84
+
85
+ This demonstrates comprehensive XSD datatype usage for:
86
+ - Text with language tags
87
+ - Various numeric formats
88
+ - Complete temporal coverage
89
+ - Boolean flags
90
+ - Specialized binary/URI types
91
+ - Real-world business scenarios