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: README.md
+36-80Lines changed: 36 additions & 80 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
-
# RDF Graph Browser
1
+
# 3D Linked Data
2
2
3
3
A browser-based RDF graph visualization tool that combines:
4
4
-**3d-force-graph** - 3D force-directed graph visualization using WebGL/three.js
5
5
-**SaxonJS 3.0** - Client-side XSLT 3.0 processor
6
-
-**RDF/XML** - Semantic web data format
6
+
-**RDF/XML** - Semantic Web data format
7
+
8
+
> **⚠️ Important Limitation:** Currently, only documents that return `application/rdf+xml` content type can be loaded. Other RDF formats (Turtle, JSON-LD, N-Triples) are not yet supported.
7
9
8
10
## Features
9
11
@@ -16,19 +18,19 @@ A browser-based RDF graph visualization tool that combines:
16
18
## Project Structure
17
19
18
20
```
19
-
RDF-Graph-Browser/
21
+
3D-Linked-Data/
20
22
├── index.html # Main HTML page
23
+
├── styles.css # External stylesheet
21
24
├── generate-sef.sh # Script to compile XSLT to SEF
22
25
├── lib/ # External libraries
23
26
│ └── SaxonJS3.js # SaxonJS 3.0 library
24
27
├── src/ # XSLT source files
25
28
│ ├── graph-client.xsl # Main XSLT client with event handlers
26
29
│ ├── 3d-force-graph.xsl # 3D Force Graph initialization
- XSLT source files in `src/` are compiled to SEF format by `generate-sef.sh`
110
+
- SaxonJS loads the pre-compiled SEF and executes XSLT in the browser
111
+
- XSLT uses SaxonJS interactive extensions (`ixsl:*`) to interact with JavaScript, DOM, and HTTP APIs
112
+
113
+
**Why this approach:**
114
+
- Declarative programming model for semantic data processing
115
+
- Built-in RDF/XML handling without parsing libraries
116
+
- Pattern matching via templates and modes
117
+
- XPath 3.1 for querying RDF structures
133
118
134
119
### Event Flow
135
120
136
121
1.**Page Load**
137
-
- SaxonJS loads and compiles SEF
122
+
- SaxonJS loads pre-compiled SEF file
138
123
- XSLT `main` template initializes 3D Force Graph
139
124
- Default RDF document is loaded via `ixsl:http-request()`
140
125
@@ -188,35 +173,6 @@ The XSLT pipeline converts RDF/XML to the format expected by 3d-force-graph:
188
173
### SEF file not found
189
174
Run `./generate-sef.sh` to compile the XSLT to SEF format
190
175
191
-
### 3d-force-graph not loading
192
-
Check browser console - CDN might be blocked. Download library locally if needed.
193
-
194
-
### CORS errors when loading RDF
195
-
The remote server must send proper CORS headers:
196
-
-`Access-Control-Allow-Origin: *`
197
-
-`Access-Control-Allow-Methods: GET`
198
-
-`Access-Control-Allow-Headers: Accept`
199
-
200
-
For testing, you can use LinkedDataHub which has CORS enabled.
201
-
202
-
### Fragment URIs cause errors
203
-
Fragment identifiers (e.g., `http://example.org/data#Resource`) are automatically stripped before document loading. The fragment is used to look up the specific resource within the loaded document.
204
-
205
-
### Empty or malformed RDF
206
-
Check browser console for parsing errors. The document must be valid RDF/XML.
0 commit comments