Skip to content

Commit 47992b6

Browse files
committed
Clarify rdf:langString usage and validation rules in specification table
- Added explicit note that rdf:langString requires a language tag using @ syntax. - Marked typed literal form ("Hello"^^rdf:langString) as invalid and expected to fail validation. - Improved emphasis and readability with AsciiDoc formatting.
1 parent 2798349 commit 47992b6

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

documentation/modules/ROOT/pages/datatypes.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,9 @@ definition in the respective standards and an informative description of their v
8989
.3+| Miscellaneous types
9090
| `https://www.w3.org/TR/xmlschema11-2/#anyURI[xsd:anyURI]` | Absolute or relative https://en.wikipedia.org/wiki/Uniform_Resource_Identifier[URI]s and https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier[IRI]s | 'http://example.org/', 'urn:samm:{example-ns}.myapplication:1.0.0#errorState' | {ok}
9191
| `https://www.w3.org/TR/curie/[samm:curie]` | Compact URI/IRI (well-known prefix + element name) | 'xsd:string', 'unit:hectopascal' | {ok}
92-
| `https://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal[rdf:langString]` | Strings with language tags | "Hello"@en, "Hallo"@de. Note that this is written in RDF/Turtle syntax, and that only "Hello" and "Hallo" are the actual values. | {ok}
92+
| `https://www.w3.org/TR/rdf11-concepts/#section-Graph-Literal[rdf:langString]` | Strings with language tags | "Hello"@en, "Hallo"@de. When using `rdf:langString`, a language tag *must always* be provided using the `@` syntax (e.g., `"Hello"@en`).
93+
94+
Using a typed literal form such as `"Hello"^^rdf:langString` is *invalid* and *should cause* the model loading or validation to fail. | {ok}
9395
|===
9496

9597
The following types defined by the XSD and RDF specifications, respectively, are considered

documentation/modules/ROOT/pages/modeling-guidelines.adoc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,14 @@ and value references that point to example values (i.e., references to instances
168168
In either case, the data type of the `samm:exampleValue` must be convertible to the effective data type defined by the Property's Characteristic.
169169
For example, if the Characteristic's `samm:dataType`
170170
is `xsd:int`, a value with the type `xsd:short` is also acceptable. Refer to section xref:datatypes.adoc#implicit-conversions[Implicit Conversions]
171-
for more details. | {nok}
171+
for more details.
172+
173+
When using `rdf:langString`, a language tag *must always* be provided using the `@` syntax, for example:
174+
175+
:x samm:exampleValue "Hello"@en ✔️
176+
:x samm:exampleValue "Hallo"@de ✔️
177+
:x samm:exampleValue "Hello"^^rdf:langString ❌ (invalid — missing language tag)
178+
| {nok}
172179
|===
173180

174181
Example with Literal type:
@@ -554,7 +561,7 @@ can produce a JSON payload that could look something like this:
554561
----
555562
{
556563
"value" : 2.25,
557-
"unit" : "unit:hectopascal"
564+
"unit" : "unit:hectopascal"
558565
}
559566
----
560567

0 commit comments

Comments
 (0)