OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]