Kevin Flynn wrote: > Hussein Shafie wrote: >> Currently, the include command is strictly the functional equivalent of >> the Include tool. The Include tool does not support specifying URIs >> resolved by an XML catalog (e.g. "ece-global:global-variables.ebk"), >> therefore it is the same for the include command. >> >> It is very easy to modify the include command to make it use XML >> catalogs when parsing its referenced_document_URL argument ( >> http://www.xmlmind.com/xmleditor/_distrib/doc/commands/include.html ). I >> did that in 2 minutes and it works fine. Unfortunately, when you'll save >> your document, you'll not find: >> >> <xi:include href="ece-global:global-variables.ebk" xpointer="g-studio"/> >> >> but something like: >> >> <xi:include href="file://home/kevin/doc/global-variables.ebk" >> xpointer="g-studio"/> >> >> That is, a reference to the resolved URL, and not to the original URI. >> Of course, this defeats the whole idea of using an XML catalog in this >> context. >> >> We'll try to remove this limitation in next release. (I'm saying we'll >> try because we think that this will not be easy.) >> > OK, thanks. Is there any workaround? Is it possible to construct the node > > <xi:include href="ece-global:global-variables.ebk" xpointer="g-studio"/> > > in some way and then paste it into the document? Or will the catalog > reference always be expanded during insertion? >
There is currently no practical way to automate this. Currently the only way to insert an reference resolved using an XML catalog is to do it by hand: [1] Edit|Reference|Copy as Reference then Paste (or use the Include tool). [2] Select the newly inserted inclusion and use Edit|Reference|Untransclude Reference. This replaces the transcluded contents by the inclusion directive (i.e. the xi:include). [3] Edit the inclusion directive by hand. For example, select the xi:include and use the Attribute tool to change its href attribute to href="ece-global:global-variables.ebk". [4] Use Edit|Reference|Retransclude Reference to replace the inclusion directive by the transcluded contents. This currently works fine[*] and when you'll save the document, it will actually contain: <xi:include href="ece-global:global-variables.ebk" xpointer="g-studio"/> --- [*] This technique is currently the only way to specify parse="text" for an XInclude.

