-
Notifications
You must be signed in to change notification settings - Fork 27
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
File.value / PathType is inconsistent / too strict #299
Comments
Here are some insights from a couple of discussions with various people. I'm sharing it here for future reference. Since Opening Package Convention is used as an underlying format for AASX files, we have to follow it by letter. Please revisit the standard for Opening Package Convention (OPC). The path value must exactly conform to the target URIs of the OPC. Hence, it does not matter what other standards prescribe -- as long as OPC is used as the storage format for AASX files, For more details, see:
For a succinct intro, you can also have a look at the readme of the aas-core package library in C#: https://aas-core-works.github.io/aas-package3-csharp/doc/ |
The workstream has decided, that we should define a regex for PathType. |
Change PathType to allow not only file: #299
* * (Editorial) MultiLanguageNameType inconsistent description, maxLength=128 (schemata were correct) ([#313](#313)) * (Editorial) HasKind/kind explanataroy text: use template, not type ([#313](#313)) * (Editorial) DataTypeDefXsd links now correctly to xmlschema11-2, not to xsd V1.1 ([#312](#312)) + minor editorial changes * New value "Role" in Enumeration AssetKind (#294) * add new value "AssetKind" enumeration "Role" #294 Change PathType to allow not only file: #299 * Identifier: change length from 2000 to 2024 characters #299 * allow hyphens in idShort of Referables #295 * make Entity/entityType optional #287 * editorial change, add missing link to issue #295 * Update Constraint AASd-014 (part 2 of #287) * EmbeddedDataSpecification/dataSpecification now mandatory #296 * Update Change Appendix w.r.t. EmbeddedDataSpecifcation/dataSpecification (now mandatory) #296 * #296 update Changes Section * Editorial changes #313 * semanticId of specificAssetId with name "globalAssetId" #298 * Correct AASd-002 see #295 for backward compatibility reasons idShort can end with an underscore. Additionally also 1 char idShorts are allowed. * path .Specification.pdf remove \ * fix typo
Can someone please update me what the regex actually looks like now? |
2024-02-21 TF Part 1: 2024-04-12: Decision was revised, see #299 (comment) |
Previously, PathType was matched towards RFC 8089, however this posed several problems, such as [basyx-python-sdk#72](eclipse-basyx/basyx-python-sdk#72). In [aas-specs#299](admin-shell-io/aas-specs#299), the proposed solution is to make PathType of type xs:anyURI. Fixes #303
Previously, PathType was matched towards RFC 8089, however this posed several problems. In #299, the decision was to change the PathType to xs:anyURI. This reflects this change.
What about the following two cases: If modelling b) is possible we cannot restrict relative path to be used in .aasx only and then follow OPC convention. But in Part 5 we write "Only a relative URI reference shall be interpreted as a reference to a supplementary file within the AASX package. " but with b) not every relative path can be interpreted as a reference a file in the .aasx |
2024-02-28 TF Part 1:
In Part 5: explain exactly how relative path can be added in File/value if for files contained in the .aasx |
* closes #299 PathType shall be anyUri instead of string * Update ChangeLog to reflect changes on PathType * add anyUri to the used basic data types used in the metamodel * bugfix asciidoc: do display "." at the beginning add {blank} * fix anyUri to anyURI * closes #361 relationshipElement mention semanticId * resolve #358 (comment) + added links to xsd schema * Update documentation/IDTA-01001/modules/ROOT/pages/IDTA-01001_ChangeLog.adoc Co-authored-by: Nico Braunisch <nico.braunisch@tu-dresden.de> * Update documentation/IDTA-01001/modules/ROOT/pages/IDTA-01001_ChangeLog.adoc Co-authored-by: Nico Braunisch <nico.braunisch@tu-dresden.de> * Update documentation/IDTA-01001/modules/ROOT/pages/Spec/IDTA-01001_Metamodel_DataTypes.adoc Co-authored-by: Nico Braunisch <nico.braunisch@tu-dresden.de> --------- Co-authored-by: Nico Braunisch <nico.braunisch@tu-dresden.de>
ChangLog is already correct but data types used in Metamodel and type PathType were still incorrectly defined.
#299 revised: #299 (comment) (#413) ChangLog is already correct but data types used in Metamodel and type PathType were still incorrectly defined.
Currently, the regex for Path type is non-compliant to the specification v3.0, as it does not allow for AASX packages to be written. As a temporary bugfix in v3.0.1, it was decided to remove the invariant check, as changing the pattern would result in a breaking change. This is of course no final solution, there will be a better fix for version 3.1. See #299
* WIP: Adapt the schema files to v3.0.1 This adapts the schema files to version 3.0.1 of the specification. However, this is not an official release yet and may be subject to change. * Schema Remove Pattern for PathType Currently, the regex for Path type is non-compliant to the specification v3.0, as it does not allow for AASX packages to be written. As a temporary bugfix in v3.0.1, it was decided to remove the invariant check, as changing the pattern would result in a breaking change. This is of course no final solution, there will be a better fix for version 3.1. See #299 * Update schema files to newest version of aas-core * Update JSON Examples to v3.0.1 * Update RDF Examples to v3.0.1 * Update XML examples to v3.0.1 * Specify metamodel version in JSON Schema Previously, the metamodel version was not clear from the generated JSON schema. We adapt the title to include the version.
# Revert Embedded_data_specification Optional In #328, we made the attribute `data_specification` in class `Embedded_data_specification` optional, since that is what we thought the specification said. See also the discussion in #326. However, this was a bug in the specification, which is fixed in v3.0.1 of the specification. We therefore revert these changes. Fixes #326. # Remove matches_RFC_8089_path invariant from Path_type Currently, the regex for Path type is non-compliant to the specification v3.0.1, as it does not allow for AASX packages to be written. As a temporary bugfix in v3.0.1, it was decided to remove the invariant check, as changing the pattern would result in a breaking change. This is of course no final solution, there will be a better fix for version 3.1. See also [admin-shell-io/aas-specs#299]. [admin-shell-io/aas-specs#299]: admin-shell-io/aas-specs#299
PathType is defined on page 97 as:
Identifier
Note: for any string conformant to RFC8089, the "file" URI scheme (for relative and absolute file paths) applies.
Exmaples:
./Specification.pdf
file:c:/local/Specification.pdf
file://host.example.com/path/to/file
This is more strict than it was in Version 2 (it was a simple string) and inconsistent, since the example ./Specification.pdf is not valid according to RFC8089.
As discussed in Workstream AAS, the specification should be changed to:
URL, based on RFC-3986 / RFC-3987, but more recently defined as living standard by WHATWG, as suggested by W3C: https://url.spec.whatwg.org/
In the examples we should also list http / ftp / custom-scheme examples - since all of them are considered valid.
The text was updated successfully, but these errors were encountered: