-
-
Notifications
You must be signed in to change notification settings - Fork 218
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
##TX block unexpectedly converted to ##MD block upon saving file #992
Comments
Please give a concrete example of the original block and the modified block |
If the comment block contains XML then it must be stored as ##MD |
When I read the MDF spec (5.7-5.8), it seems the inverse is true: if the block is ##MD, it must contain XML. But the ##TX block can have any UTF-8 text in it. Additionally, it states:
As the tool wrote these as text blocks, I do not think they should have been replaced with meta data blocks, even if the text in them is XML. |
Which tool wrote the file originally? It looks like a dumb way to write the XML |
ATI VISION. I don't disagree with you, but it does appear to be valid. |
You should report an issue to ATI VISION. Custom |
Again, I don't disagree with you, but if the text is not in an MDBLOCK it should not be interpreted as XML. So it seems like the TXBLOCK should be able to have anything in it, XML or not, regardless of XML schema. |
please,could you tell me how to change METADATA? |
vector validator only can watch METADATA, but now I dont know how to change it. |
Python version
Code
MDF version
Code snippet
Traceback
N/A
MDF Validator Error
Invalid XML: Element '{http://www.asam.net/mdf/v4}e' is unexpected according to content model of parent element '{http://www.asam.net/mdf/v4}CNcomment'.
Expecting: {http://www.asam.net/mdf/v4}names, {http://www.asam.net/mdf/v4}linker_name, {http://www.asam.net/mdf/v4}linker_address, {http://www.asam.net/mdf/v4}axis_monotony, {http://www.asam.net/mdf/v4}raster, {http://www.asam.net/mdf/v4}formula, {http://www.asam.net/mdf/v4}address, {http://www.asam.net/mdf/v4}common_properties, {http://www.asam.net/mdf/v4}extensions.
Description
When saving a file, whether modifications were made to it or not, asammdf makes some changes which lead to issues in the MDF validator.
This only happens when a channel has a valid
cn_md_comment
text block (id=="##TX"
), and that block has a nonemptytx_data
field.What asammdf does:
tx_data
field is empty, thecn_md_comment
block will not exist in the saved file (address==0x0000
). This is not an issue, as the block did not contain any information.tx_data
field is not empty, the text block is changed to a metadata block (from "##TX" to "##MD"). The contents oftx_data
are preserved and written tomd_data
in the new meta data block, however, if these contents are XML (ie.<CNcomment>
) they can fail the validation check. Because the comment was previously in a simple text field, it was not subject to this validation. The conversion of the text block to a meta data block is the issue at hand.The text was updated successfully, but these errors were encountered: