Open onbcst opened 5 years ago
This could be fixed by checking that the DOMNode->nodeType
is XML_ELEMENT_NODE
before doing anything:
http://php.net/manual/en/class.domnode.php#domnode.props.nodetype
Tested and confirmed the bug using the attached file. It does not cause a problem for schema generation, just for editing attributes.
Currently giving a workshop, so will review later. Just a quick note that DockerHub has been building that branch (see https://hub.docker.com/r/teic/roma/tags/) successfully for everyone to test :)
The docker image worked for me. Thanks for your support. However the comment is deleted after saving the customization again to disk.
applied @martindholmes's fix so the initial error should be gone. Still, we'll need to fix the unwanted deletion of the comment!
If I add (by hand) an xml comment to the values of a closed list I cannot change the the possible values any more due to the following error.
This can be forced with the following minimalistic example of adding two possible attribute values to @type (att.typed) and a comment afterwards.
See tei_all(comment).zip for the complete source code.
It looks like Roma is iterating also over comment nodes and not only xml elements.