The OpenDocument schema allows you to create an ODF file that has all of
its sub-parts enclosed in a single <office:document>, but OOo will not
export in that format nor recognize it on input unless you install this
simple "copy everything" XSLT as an import/export filter:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="xml"/>
<xsl:template match="/">
    <xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>

OOo should give users the option to save as a "flat file," and OOo should 
detect such files and open them correctly. At a minimum, this filter 
should be one of the default filters for OOo.  Flat files would also make 
things *much* easier for developers of applications that interact with 
OOo; there'd be no need to unzip a file to a temporary directory -- 
everything would be available in a single file.

(Here's a sample "flat file" that will import properly if the filter is 
installed.)

<office:document 
    office:class="text"
    xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
    xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
    xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
    xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0">
  <office:styles>
    <style:style style:name="Italic" style:family="text">        
       <style:text-properties fo:font-style="italic"/>
    </style:style>
  </office:styles>
  <office:body>
    <office:text>    
       <text:p><text:span text:style-name="Italic">Hello</text:span>    
       World!</text:p>
    </office:text>          
  </office:body>
</office:document>

-- 
J. David Eisenberg  http://catcode.com/


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

Reply via email to