Not. This is one of XMetaL's many limitations. Attached is a test case I provided 
XMetaL support long ago. Out of curiosity, what version of XMetaL are you using? I was 
working with 2.1 when I reported the problem. They're response was basically "don't do 
that."

David


> -----Original Message-----
> From: Kraa de Simon [mailto:Simon.de.Kraa@;services.fujitsu.com]
> Sent: Friday, November 01, 2002 2:44 AM
> To: '[EMAIL PROTECTED]'
> Subject: DOCBOOK-APPS: Question about the ENTITY references
> 
> 
> Hello,
> 
> I have a question about the ENTITY references.
> 
> Part of the TDG directory structure:
> 
> ./book.xml
> ./bookbody.xml
> ./ch00.xml
> ./entities/content.ent
> 
> In bookbody.xml the reference to "chapter 00" is:
> 
> &ch00;
> 
> In entities/content.ent all entities are referenced by ../ch00.xml but
> shouldn't this be ./ch00.xml?
> 
> Because the bookbody.xml and ch00.xml file are on the same level and
> ch00.xml is referenced from within bookbody.xml?
> 
> <!ENTITY ch00 SYSTEM "../ch00.xml">
> 
> The XML editor that I use (XMetaL) cannot find the file 
> ../ch00.xml and when
> I think about it I think he is right...
> 
> Or not?
> 
> 
--- Begin Message ---
In the attached test case, XMetaL fails to find the file "sharedResource.xml" ('Can't 
find file "../sharedResources/sharedResource.xml" for external entity 
"sharedResource"'). It appears that XMetaL is looking for sharedResource.xml relative 
to the file testOfEntityResolution.xml rather than relative to parameter.ent. This in 
contradiction to the xml spec and common sense. It just doesn't make sense to look for 
the resource relative to where the entity is referenced, since it could be referenced 
in any number of different resources, each of which would require a different relative 
uri.

According to the XML spec: "Unless otherwise provided by information outside the scope 
of this
specification..., relative URIs are relative to the location of the resource within 
which the entity declaration occurs." (See link and paragraph below).

The entity sharedResource is declared in the file parameter.ent so it should be found 
relative to parameter.ent. Is there a way to make XMetaL conform to the xml spec?

David

http://www.w3.org/TR/2000/REC-xml-20001006

"[Definition: The SystemLiteral is called the entity's systemidentifier. It is a URI 
reference (as defined in [IETF RFC 2396], updated by [IETF RFC 2732]), meant to be 
dereferenced to obtain input for the XML processor to construct the entity's 
replacement text.] It is an error for a fragment identifier (beginning with a # 
character) to be part of a system identifier.  Unless otherwise provided by 
information outside the scope of this specification (e.g. a special XML element type 
defined by a particular DTD, or a processing instruction defined by a particular 
application specification), relative URIs are relative to the location of the resource 
within which the entity declaration occurs. A URI might thus be relative to the 
document entity, to the entity containing the external DTD subset, or to some other 
external parameter entity.]"

Attachment: entityTest.zip
Description: entityTest.zip

--- End Message ---

Reply via email to