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

Use >> instead of >> in brsynth:smiles SBML annotations #3

Closed
tduigou opened this issue Apr 2, 2021 · 2 comments
Closed

Use >> instead of >> in brsynth:smiles SBML annotations #3

tduigou opened this issue Apr 2, 2021 · 2 comments
Assignees

Comments

@tduigou
Copy link
Member

tduigou commented Apr 2, 2021

Example:
[H]C(=C([H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])[H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])[H].O=P(O)(O)OP(=O)(O)O.O=P(O)(O)OP(=O)(O)O>>[H]OP(=O)(O[H])OP(=O)(O[H])OC([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])C([H])([H])C([H])=C(C([H])([H])[H])C([H])([H])[H]

@breakthewall
Copy link
Member

I think it is not possible since XML recognizes it as a special character. This is why there is conversion in rpSBML.py each time an XML annotation is read.

@tduigou
Copy link
Member Author

tduigou commented Apr 6, 2021

OK I see.

For the record..

Links:

In particular this:

The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they MUST be escaped using either numeric character references or the strings " & " and " < " respectively. The right angle bracket (>) may be represented using the string " > ", and MUST, for compatibility, be escaped using either " > " or a character reference when it appears in the string " ]]> " in content, when that string is not marking the end of a CDATA section.

=> It sounds the use of >> might be tolerate but not recommended.

Looking in the code, libsbml converts automatically from > to &gt; using libsbml.XMLNode.toXMLString at the insertion of the value. At the reading the reader needs to be make the translation back, which is done in rpSBML.py.

Since the present situation is the safest way, I close the ticket.

@tduigou tduigou closed this as completed Apr 6, 2021
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

No branches or pull requests

2 participants