lemminx
lemminx copied to clipboard
Documentation for RelaxNG child elements colliding
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