Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Why does completion work with a DTD, but not with a schema?
Why does completion work with a DTD, but not with a schema? [message #222550] Wed, 01 October 2008 22:40 Go to next message
David M. Karr is currently offline David M. Karr
Messages: 143
Registered: July 2009
Senior Member
Eclipse 3.3.2.

If I edit an XML file that's defined with a DTD, I can do completion on
element names. However, if it's instead defined with a schema, I don't
get any completion choices.

For instance, if I start with the following "faces-config.xml" file,
completion works fine:

--------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE faces-config PUBLIC
"-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
<faces-config>
</faces-config>
--------

However, if I instead use this:

--------
<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
version="1.2">
</faces-config>
--------

then attempts to do completion give me empty lists.

Am I missing something simple?
Re: Why does completion work with a DTD, but not with a schema? [message #222555 is a reply to message #222550] Thu, 02 October 2008 10:46 Go to previous messageGo to next message
Nick Sandonato is currently offline Nick Sandonato
Messages: 126
Registered: July 2009
Senior Member
Hi David,

Try going to the XML menu item and choose Reload Dependencies under that.


David M. Karr wrote:
> Eclipse 3.3.2.
>
> If I edit an XML file that's defined with a DTD, I can do completion on
> element names. However, if it's instead defined with a schema, I don't
> get any completion choices.
>
> For instance, if I start with the following "faces-config.xml" file,
> completion works fine:
>
> --------
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE faces-config PUBLIC
> "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
> "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
> <faces-config>
> </faces-config>
> --------
>
> However, if I instead use this:
>
> --------
> <?xml version="1.0" encoding="UTF-8"?>
> <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
> version="1.2">
> </faces-config>
> --------
>
> then attempts to do completion give me empty lists.
>
> Am I missing something simple?
>
Re: Why does completion work with a DTD, but not with a schema? [message #222557 is a reply to message #222555] Thu, 02 October 2008 11:41 Go to previous messageGo to next message
David M. Karr is currently offline David M. Karr
Messages: 143
Registered: July 2009
Senior Member
Nope. No dice. Nothing new happened. After executing "Reload
Dependencies", I entered "<man" in the body of my "faces-config" element
and pressed ctl-space, and it brought up a menu that listed "man", instead
of the several "managed-..." elements.

If this is SUPPOSED to work, then I guess I'll file a bug, after I try
this same scenario in a newer release.
Re: Why does completion work with a DTD, but not with a schema? [message #222558 is a reply to message #222557] Thu, 02 October 2008 11:51 Go to previous message
David M. Karr is currently offline David M. Karr
Messages: 143
Registered: July 2009
Senior Member
Ok, well, never mind on that. I just tried it on 3.4.1, and it works fine.
Previous Topic:Determining the client project of an EJB project from a plugin
Next Topic:Getting Server Runtime ClasspathEntry
Goto Forum:
  


Current Time: Sat Aug 30 06:31:10 EDT 2014

Powered by FUDForum. Page generated in 0.02539 seconds