aasx: Fix handling of File object with absolute URI values
Fixes #81 (closed)
Merge request reports
Activity
232 232 if isinstance(element, model.File): 233 233 if element.value is None: 234 234 continue 235 # Only absolute-path references and relative-path URI references (see RFC 3986, sec. 4.2) are considered 236 # to refer to files within the AASX package. Thus, we must skip all other types of URIs (esp. absolute 237 # URIs and network-path references) 238 if element.value.startswith('//') or ':' in element.value.split('/')[0]: 239 logger.info("Skipping supplementary file %s, since it seems to be an absolute URI or network-path " 240 "URI reference", element.value) added 1 commit
- 7ab06a8c - examples: Add File object with absolute URI reference to example_aas
added 1 commit
- f52c45e7 - adapter.aasx: Skip File objects with absolute URI reference when writing supplementary files
added 1 commit
- 492ab7ef - adapter.aasx: Skip File objects with absolute URI reference when writing supplementary files
For the XML Deserialization it would be good if the test files weren't minified, because in case of an error it includes the line number the error was encountered on in its error messages, which makes debugging easier. Unfortunately, including the column number is not possible, because the lxml/ElementTree API doesn't support that.
I agree. We should use the
pretty_print=True
resp.indent=4
parameter for XML and JSON serialization in the compliance tool. See #92 (closed).Edited by Michael Thies
mentioned in commit cb3b8903