Skip to content

Commit 0c32f9a

Browse files
authored
Merge pull request #307 from w3c/issue-306-sh-order-example-44
#306: Change the order of properties in the sh:order example
2 parents 845fb9e + ca7b050 commit 0c32f9a

File tree

1 file changed

+184
-20
lines changed

1 file changed

+184
-20
lines changed

shacl12-core/index.html

Lines changed: 184 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6118,7 +6118,7 @@ <h3>sh:group</h3>
61186118
sh:property [
61196119
sh:path ex:locality ;
61206120
sh:name "locality" ;
6121-
sh:description "The suburb, city or town of the address" ;
6121+
sh:description "The city or town of the address" ;
61226122
sh:order 12 ;
61236123
sh:group ex:AddressGroup ;
61246124
] ;
@@ -6144,24 +6144,6 @@ <h3>sh:group</h3>
61446144
<div class="jsonld">
61456145
<pre class="jsonld">{
61466146
"@graph": [
6147-
{
6148-
"@id": "ex:AddressGroup",
6149-
"@type": "sh:PropertyGroup",
6150-
"rdfs:label": "Address",
6151-
"sh:order": {
6152-
"@type": "xsd:integer",
6153-
"@value": "1"
6154-
}
6155-
},
6156-
{
6157-
"@id": "ex:NameGroup",
6158-
"@type": "sh:PropertyGroup",
6159-
"rdfs:label": "Name",
6160-
"sh:order": {
6161-
"@type": "xsd:integer",
6162-
"@value": "0"
6163-
}
6164-
},
61656147
{
61666148
"@id": "ex:PersonFormShape",
61676149
"@type": "sh:NodeShape",
@@ -6209,7 +6191,7 @@ <h3>sh:group</h3>
62096191
}
62106192
},
62116193
{
6212-
"sh:description": "The suburb, city or town of the address",
6194+
"sh:description": "The city or town of the address",
62136195
"sh:group": {
62146196
"@id": "ex:AddressGroup"
62156197
},
@@ -6243,6 +6225,24 @@ <h3>sh:group</h3>
62436225
}
62446226
}
62456227
]
6228+
},
6229+
{
6230+
"@id": "ex:NameGroup",
6231+
"@type": "sh:PropertyGroup",
6232+
"rdfs:label": "Name",
6233+
"sh:order": {
6234+
"@type": "xsd:integer",
6235+
"@value": "0"
6236+
}
6237+
},
6238+
{
6239+
"@id": "ex:AddressGroup",
6240+
"@type": "sh:PropertyGroup",
6241+
"rdfs:label": "Address",
6242+
"sh:order": {
6243+
"@type": "xsd:integer",
6244+
"@value": "1"
6245+
}
62466246
}
62476247
]
62486248
}</pre>
@@ -6280,6 +6280,170 @@ <h3>sh:group</h3>
62806280
</tr>
62816281
</table>
62826282
</div>
6283+
<p>
6284+
Note that the same information would be generated by the following example,
6285+
which changes the order of the triples but not the <code>sh:order</code> values:
6286+
</p>
6287+
<aside class="example">
6288+
<div class="shapes-graph">
6289+
<div class="turtle">
6290+
ex:PersonFormShape
6291+
a sh:NodeShape ;
6292+
sh:property [
6293+
sh:path ex:lastName ;
6294+
sh:name "last name" ;
6295+
sh:description "The person's last name" ;
6296+
sh:order 1 ;
6297+
sh:group ex:NameGroup ;
6298+
] ;
6299+
sh:property [
6300+
sh:path ex:firstName ;
6301+
sh:name "first name" ;
6302+
sh:description "The person's given name(s)" ;
6303+
sh:order 0 ;
6304+
sh:group ex:NameGroup ;
6305+
] ;
6306+
sh:property [
6307+
sh:path ex:postalCode ;
6308+
sh:name "postal code" ;
6309+
sh:name "zip code"@en-us ;
6310+
sh:description "The postal code of the locality" ;
6311+
sh:order 13 ;
6312+
sh:group ex:AddressGroup ;
6313+
] ;
6314+
sh:property [
6315+
sh:path ex:streetAddress ;
6316+
sh:name "street address" ;
6317+
sh:description "The street address including number" ;
6318+
sh:order 11 ;
6319+
sh:group ex:AddressGroup ;
6320+
] ;
6321+
sh:property [
6322+
sh:path ex:locality ;
6323+
sh:name "locality" ;
6324+
sh:description "The city or town of the address" ;
6325+
sh:order 12 ;
6326+
sh:group ex:AddressGroup ;
6327+
] .
6328+
6329+
ex:AddressGroup
6330+
a sh:PropertyGroup ;
6331+
sh:order 1 ;
6332+
rdfs:label "Address" .
6333+
6334+
ex:NameGroup
6335+
a sh:PropertyGroup ;
6336+
sh:order 0 ;
6337+
rdfs:label "Name" .
6338+
</div>
6339+
<div class="jsonld">
6340+
<pre class="jsonld">{
6341+
"@graph": [
6342+
{
6343+
"@id": "ex:PersonFormShape",
6344+
"@type": "sh:NodeShape",
6345+
"sh:property": [
6346+
{
6347+
"sh:description": "The person's last name",
6348+
"sh:group": {
6349+
"@id": "ex:NameGroup"
6350+
},
6351+
"sh:name": "last name",
6352+
"sh:order": {
6353+
"@type": "xsd:integer",
6354+
"@value": "1"
6355+
},
6356+
"sh:path": {
6357+
"@id": "ex:lastName"
6358+
}
6359+
},
6360+
{
6361+
"sh:description": "The person's given name(s)",
6362+
"sh:group": {
6363+
"@id": "ex:NameGroup"
6364+
},
6365+
"sh:name": "first name",
6366+
"sh:order": {
6367+
"@type": "xsd:integer",
6368+
"@value": "0"
6369+
},
6370+
"sh:path": {
6371+
"@id": "ex:firstName"
6372+
}
6373+
},
6374+
{
6375+
"sh:description": "The postal code of the locality",
6376+
"sh:group": {
6377+
"@id": "ex:AddressGroup"
6378+
},
6379+
"sh:name": [
6380+
"postal code",
6381+
{
6382+
"@language": "en-us",
6383+
"@value": "zip code"
6384+
}
6385+
],
6386+
"sh:order": {
6387+
"@type": "xsd:integer",
6388+
"@value": "13"
6389+
},
6390+
"sh:path": {
6391+
"@id": "ex:postalCode"
6392+
}
6393+
},
6394+
{
6395+
"sh:description": "The street address including number",
6396+
"sh:group": {
6397+
"@id": "ex:AddressGroup"
6398+
},
6399+
"sh:name": "street address",
6400+
"sh:order": {
6401+
"@type": "xsd:integer",
6402+
"@value": "11"
6403+
},
6404+
"sh:path": {
6405+
"@id": "ex:streetAddress"
6406+
}
6407+
},
6408+
{
6409+
"sh:description": "The city or town of the address",
6410+
"sh:group": {
6411+
"@id": "ex:AddressGroup"
6412+
},
6413+
"sh:name": "locality",
6414+
"sh:order": {
6415+
"@type": "xsd:integer",
6416+
"@value": "12"
6417+
},
6418+
"sh:path": {
6419+
"@id": "ex:locality"
6420+
}
6421+
}
6422+
]
6423+
},
6424+
{
6425+
"@id": "ex:AddressGroup",
6426+
"@type": "sh:PropertyGroup",
6427+
"rdfs:label": "Address",
6428+
"sh:order": {
6429+
"@type": "xsd:integer",
6430+
"@value": "1"
6431+
}
6432+
},
6433+
{
6434+
"@id": "ex:NameGroup",
6435+
"@type": "sh:PropertyGroup",
6436+
"rdfs:label": "Name",
6437+
"sh:order": {
6438+
"@type": "xsd:integer",
6439+
"@value": "0"
6440+
}
6441+
}
6442+
]
6443+
}</pre>
6444+
</div>
6445+
</div>
6446+
</aside>
62836447
</section>
62846448
</section>
62856449

0 commit comments

Comments
 (0)