Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » cannot see schema comments in xml editor for STS(xml comments not visible)
cannot see schema comments in xml editor for STS [message #1003965] Tue, 22 January 2013 05:33 Go to next message
Shane Lee is currently offline Shane Lee
Messages: 1
Registered: January 2013
Junior Member
Environment: Spring Tool Suite 2.9.2.RELEASE
Eclipse 3.7.2


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:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<amendmentConfiguration xmlns:xsi="w3schools"
    xsi:noNamespaceSchemaLocation="../../EMS-Shared/resources/amendment-configuration.xsd">
    <common>
        <prefillCodes>Amend0120 Amend0140 Amend0206</prefillCodes>
    </common>


XSD Sample:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema attributeFormDefault="unqualified"
    elementFormDefault="qualified" xmlns:xs="w3schools">
    <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.

Note: This crappy forum would not allow me to pass in the w3schools uri in the code snippet but you know what it is.
Re: cannot see schema comments in xml editor for STS [message #1008939 is a reply to message #1003965] Thu, 14 February 2013 02:26 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2130
Registered: July 2009
Senior Member
Actually, I at least don't know what the URI is.

Have you tried simplifying it to where the XML and XSD files are both in the same folder? How did you create the XML file? Can you show the contents of the schema so we know where the comments are within it?


---
Nitin Dahyabhai
Eclipse WTP, IBM

[Updated on: Thu, 14 February 2013 02:26]

Report message to a moderator

Re: cannot see schema comments in xml editor for STS [message #1010945 is a reply to message #1003965] Mon, 18 February 2013 09:24 Go to previous messageGo to next message
James Quinn is currently offline James Quinn
Messages: 1
Registered: February 2013
Junior Member
Likewise, annotation/documentation does not appear in contentassist for me too. I've a local homegrown schema (.xsd) that validates my local xml. It even suggests elements for me when I'm editting the xml. However, documentation on each element or attribute does not come through. I was thinking it was a problem with the schema, but all else works properly.

Perhaps the problem lies in my desires and expectations - While editting my xml, I want the documentation to appear in the content assist popup. I need to be able to suggest the data type, and the expected effects of element inclusion.

	<xs:element name="root" >
        <xs:annotation>
        	<xs:documentation>something else in root</xs:documentation>
        </xs:annotation>
        <xs:complexType>
			<xs:sequence>
				<xs:element name="script" type="xs:string" />
		        <xs:annotation>
		        	<xs:documentation>script else in root</xs:documentation>
		        </xs:annotation>
				<xs:element name="logSection" type="esc:logSection"  description="logSection must be given" />
		        <xs:annotation>
		        	<xs:documentation>logSection else in root</xs:documentation>
		        </xs:annotation>
		</xs:sequence>
	</xs:complexType>
</xs:element>
Re: cannot see schema comments in xml editor for STS [message #1220818 is a reply to message #1003965] Fri, 13 December 2013 14:25 Go to previous message
steve@doitnext.com Mising name is currently offline steve@doitnext.com Mising name
Messages: 2
Registered: December 2013
Junior Member
Add me to the list of people in the same boat. WTF?
Previous Topic:Content Assist problem during XML editing
Next Topic:How to extends Servers View
Goto Forum:
  


Current Time: Wed Apr 16 12:19:18 EDT 2014

Powered by FUDForum. Page generated in 0.13403 seconds