Skip to content
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

Change V3.1 #358

Merged
merged 10 commits into from
Feb 29, 2024
Merged

Change V3.1 #358

merged 10 commits into from
Feb 29, 2024

Conversation

BirgitBoss
Copy link
Collaborator

@BirgitBoss BirgitBoss commented Feb 21, 2024

This issue closes
#299
shall be anyUri instead of string + length restriction and note

add anyUri to basic data types section
change PathType definition
update ChangeLog

closes #361

PathType shall be anyUri instead of string
@mhrimaz
Copy link
Contributor

mhrimaz commented Feb 22, 2024

@BirgitBoss
Sorry that I jump in, but would that be possible to also change the datatype of other values that are now 'xs:string' to their actual XSD data type?
I have elaborated the issue here: #284
The problem right now is that if we have a Property with a xs:double valueType, in RDF we use string.

So currently we have:

<something_48c66017> rdf:type aas:Submodel ;
    <https://admin-shell.io/aas/3/0/Identifiable/id> "something_48c66017"^^xs:string ;
    <https://admin-shell.io/aas/3/0/Submodel/submodelElements> [
        rdf:type aas:Property ;
        <https://admin-shell.io/aas/3/0/Referable/idShort> "something3fdd3eb4"^^xs:string ;
        <https://admin-shell.io/aas/3/0/Property/valueType> <https://admin-shell.io/aas/3/0/DataTypeDefXsd/Double> ;
###
        <https://admin-shell.io/aas/3/0/Property/value> "1234.01234"^^xs:string ;
    ] ;
.

but it should be:

<something_48c66017> rdf:type aas:Submodel ;
    <https://admin-shell.io/aas/3/0/Identifiable/id> "something_48c66017"^^xs:string ;
    <https://admin-shell.io/aas/3/0/Submodel/submodelElements> [
        rdf:type aas:Property ;
        <https://admin-shell.io/aas/3/0/Referable/idShort> "something3fdd3eb4"^^xs:string ;
        <https://admin-shell.io/aas/3/0/Property/valueType> <https://admin-shell.io/aas/3/0/DataTypeDefXsd/Double> ;
###
        <https://admin-shell.io/aas/3/0/Property/value> "1234.01234"^^xs:double;
    ] ;
.

It might be a breaking change, but it doesn't cause any issues for roundtrips, since the metamodel anyways use XSD datatypes. This would allow to write SPARQL query easier (numeric aggeragation, comparison, ...)

@BirgitBoss BirgitBoss changed the title closes #299 PathType Closes #299 PathType Feb 22, 2024
@BirgitBoss
Copy link
Collaborator Author

@BirgitBoss Sorry that I jump in, but would that be possible to also change the datatype of other values that are now 'xs:string' to their actual XSD data type? I have elaborated the issue here: #284

Thank you for pointing to this issue. They are both about data types but your problem is more tricky because the type of the property is not always the same but depends on its semantic definition and implementation. For the SME "File" the type is static. So I prefer to discuss the typing issue of Properties (and similar SME) in #284 and to discuss only data type "PathType" in this issue.

Thank you for your understanding.

Copy link

@alexgordtop alexgordtop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should stick with RFC3986, which defines URIs, that are required to resolve resources. This also addresses the issue of fishing attacks with character symbols, that look like the original ones, but lead to a different address. URIs don't have this issue, while IRIs do.

@BirgitBoss BirgitBoss changed the title Closes #299 PathType Changes V3.1 Feb 27, 2024
@BirgitBoss
Copy link
Collaborator Author

@alexgordtop can you now approve of the PR after the changes made?

@g1zzm0 g1zzm0 changed the title Changes V3.1 Change V3.1 Feb 27, 2024
@g1zzm0
Copy link
Collaborator

g1zzm0 commented Feb 27, 2024

PathType should not change its type!

Rather, it should migrate the constraints from RFC8089 to RFC3987. This could be achieved by changing from matchesRFC8089 to matchesXsAnyUri. This is necessary to avoid having to create an entire new RegEx from @s-heppner or @mristin because of time constraints. The task force wanted the change from RFC8089 to RFC3987, but nobody wanted to make the change.

According to version 3.0, PathType is an Identifier that is also subject to the matchesRFC8089 constraint. The PathType cannot simply be changed to anyUri because anyUri is not a primitive type. This is breaking to version 3.0 and cannot be implemented in aas-core.
No approval from me.

@BirgitBoss
Copy link
Collaborator Author

see revised decision in #299

@BirgitBoss BirgitBoss merged commit ab4cd12 into IDTA-01001-3-1_working Feb 29, 2024
2 checks passed
Note: URL, based on [RFC-3986](https://www.rfc-editor.org/rfc/rfc3987) /[RFC-3987](https://www.rfc-editor.org/rfc/rfc3987), but more recently defined as living standard by WHATWG, as suggested by W3C: https://url.spec.whatwg.org/
"[anyURI supports a] wide range of internationalized resource identifiers can be specified when an anyURI is called for, and still be understood as URIs per https://www.w3.org/TR/xmlschema11-2/#RFC3986[RFC 3986] and its successor(s)."

Source: https://www.w3.org/TR/xmlschema11-2/#anyURI[W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Source: https://www.w3.org/TR/xmlschema11-2/#anyURI[W3C XML Schema Definition Language (XSD) 1.1 Part 2: Datatypes]
Source: https://www.w3.org/TR/xmlschema-2/#anyURI[W3C XML Schema Definition Language (XSD) 1.0 Part 2: Datatypes]



====
Note: URL, based on [RFC-3986](https://www.rfc-editor.org/rfc/rfc3987) /[RFC-3987](https://www.rfc-editor.org/rfc/rfc3987), but more recently defined as living standard by WHATWG, as suggested by W3C: https://url.spec.whatwg.org/
"[anyURI supports a] wide range of internationalized resource identifiers can be specified when an anyURI is called for, and still be understood as URIs per https://www.w3.org/TR/xmlschema11-2/#RFC3986[RFC 3986] and its successor(s)."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"[anyURI supports a] wide range of internationalized resource identifiers can be specified when an anyURI is called for, and still be understood as URIs per https://www.w3.org/TR/xmlschema11-2/#RFC3986[RFC 3986] and its successor(s)."
"[anyURI supports a] wide range of internationalized resource identifiers can be specified when an anyURI is called for, and still be understood as URIs per https://www.w3.org/TR/xmlschema-2/#RFC2396[RFC 2396] and https://www.w3.org/TR/xmlschema-2/#RFC2732[RFC 2732] ."

"2000-01-01T14:23:00.66372+14:00"footnote:[Corresponds to xs:dateTimeStamp in XML Schema 1.1]
|xsd |duration |Duration of time |"-P1Y2M3DT1H", +

|xsd |https://www.w3.org/TR/xmlschema2/#duration[duration] |Duration of time |"-P1Y2M3DT1H", +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|xsd |https://www.w3.org/TR/xmlschema2/#duration[duration] |Duration of time |"-P1Y2M3DT1H", +
|xsd |https://www.w3.org/TR/xmlschema-2/#duration[duration] |Duration of time |"-P1Y2M3DT1H", +


FTP://unicode.org

|xsd |https://www.w3.org/TR/xmlschema2/#dateType[dateType] |Date and time with or without time zone |"2000-01-01T14:23:00", +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|xsd |https://www.w3.org/TR/xmlschema2/#dateType[dateType] |Date and time with or without time zone |"2000-01-01T14:23:00", +
|xsd |https://www.w3.org/TR/xmlschema-2/#dateTime[dateTime] |Date and time with or without time zone |"2000-01-01T14:23:00", +


|xsd |https://www.w3.org/TR/xmlschema2/#base64Binary[base64Binary] |base64-encoded binary data |"a3Vtb3dhc2hlcmU="

|xsd |https://www.w3.org/TR/xmlschema2/#boolean[boolean] |true, false |true, false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|xsd |https://www.w3.org/TR/xmlschema2/#boolean[boolean] |true, false |true, false
|xsd |https://www.w3.org/TR/xmlschema-2/#boolean[boolean] |true, false |true, false

|xsd |boolean |true, false |true, false
|xsd |dateType |Date and time with or without time zone |"2000-01-01T14:23:00", +

|xsd |https://www.w3.org/TR/xmlschema2/#base64Binary[base64Binary] |base64-encoded binary data |"a3Vtb3dhc2hlcmU="
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|xsd |https://www.w3.org/TR/xmlschema2/#base64Binary[base64Binary] |base64-encoded binary data |"a3Vtb3dhc2hlcmU="
|xsd |https://www.w3.org/TR/xmlschema-2/#base64Binary[base64Binary] |base64-encoded binary data |"a3Vtb3dhc2hlcmU="


See Clause 5.3.12.6 for constraints on types.

.Simple Data Types Used in Metamodel
[cols="10%,19%,38%,33%",options="header",]
|===
|Source |Basic Data Type |Value Range |Sample Values
|xsd |string |Character string (but not all Unicode character strings) |"Hello world", "Καλημέρα κόσμε", +

|xsd |https://www.w3.org/TR/xmlschema2/#string[string] |Character string (but not all Unicode character strings) |"Hello world", "Καλημέρα κόσμε", +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
|xsd |https://www.w3.org/TR/xmlschema2/#string[string] |Character string (but not all Unicode character strings) |"Hello world", "Καλημέρα κόσμε", +
|xsd |https://www.w3.org/TR/xmlschema-2/#string[string] |Character string (but not all Unicode character strings) |"Hello world", "Καλημέρα κόσμε", +

@g1zzm0
Copy link
Collaborator

g1zzm0 commented Feb 29, 2024

Allways a good idea to mege unaproved PRs.
Please check twice if all XSD Spec Version 1.0 URLs point to https://www.w3.org/TR/xmlschema-2/ and not to https://www.w3.org/TR/xmlschema2/ and for the wrong URLs that point to the wrong XSD Version 1.1 with path https://www.w3.org/TR/xmlschema11-2/

(Edit by @s-heppner): Fix typo in comment

@BirgitBoss BirgitBoss deleted the BiBo/issue-299_PathType branch April 18, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants