Finally I have solved the problem by cusomizing
docb.convertStep1 in the following way:

   <command name="docb.convertStep2">
     <process>
       <mkdir dir="images" />
       <mkdir dir="raw" />

       <copyDocument to="__doc.xml">
         <resources match="(https|http|ftp)://.*" />

         <!-- Support for textdata/@fileref.
           add your favorite text file extensions here: -->
         <resources
           match=".+\.(txt|text|htm|html|xml|h|c|cpp|java|js|tcl|py|pl|rb)"
           copyTo="." />

         <resources match=".+\.(png|jpg|jpeg|gif)"
           copyTo="images" />
         <resources match="(?:.+/)?(.+)\.(\w+)"
           copyTo="raw" referenceAs="images/$1.png" />
         <resources match=".+"
           copyTo="images" />
       </copyDocument>

       <convertImage from="raw" to="images" format="png" />

       <mkdir dir="images%Scallouts" />
       <copyProcessResources resources="xsl/images/draft.png" to="images" />
       <copyProcessResources 
resources="@xslt/images/callouts/png_callouts.list"
         to="images/callouts" />
     </process>
   </command>

I personally think that it would be preferable to be
able to configure images location files in the
standar way, the same as callout images. Hardwiring
it inside XXE may be annoying to Bob Stayton and some
Docbook users :-)

Hussein Shafie escribi?:
> Alberto Gonz?lez T?llez wrote:
>> I noticed about this command but the problem
>> is not about copying files in "resources" folder,
>> that is ok, what I am trying to change is the
>> href attribute of img elements in the generated
>> HTML by means of docbook.xsl. ?Is this command
>> affecting this inside XXE?
>>
> 
> --> If the "Convert to HTML" menu item generates HTML pages in 
> file://foo/bar/, then the images referenced in these pages are found in 
> file://foo/bar/resources/.
> 
> Without doing anything special, the HTML pages contains img elements 
> looking like this:
> 
> <img src="resources/my_logo.png"/>
> 
> That is, the src attribute contains a relative reference to a graphics 
> file found in the resources/ directory.
> 
> --> If you specify parameter "img.src.path" to something like 
> "MyImageRepository/" (thanks Pavel for the tip about the trailing '/'), 
> then the HTML pages will contains img elements looking like this:
> 
> <img src="MyImageRepository/resources/my_logo.png"/>
> 
> Which means that the HTML pages will contain broken image links.
> 
> --> Conclusion: when all the image management is hard-wired in XXE's 
> process  commands, a parameter "img.src.path" is useless and can only be 
> used to break things.
> 
> You certainly have an actual problem to be solved. Please give us more 
> details about it because, as I've already said it, using  "img.src.path" 
> in the context of XXE cannot be the solution to your problem (whatever 
> this problem could be).
> 
> 
> ---
> PS: Everything said in this email does not apply to graphics files 
> referenced using absolute URLs (that is, when the DocBook source 
> contains elements such as <imagedata 
> fileref="http://www.acme.com/images/my_logo.png"/>).
> 


-- 
Alberto Gonzalez Tellez
E.T.S. de Informatica Aplicada.
C/ Camino de Vera s/n 46022 Valencia (Spain)
Tel: 34-96-3877007 ext 75770 Fax: 34-96-3877579
e-mail: agt at disca.upv.es, web: www.disca.upv.es/agt


Reply via email to