-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
65 lines (59 loc) · 2.05 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!--
This is a demonstrator of the ShExC hilighjs module.
Airplane mode:
By default, this doc fetches CSS and JS from unpkg.com in three places. Each
can be swapped to read from the local filesystem. Checking out the git repo
will provide this document and the three required resources.
-->
<html>
<head>
<title>highlightjs-shexc user</title>
<link rel="stylesheet" href="https://unpkg.com/highlightjs-shexc@0/style/shexc.css"/>
<!-- <link rel="stylesheet" href="style/shexc.css"/> -->
</head>
<body>
<h1>highlightjs-shexc user</h1>
<p>
This is an example highlightjs ShExC document.
</p>
<h2>Some ShapeExpressions</h2>
<pre><code class="language-shexc">
PREFIX : <http://my.example/schema>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
IMPORT <../foo.shex>
BASE <http://my.example/schema>
<IssueShape> {
:reproducedBy @<EmployeeShape>?
}
ABSTRACT <PersonShape> {
:name xsd:string ;
:mbox IRI
}
<UserShape> EXTENDS @<PersonShape> {
:representative @<EmployeeShape>
}
ABSTRACT <RepShape> {
:phone IRI /^tel:\+?[1-9][0-9]{1,14}$/+ # E.164 number
}
<EmployeeShape>
EXTENDS @<PersonShape> EXTENDS @<RepShape> {
}
</code></pre>
<h2>Some TripleExpressions</h2>
<pre><code class="language-texpr">
:name xsd:string ;
:mbox IRI ;
:contact @<EmployeeShape>
</code></pre>
<script src="https://www.w3.org/2019/12/highlight.js"></script>
<!-- <script src="https://raw.githubusercontent.com/yyyc514/highlight.js/squash_build_pipeline/src/highlight.js"></script> -->
<!-- <script src="../../src/highlight.js"></script> -->
<script src="https://unpkg.com/highlightjs-shexc@0/dist/shexc.min.js"></script>
<!-- <script src="dist/shexc.min.js"></script> -->
<script>
hljs.registerLanguage('texpr', h =>
h.requireLanguage("shexc")
.rawDefinition({startingProduction: "tripleExpression"}));
hljs.initHighlightingOnLoad();</script>
</body>
</html>