Skip to content

Documentation for RelaxNG child elements colliding #1745

@gonuke

Description

@gonuke

I have a Relax-NG schema with multiple elements at the same level in the hierarchy, each with a different name, but each has a child element with the same name. Example snippet:

<element name="foo">
   <element name="date"><a:documentation>Date of a FOO object</a><text/></element>
</element>
<element name="bar">
   <element name="date"><a:documentation>Date of a BAR object</a><text/></element>
</element>

When I create an XML file such as:

<foo><date></date></foo>
<bar><date></date></bar>

and access the documentation for the date child element in either of these foo or bar elements, I get the same foo documentation shown in each case.

My guess is that the search for documentation is only using the depth in the hierarchy and not the context of where that element occurs.

Note: I experience this through the VS Code XML plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions