facebook

dtd and autocomplete in an xml file

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #206735 Reply

    jeffhoran
    Member

    I’ve read that if I have the dtd that I should be able to see autocompletion. But, alas, I do not see it. I have the dtd in the same file as my xml so my code looks like:
    <!DOCTYPE form SYSTEM “form.dtd”>
    <form
    .
    .
    .
    thanks

    #206739 Reply

    Scott Anderson
    Participant

    Jeff,

    The problem is that the location of the DTD must be specified absolute to the file system, not relative to the XML file, in the current release. There’s an open enhancement request to support XML-relative SYSTEM DTD’s in a future release.

    As a workaround, you could also manually “cache” your DTD by saving it as:
    <workspace>/.metadata/.plugins/org.xmen/dtds/file___form.dtd
    that’s three underscores here —————————^

    #206756 Reply

    snpe
    Member

    Hello Scott,
    There is XML catalog – this is map with DTD declaration and local file place
    You can add DTD for web.xml, struts,faces,hibernate etc, but user can add any dtd and save it anywhere in file system.

    This is specification :
    http://www.oasis-open.org/committees/entity/specs/cs-entity-xml-catalogs-1.0.html

    and this is home page
    http://www.oasis-open.org/committees/entity/

    regards

    #206762 Reply

    jeffhoran
    Member

    Scott,
    so, if I use <!DOCTYPE form SYSTEM “form.dtd”> then it will work if form.dtd is on c: at the top level? Isn’t working

    #206764 Reply

    Riyad Kalla
    Member

    Jeff,
    Please try an absolute path to your DTD, C:\form.dtd for example.

    #206765 Reply

    jeffhoran
    Member

    not working yet. xmlbuddy can see it, but not myeclipse. Will it see it automatically? or do I need a recompile for the myeclipse editor to see it?

    #206766 Reply

    jeffhoran
    Member

    this is my version:
    MyEclipse Application Server Tooling

    Version: 2.7.1
    Build id: 200403241200-2.7.1-GA

    #206767 Reply

    jeffhoran
    Member

    I tried this, too. (As a workaround, you could also manually “cache” your DTD by saving it as:
    <workspace>/.metadata/.plugins/org.xmen/dtds/file___form.dtd )
    this didn’t work either.

    #206770 Reply

    jeffhoran
    Member

    support-rkalla,

    Is this unusual? or can you duplicate it?

    #206777 Reply

    Scott Anderson
    Participant

    Jeff,

    OK, I’ve got it figured out. You need to do two things to get this to work in the current release.
    1) change the dtd reference from “form.dtd” to “file://form.dtd”
    2) add the file___form.dtd file to <workspace>/.metadata/.plugins/com.genuitec.eclipse.xmen/dtds/
    3) Restart Eclipse.

    That should do it.

    #206789 Reply

    jeffhoran
    Member

    Still not working. Okay, this is what I’ve got:

    XML file:
    <?xml version=”1.0″?>
    <!DOCTYPE form SYSTEM “file://form.dtd”>
    <form

    DTD Path:
    C:\Dev\eclipse\plugins\com.genuitec.eclipse.xmen\dtds\file___form.dtd

    restart eclipse.

    Still no autocomplete.

    Harumph!

    #206792 Reply

    Scott Anderson
    Participant

    The DTD Path looks wrong. Please see what I wrote in #2 above for the proper path.

    #206796 Reply

    Riyad Kalla
    Member

    Jeff,
    Note that scott mentioned to put the DTD in your <workspace>\.metadata\.plugins\etc.etc.etc. directory, you put it into your install dir…

    Also,
    How did you install MyEclipse? I’m looking at your path:

    C:\Dev\eclipse\plugins\com.genuitec.eclipse.xmen

    and it doesn’t quite make sense. Did you uncompress MyEclipse directly ontop of your Eclipse install so all MyEclipse plugins/features went into <eclipse install dir>\features & \plugins? I’m asking because I don’t know why else that plugin directory would be under your Eclipse plugins…

    #206809 Reply

    jeffhoran
    Member

    OK, I found the problem with the path. (Myeclipse is installed under Dev just as eclipse is. I created the xmen dir in my previous effort). This is the new path location:

    C:\Dev\eclipse\workspace\.metadata\.plugins\com.genuitec.eclipse.xmen\dtd\file___form.dtd

    I also noticed the dir “com.genuitec.eclipse.xmen\dtd” in Myeclipse\.plugins so I added it there, too.

    restart. STILL NO autocomplete.

    To quote Winnie the Pooh, “oh bother.”

    #206813 Reply

    Riyad Kalla
    Member

    Jeff,
    Can you do a fresh install of Eclipse/MyEclipse in completely separate dirs, and let it create a new workspace and try there? If not that, please shutdown eclipse and remove the com.genuitec.eclipse.xmen plugin out of your eclipse plugins dir, it isn’t suppose to be there.

    I’m a little worried about other modifications that you made in the trek to get this working, and I don’t want you to be stuck from getting work done just because of some quirky setup thing.

Viewing 15 posts - 1 through 15 (of 18 total)
Reply To: dtd and autocomplete in an xml file

You must be logged in to post in the forum log in