Florian Reuter's Weblog

Florian Reuter's Weblog

Florian Reuter's Weblog

Alle | Breakpoint | General

« Real Life Bugs! | Main | OpenDocument and... »
20051002 Sonntag Oktober 02, 2005

Flat OpenDocument

As promised in my talk at the OpenOffice.org conference I will make the ident.xsl XSL(T) script available.

To install the Flat OpenDocument filter open an empty OpenOffice.org/StarOffice Writer document; go to Tools/XSLT Filter Settings... and click on New.... Fill out the requested information as shown in the figures below:

General tab page

Transformation tab page

Finally you can test the Flat OpenDocument filter by selecting Test XSL(T) Filter... and Current document, which will show you the Flat OpenDocument representation of the current document.

( Okt 02 2005, 06:28:58 AM PDT ) Permalink Kommentare [7]

Trackback URL: http://blogs.sun.com/flo/entry/flat_opendocument
Kommentare:

Hi Florian, do you think there is enough interest for the filter to incorporate it in the installation set?

Gesendet von Stefan Taxhet am Oktober 10, 2005 at 12:57 PM PDT #

Not to look a gift horse in the mouth, but this solution is almost there. However, I see one nit: the generated .flat file was 3 (very) long lines. This makes it useless for multi-person 3-way merging as CVS will refuse to merge the changes. Other than the "don't optimize XML output" knob (which didn't work for me), is there any way to generate line breaks at reasonable lengths?

Gesendet von Steve Friedman am November 09, 2005 at 11:32 AM PST #

Hi Florian, I noted a strange anomaly with this filter. On my computer, it is necessary to set DocType=office:document. If this parameter is empty, the file xml is imported like an ascii file ! This problem seems related to issue 34496.

Gesendet von Robert Dargaud am November 12, 2005 at 12:11 PM PST #

(continuation of the preceding message) Its declaration appears strange to me because there is no declaration <!DOCTYPE in the OpenDocument files. In your tutorial, DocType field is empty ! is this exact ? In advance thank you for your help Bob

Gesendet von Robert Daragaud am November 12, 2005 at 12:12 PM PST #

Its declaration appears strange to me because there is no declaration <!DOCTYPE in the OpenDocument files. In your tutorial, DocType field is empty ! is it true ? Thanks for your help.

Gesendet von Robert Dargaud am November 12, 2005 at 12:18 PM PST #

Hi Robert, the DOCTYPE information can help the type detection. It is not required.

Gesendet von Florian Reuter am Dezember 07, 2005 at 01:37 PM PST #

I was using happily slightly more complex, but IMHO better stylesheet (and it is IIRC correct null XSLT stylesheet):

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
					 version="1.0">
  <xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>
  <xsl:strip-space elements="*"/>
  <xsl:template match="@*|node()">
	 <xsl:copy>
		<xsl:apply-templates select="@*|node()"/>
	 </xsl:copy>
  </xsl:template>
</xsl:stylesheet>

What's wrong with it?

Matej

Gesendet von Matej Cepl am Dezember 16, 2005 at 02:25 PM PST #

Senden Sie einen Kommentar:

Name:
E-Mail:
URL:

Ihr Kommentar:

HTML Syntax: Ausgeschaltet

Page Hits heute: 4