-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enable the use of lang tags for langString #382
Comments
How would you express the length restrictions for these two types? |
so instead of this: <https://admin-shell.io/aas/3/0/Referable/displayName> [
rdf:type aas:LangStringNameType ;
<https://admin-shell.io/aas/3/0/AbstractLangString/language> "de-CH"^^xs:string ;
<https://admin-shell.io/aas/3/0/AbstractLangString/text> "something_1e73716d"^^xs:string ;
] ;
<https://admin-shell.io/aas/3/0/DataSpecificationIec61360/preferredName> [
rdf:type aas:LangStringPreferredNameTypeIec61360 ;
<https://admin-shell.io/aas/3/0/AbstractLangString/language> "en-UK"^^xs:string ;
<https://admin-shell.io/aas/3/0/AbstractLangString/text> "Something random in English 5b15c20d"^^xs:string ;
] ; We can have the following: <https://admin-shell.io/aas/3/0/Referable/displayName> [
rdf:type aas:LangStringNameType ;
<https://admin-shell.io/aas/3/0/AbstractLangString/text> "something_1e73716d"@de-CH;
] ;
<https://admin-shell.io/aas/3/0/DataSpecificationIec61360/preferredName> [
rdf:type aas:LangStringPreferredNameTypeIec61360 ;
<https://admin-shell.io/aas/3/0/AbstractLangString/text> "Something random in English 5b15c20d"@en-UK ;
] ; For sure, having different types like |
@BirgitBoss (cc @mhrimaz)
Easily, we can specify that in the prop shape. aas-sh:SomeNodeShape # for each class that has these props:
sh:property aas-sh:DisplayNameShape, aash-sh:PreferredNameShape.
aas-sh:DisplayNameShape a sh:PropertyShape;
sh:path aas-ref:displayName; # or following the suggestion to reduce to just one namespace: aas:displayName
sh:datatype rdf:langString;
sh:maxLength 10.
aash-sh:PreferredNameShape a sh:PropertyShape;
sh:path aas-ref:preferredName;
sh:datatype rdf:langString;
sh:maxLength 20. |
Similar to #284, both XML and RDF have a special means for attaching a lang tag;
xml:lang
and@lang
.In JSONLD, this is expressed as
@value, @language
and there are special ways to express a fixed lang tag, or organize JSON payload by lang (@collection: @language
).Doing it with a separate field is non-idiomatic use.
The types
aas:LangStringPreferredNameTypeIec61360, aas:LangStringTextType
are parasitic and useless:rdf:langString
,Instead of this:
we want this:
The text was updated successfully, but these errors were encountered: