On Tue, Oct 09, 2001 at 05:38:34PM +0200, Hans Hagen wrote: > At 11:53 AM 10/9/2001 +0200, Berend de Boer wrote: > >Hans Hagen <[EMAIL PROTECTED]> writes: > > > > > then, is this > > > > > > ENTITY bla SYSTEM "filename" > > > > > > the pattern to support? > > > >Exactly. > > > >It's often used in things like this: > > > >----------------------- > ><?xml version="1.0" encoding="ISO-8859-1" ?> > ><!DOCTYPE document [ > > <!ENTITY body SYSTEM "body.xml"> > > <!ENTITY sidebar SYSTEM "sidebar.xml"> > > yes, but according to bradley there can also be "yetanother.dtd" there so i > assume that the inclusion should be limited to xml ? > > taco: what was this about graphics? Should &whatamess; then expand to > \externalfigure[whatamess] ? How does one know what is a figure?
I do not have the spec at hand, but I think these patterns occur: <!DOCTYPE rootelement [ <!ENTITY name SYSTEM "filename.xml"> <!ENTITY name PUBLIC "PubId" "filename.xml"> <!ENTITY figname SYSTEM "figname.gif" NOTATION gifimage> ]> The notation marks it as a non-parsed entity, i.e., a non-xml file. The notation must have been declared in the DTD or in the internal part of the DTD. <!NOTATION GIF SYSTEM "GIF"> <!NOTATION GIF87a PUBLIC "-//CompuServe//NOTATION Graphics Interchange Format 87a//EN"> I do not think you can include a figure by just using an entity &figname;. The entity should be the value of an attribute, e.g. <!ENTITY eiffeltower SYSTEM "figures/eiffeltower.gif" NOTATION gifimage> <imagedata entityref="eiffeltower" format="gif"/>. But more direct approaches also occur: <imagedata fileref="figures/eiffeltower.gif" format="gif"/> (from docbook). All entities may be parameter entities: <!ENTITY % name ..., but then they can only contain pieces of DTD or ENTITIES. Each public ID must be followed by a system ID. Public IDs are rarely used for non-dtd files. Public IDs and system IDs can be mapped to actual paths via an entity resolver mechanism. In SGML that was the catalog; I am not sure how it is done in XML. I guess you should only support unmapped system IDs. So basically, you should indeed only support this pattern: ENTITY bla SYSTEM "filename" Simon -- Simon Pepping email: [EMAIL PROTECTED]
