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

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

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


Subject: Re: [docbook] how to throw error if imagedata not found


Hi there, Chris,

On Wed, Oct 13, 2010 at 9:16 AM, chris snow <chsnow123@gmail.com> wrote:
Is it possible for an error to be thrown during processing if a file
referred to by imagedata is not found?

   <mediaobject>
     <imageobject>
       <imagedata fileref="../../images/coding-cycle.png"/>
     </imageobject>
   </mediaobject>

Many thanks,

Chris

It might not be exactly what you are looking for, but one option would be to include the image via an xinclude mechanism, and then include a xinclude fallback.  It might go something like this:
 
   <mediaobject>
     <imageobject>
       <xi:include fileref="../../images/coding-cycle.png">
         <xi:fallback>Image file is unavailable.</xi:fallback>
       </xi:include>
     </imageobject>
   </mediaobject>
 
You would need to use a DTD or schema (or at least a DTD fragment) that allows for use of xinclude.
 
I hope this helps,

Jim


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