WinXP + Eclipse 3.2 + plugin Oxygen 7.1.0 + dtd and schemas

Having trouble installing Oxygen? Got a bug to report? Post it all here.
yperiard
Posts: 3
Joined: Wed Jun 28, 2006 8:52 pm

WinXP + Eclipse 3.2 + plugin Oxygen 7.1.0 + dtd and schemas

Post by yperiard »

Hi,

I am doing validating a document using both dtd and schemas, using dtds to provide entities. But I seem to have a couple of problems with the validation and entity resolving.

1)
What happens is this, when we start the document ( see end of mail ) the entity auto complete list does not contain the entities defined in the dtd. To make it display, we nee to remove the link to the schema, save the document and use the "reset cache and validate option". If we readd the schema link, it still works. Why ? Is it a config problem on our side ?

2)
When we enter an entity from the list (after doing 1) the validation barfs and the problem shown is "The entity "FOO" was referenced, but not declared."
To solve this once again use the "reset cache and validate option" and all is well.

It would seem that the dtd vs. schema validation is unclear, what are the config I need to have to make this work ?

In the content completion preferences I have set the "Show all entities"
In the XML | XML Parser I have the "Ignore the dtd for validation if a schema is specified"

anything else ?


thanks

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//FOO//DTD FOO DITA Composite//EN"
"../data/dtd/client/FOOditabase.dtd">
<concept id="per1151510968828" xml:lang="en"
>
<!-- For concept titles use nouns it title caps; avoid verbs.-->
<!-- e.g. Bus Type -->
<title>test2entity</title>
<shortdesc/>
<prolog>
<metadata/>
</prolog>
<conbody><p>&BAR;&&BAR;</p>
</conbody>
</concept>
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: WinXP + Eclipse 3.2 + plugin Oxygen 7.1.0 + dtd and sche

Post by sorin_ristache »

Hello,
yperiard wrote:If we readd the schema link, it still works. Why ? Is it a config problem on our side ?
It should work also the first time, before removing the link to the schema. We will look into that.
yperiard wrote:When we enter an entity from the list (after doing 1) the validation barfs and the problem shown is "The entity "FOO" was referenced, but not declared."
To solve this once again use the "reset cache and validate option" and all is well.
I cannot reproduce this. If the entity is defined in the DTD I get no validation error regarding any entity reference, with or without a link to the XML Schema in the XML document. Please post a full sample, including a DTD, which shows the problem.
yperiard wrote:It would seem that the dtd vs. schema validation is unclear, what are the config I need to have to make this work ?

In the content completion preferences I have set the "Show all entities"
In the XML | XML Parser I have the "Ignore the dtd for validation if a schema is specified"

anything else ?
You don't need other settings. To validate against the XML Schema when a DTD (used for entity references) is also referenced in the XML document you have to check the "Ignore the dtd for validation if a schema is specified" option. Without this option checked the document is validated against the DTD. To see the entities defined in the DTD you have to check "Show all entities", otherwise the content completion list displays only the 5 standard entities (amp, apos, gt, lt, quot).

Regards,
Sorin
yperiard
Posts: 3
Joined: Wed Jun 28, 2006 8:52 pm

Post by yperiard »

Thanks for the quick answer.

From what I understood of your message, you were able to reproduce #1 but not #2.

I will try to create a simple base to send so you can reproduce #2. I should be able to send it today.

yperiard
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

Please send such a sample. What I tried for reproducing the "entity referenced but not declared" validation error: an XML document which refers to both a DTD with a DOCTYPE declaration and an XML Schema with an xsi:schemaLocation attribute. If an entity is referenced in the XML document and is defined in the DTD, I get no validation error regarding the entity reference, regardless of the value of "Ignore the DTD for validation if a schema is specified" and the presence of the xsi:schemaLocation attribute. If "Ignore the DTD for validation if a schema is specified" is true the entity references are still resolved against the DTD.

Regards,
Sorin
Post Reply