Skip to content

Bug: Adding comments at lowest hierarchy level #460

@ChristianScholtKSOL

Description

@ChristianScholtKSOL

I think I found a bug in XML-Notepad when trying to add a comment at the lowest hierarch level in a nested XML-Structure.
I get the following Error-Message from a Validator: ERROR_XML_CONFIG:: Error Message: no character data is allowed by content model.
See the following examples:

Allowed:

<catalog>
    <book id = "Book_1" author ="Writer_A" title = "title_A" ></book>
</catalog>

Also Allowed:

<catalog>
    <book id = "Book_1" author ="Writer_A" title = "title_A" ><!-- Just a comment like it is allowed to do --></book>
</catalog>

Not Allowed (and already fixed I think):

<catalog>
    <book id = "Book_1" author ="Writer_A" title = "title_A" >  </book>
</catalog>

Also Not Allowed:

<catalog>
    <book id = "Book_1" author ="Writer_A" title = "title_A" >  <!-- Just a comment like it is allowed to do -->    </book>
</catalog>

What XML Notepad does:

<catalog>
  <book id="Book_1" author="Writer_A" title="title_A">
    <!--test-->
  </book>
</catalog>

from XSD (if it is from interest)

...
<xs:element name = book>
    <xs:complexType>
        <xs:attribute type = "xs:string" name = "id">
        <xs:attribute type = "xs:string" name = "author">
        <xs:attribute type = "xs:string" name = "title">
    </xs:complexType>
</xs:element>
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions