Kevin Flynn wrote:
> I'm trying to get XXE catalog support to work for and have more or less
> succeeded but have one minor problem:
>
> All my documents include a reference to an external entity which has
> <local-config> as its root element. The document the entity refers to
> does not have a fixed name or location, so the entity declaration uses a
> "SYSTEM" relative URL.
>
> In order to be able to edit the <local-config> document on its own, I
> have defined an XXE config file containing entries to associate it with
> a DTD and CSS file:
>
> <configuration
> xsi:schemaLocation="http://www.xmlmind.com/xmleditor/schema/configuration
> ../configuration/xsd/configuration.xsd"
> name="Ayuda Config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://www.xmlmind.com/xmleditor/schema/configuration"
> xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration">
> <detect>
> <and>
> <rootElementLocalName>local-config</rootElementLocalName>
> <fileNameExtension>ayu</fileNameExtension>
> </and>
> </detect>
> <dtd publicId="-//Birdstep//DTD Ayuda XML V1.0//EN"/>
> <css name="Ayuda" location="../../css/ayuda-cfg.css" />
> </configuration>
>
> This seems to work fine if I open the document directly in XXE. However,
> if I select the <local-config> element in a referencing document and
> then select Edit -> Document Reference, the "Edit Referenced Document"
> option is disabled. In my old set up, where all entity and DTD
> references were defined using "SYSTEM" relative URLs, this option worked.
>
> I hope I have explained this well enough. Do you have any advice?
>
--> First of all, your XXE configuration is invalid. Open it in XXE (or
use xsdvalid) and you'll see that the <dtd> configuration element has a
"systemId" required attribute.
Change:
---
<dtd publicId="-//Birdstep//DTD Ayuda XML V1.0//EN"/>
---
to:
---
<dtd publicId="-//Birdstep//DTD Ayuda XML V1.0//EN"
systemId="my/local/copy/ayuda.dtd"/>
---
--> Now, this being said, I'm not sure the disabled "Edit Referenced
Document" is related to the above problem.
Generally when "Edit Referenced Document" is disabled, it means that
<local-config> element simply does not represent an external document
module.
XXE may have flattened your document when it has opened it. You need to
use Options|Options, Open Tab and check toggle "Warn about loss of
physical structure" to get a warning.
In order to help you more, I need to see a master document referencing a
<local-config> module and having the problem you describe.