Hi Jaime,

Jaime Alvarez wrote:

I thought that the SVG filter was already done. Am I mistaken?

The SVG is done, but this filter won't be called during the XSL transformation. Furthermore, the draw images simply using SVG attributes, but are no SVG images.

Anyway, browsers can't show SVG files without a plugin, so it won't work for what I want right now.

I'd appreciate some advice on where to start learning about xslt files and hopefully find a tutorial or something like that. I already downloded theOOo xml file format and I'm ready to dive in it...

I must admit, that there is still no summary / first steps page for OOo XSL transformations.
Therefore here quickly the basics, my 7 rules - hoping that someone might find the time to write it down / bring it up as a first-steps XSLT OpenOffice page. ;-)
I will volunteer for doing the co-writing, doing the check-in.. :-)





Here my 7 basic XSLT hints:

1) There are already some exisiting XSL transformations in the Office.
For OOo2.0 wordml and spreadsheetml import/export will be installed by default, all others (e.g. strict XHTML1.0 and docbook) have to be added as optional parts during the setup (choose XSLT SAMPLE FILTER).


2) With OOo2.0 we are going to use a new XML document format (OASIS Open Office XML). Earlier the OpenOffice.org XML was being used.
More information can be found under:
http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=office


3) You may add your own filters under TOOLS->XML FILTER SETTINGS to the office. You still may choose between both mentioned XML file formats.

4) For more information on XSLT itself Apache has a nice link collection, i.e. http://xml.apache.org/xalan-j/overview.html#uptospeed

5) Notice that although there are multiple XML files zipped in one OOo document, the XSL transformation is working on a internally used single XML stream.
There is a simple trick to get your test documents into this format.
Add beyond XML FILTER SETTINGS a transformation, which does nothing else than copying this XML stream.


<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml" encoding="UTF-8"/>


    <xsl:template match="/">
        <xsl:copy-of select="."/>
    </xsl:template>
</xsl:stylesheet>

Note: The line-breaks may cause some trouble, but for testing I recommmend an indent, triggered by exchanging the xsl:output to this:
<xsl:output indent="yes" method="xml" encoding="UTF-8"/>


We internally call these streams 'flat XML stream' and gave them unoffically a 'f' before the usual suffix (e.g. '*.fods' for open document spreadsheet documents).
The JAVA and CPP sample filters of the SDK use this suffix as well (cp.
<YOUR_SDK>\examples\DevelopersGuide\OfficeDev\FilterDevelopment\ )



6) With OOo2.0 Apaches Xalan 2.6 will be used as XSLT engine.
You will find three JARS in <YOUR_OFFICE_PATH>/program/classes/
'xercesImpl.jar', 'xml-apis.jar', 'xalan.jar'.
With these JARS you are able to develop your filters via command line before bringing them into the Office.
(cp. http://xml.apache.org/xalan-j/commandline.html).


7) If you finally add your filters to the Office, but they still not work. You may receive some debug output, by setting the Java environment variable
-DXSLTransformer.statsfile=<PATH_TO_YOUR_DEBUG_FILE>
You set this with OOo2.0 under Options/Java
or in earlier offices by adding that line to the javarc / java.ini file.



Regards, Svante


Alexandro Colorado wrote:

Actually an xslt would be much better, and just put on the XML filters. It would
be cool if it can export the vector images as SVG.



On Mon, 14 Feb 2005 16:51:58 -0300, Jaime Alvarez <[EMAIL PROTECTED]> wrote:




I want to export some flowcharts I've done with OOoDraw to html,
preserving links. Unfortunately, the slides are exported as plain images.


I want to develop this functionality, using image maps in html for
adding the links where they belong. I was thinking about working on the
export filter, but I haven't done anything like this before. I guess a
macro would work as well, which would lead me to unearth my programming
neurons from college... ;-)

Are these alternatives feasible? Any suggestions?

Regards

Jaime

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--
Alexandro Colorado
Co-Leader of OpenOffice.org Spanish
http://es.openoffice.org/





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to