Announcement Announcement Module
Collapse
No announcement yet.
cannot see schema comments in xml editor for STS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • cannot see schema comments in xml editor for STS

    Environment: Spring Tool Suite 2.9.2.RELEASE


    I have an xml file which i view using xml editor in STS IDE. I linked it to the associated schema file (xsd) for validation and content assist.

    XML Sample:

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <amendmentConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="../../EMS-Shared/resources/amendment-configuration.xsd">
        <common>
            <prefillCodes>Amend0120 Amend0140 Amend0206</prefillCodes>
        </common>

    XSD Sample:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema attributeFormDefault="unqualified"
        elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:element name="amendmentConfiguration" type="amendmentConfigurationType">
        <xs:annotation>
        <xs:documentation>Testing</xs:documentation>
        </xs:annotation>
    In eclipse preferences i turned on xml validation. So in my xml file i can directly access the schema and content assist will show me the available elements. Validation works also.

    I expected when i hover over the amendmentConfiguration i would see the comment "Testing" but i do not. Is there any reason why? Is it tied to catalogs?

    Thanks,

    Shane.

  • #2
    I'd expect that if the rest of your schema is resolving properly then you'd be able to see comments for your elements as well. If the XML editor isn't properly resolving your XSD you could try adding your XSD to Eclipse's XML Catalog through Eclipse Preferences -> XML -> XML Catalog.

    If that doesn't help, you should try asking this question on the Eclipse Web Tools Forum where they maintain the XSD and XML editor frameworks: http://www.eclipse.org/forums/index.php/f/88/

    Cheers,
    Leo

    Comment


    • #3
      Thanks for the reply Leo. Yes the schema is well formed and validates correctly.

      I even added in a dummy namespace and added in an entry in xml catalog but that still did not work.

      I will post the question on that forum and see what they say.

      Thanks,
      Shane.

      Comment

      Working...
      X