Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (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] Thu, 02 October 2008 02:40 Go to next message
David M. Karr is currently offline David M. KarrFriend
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 14:46 Go to previous messageGo to next message
Nick Sandonato is currently offline Nick SandonatoFriend
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 15:41 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
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 15:51 Go to previous message
David M. Karr is currently offline David M. KarrFriend
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: Fri Mar 29 06:01:36 GMT 2024

Powered by FUDForum. Page generated in 0.02988 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top