This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Use of entityref to map generic path name in xmlcatalog


Bob Stayton schrieb:

On Wed, Aug 06, 2003 at 06:29:18PM -0500, Miranda W. Hedrick wrote:

I'm using xsltproc 2.5.8 on WindowsXP, working with
DocBook 4.2.  I have been able to successfully generate
static HTML, HTMLHelp and PDF (via Fop) files using some
customized XSL stylesheets.  Very cool stuff!  And now I
have a couple of questions...

I declared an entity as follows:

<!ENTITY myimage SYSTEM "/path/to/images/myimage.gif" NDATA GIF>

I then inserted a mediaobject that referenced the entity:

   <mediaobject>
     <imageobject>
       <imagedata entityref="myimage" format="GIF" />
     </imageobject>
   </mediaobject>

------------------------------------

1.  When I process the XML, the image source is lost.
I just get src="" within the generated IMG tag.  If I just
use fileref, the image renders properly.  What am I doing
wrong here?


It looks right, but somehow the entity is not resolving.
It doesn't matter if the path is correct, as it is
just passed through once the entity resolves.
Are you declaring the entity in the DOCTYPE,
or a separate file?  The stylesheet doesn't
complain when it can't resolve such an entityref,
but it probably should.


It seems you're using Unix paths on Windows. I doubt that Windows can resolve a path like "/path/to/images/". But, as Bob pointed out, you should be able to see the filepath in the created document. Now Windows paths are not URIs, so you have to code your path like that: "file:///driveletter:path/to/images/myimage.gif".


Start with the image in the same directory as your document. Then try using relative paths. And then see whether you can get absolute paths working. On the other hand perhaps xsltproc is doing some conversion here. But then this conversion should be the same for fileref and entityref, I guess. It seems you're using Igor's Windows port of xsltproc.

I'm using the Cygwin port of xsltproc and I have no problems resolving the paths with entityrefs. Perhaps you want to contact Igor about the issue. You can find his contact address on his website: http://www.zlatkovic.com/projects/libxml/index.html
Cygwin is a Linux-like environment for Windows. If you want to find out more about it, go here: http://www.cygwin.com/



HTH, Patrick



---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]