File new dialog and DTD public ids

Having trouble installing Oxygen? Got a bug to report? Post it all here.
queshaw
Posts: 41
Joined: Wed Aug 08, 2007 5:56 am

File new dialog and DTD public ids

Post by queshaw »

I'm using oxygen 13.1 standalone editor on windows. When I create a new document by selecting DTD and specifying the public identifier, it works as I would expect. But, if I then want to create a document using a different DTD, changing the public identifier does nothing. If I delete the system identifier and put in the public identifier it does nothing.

So, what I do is select one of the provided schemas, create a file, close it then change to DTD, enter the public identifier, etc. Is there a simpler way to get it to recognize a different public identifier? Or, is it a bug? Is it a problem in the current version?
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: File new dialog and DTD public ids

Post by adrian »

Hello,

We could not reproduce the problem you are describing. We have tested this against the latest maintenance build of v13.1 (2011121414), v13.2 and v14.0. In all tests, when creating an XML file based on a DTD (local file), the correct public ID was used, even after repeatedly changing both the DTD and the Public ID.

Please note that if you are using a remote DTD (e.g. http://site/path/to/my.dtd) that is not resolved via an XML catalog to a local copy, when changing/setting the DTD, you will have to wait a few seconds until the content of that DTD is retrieved from the remote source (you usually get a hourglass pointer to reflect that).
If you use DTDs from remote locations, we would recommend making sure that they are resolved through XML catalogs to local copies. Using XML catalogs and local copies of the schemas/DTDs improves the performance significantly when editing and validating in Oxygen.

Also, if possible, please install the latest build of Oxygen v13.2 from our software archive. You can find it here:
Software Archive, Oxygen XML Editor

Let us know if the problem persists.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
queshaw
Posts: 41
Joined: Wed Aug 08, 2007 5:56 am

Re: File new dialog and DTD public ids

Post by queshaw »

I experience the same behavior with the standalone client downloaded from the link that you gave.

There is a detail that I didn't mention which is that the "busy" icon doesn't seem to go away when the new file dialog is open.

Here are the steps that I took:

Catalog:

<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
<public publicId="-//Test//DTD Test A//EN" uri="a.dtd"/>
<public publicId="-//Test//DTD Test B//EN" uri="b.dtd"/>
</catalog>

a.dtd:

<!ELEMENT a EMPTY>

b.dtd:

<!ELEMENT b EMPTY>

In oxygen:

Select File->New
Select XML file
Select Customize
Select DTD Schema type
In Public ID: -//Test//DTD Test A//EN
Click create

It creates a document using the appropriate dtd.

Next in oxygen:

Select File->New
Select XML file
Select Customize
Select DTD Schema type
The busy mouse icon is displayed.
Wait 30 minutes
The busy icon is still displayed
Change public id to: -//Test//DTD Test B//EN
the schema url is not updated.
queshaw
Posts: 41
Joined: Wed Aug 08, 2007 5:56 am

Re: File new dialog and DTD public ids

Post by queshaw »

I may have found an easier work around.

Delete both the schema url and public id, then insert the public id.

If I edit the public id, the change isn't noticed.

This also happens to be after I installed the eclipse plugin, in case that could have affected the standalone client behavior somehow.
adrian
Posts: 2850
Joined: Tue May 17, 2005 4:01 pm

Re: File new dialog and DTD public ids

Post by adrian »

Hello,

Now I realize what's happening.
When you enter the public ID the first time (with a blank dialog), it automatically populates the URL field with the DTD determined from the XML catalog.
However, this only happens if the URL field is empty, so the second time the URL (which has remained set from the first step) is not updated. So, the second time you end up with a file based on the DTD from the first step.

I've logged this to our issue tracking tool to analyze and find a solution in a future version of Oxygen.

In the meanwhile, the workaround (that you've already found) is to remove the URL of the DTD before inserting the new public ID.

The Eclipse and standalone editions of Oxygen are completely independent, so they don't interfere with each other.

Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply