forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Web Maestro Clay <the.webmaes...@gmail.com>
Subject Re: [jira] Commented: (FOR-872) Updated odt_to_xhtml.xsl to pass <title> & <h1> elements.
Date Wed, 10 May 2006 14:09:10 GMT
On May 10, 2006, at 12:22 AM, Ross Gardler wrote:
> Clay Leeds wrote:
>> I am looking into this further. The PATH to the files in question  
>> are  defined in OpenOffice.org as:
>> file:///Users/clay/Sites/myproject/src/documentation/content/ 
>> xdocs/ images/picture_01.jpg
>> However, the images are embedded in the document as well (under   
>> $filename.odt/Pictures/*.jpg). I might be able to reference the   
>> images in the document as '/images/picture_01.jpg' but then they  
>> will  no longer show as an image in the OOo/OpenDocument file.
>
> I recall struggling with this in the OOo plugin. I suggest you look  
> at how images are handled in there.
>
> (I would like to echo Ferdinands concerns about re-inventing the  
> wheel with this new ODT plugin. We should have at least forked the  
> OOo plugin to do this - too late now, but Clay, you should be aware  
> many problems will already be solved in the OOo plugin).
>
> Ross

Much of the code that is in odt was copied from OOo:
- odt-to-forrest-xhtml.xsl (xsl:stylesheet elements match odt xpath)
- locationmap.xml (changed pattern to point to the odt plugin files)
- resources.xmap (changed pattern to say 'openDocumentEmbeddedImage/ 
zip...')

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
   <map:pipelines>
     <map:pipeline internal="true">

       <map:match pattern="openDocumentEmbeddedImage/zip-**/file-**.*">
         <map:read src="jar:file:///{lm:project.{1}!/{2}.{3}}" mime- 
type="image/{3}" />
       </map:match>

       <map:match pattern="**/openDocumentEmbeddedImage/zip-**/file- 
**.*">
         <map:read src="jar:file:///{lm:project.{1}/{2}!/{3}.{4}}"  
mime-type="image/{4}" />
       </map:match>

     </map:pipeline>
   </map:pipelines>
</map:sitemap>

I'll keep plugging away. In any case I'll need to modify the system  
to copy the $filename to the images/ directory structure to ensure  
image integrity.

Web Maestro Clay
the.webmaestro@gmail.com

My religion is simple. My religion is kindness.
-- HH Dalai Lama of Tibet


Mime
View raw message