Changeset 35307

Show
Ignore:
Timestamp:
04/19/06 17:41:22 (4 years ago)
Author:
lgodard
Message:

- rough support of opendocument Calc and Impress files and templates
- update tests

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PortalTransforms/trunk/tests/output/test_opendocument_writer.odt.html

    r35283 r35307  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <!DOCTYPE style PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    3  
    4   
    5   
    6    
    7    
    8    
    9    
    10    
    11    
    12   
    13  <style type="text/css"></style> 
    14   
    15    
     2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     3<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><style xmlns="" type="text/css"></style></head><body> 
    164    
    175    
     
    219     
    2210    
    23    <div class="Standard">This is a test</div> 
    24    
    25   
    26  
     11   <div xmlns="" class="Standard">This is a test</div> 
     12  </body></html> 
  • PortalTransforms/trunk/tests/output/test_opendocument_writer.ott.html

    r35283 r35307  
    11<?xml version="1.0" encoding="utf-8"?> 
    2 <!DOCTYPE style PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    3  
    4   
    5   
    6    
    7    
    8    
    9    
    10    
    11    
    12   
    13  <style type="text/css"></style> 
    14   
    15    
     2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     3<html xmlns="http://www.w3.org/1999/xhtml"><head><title></title><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><style xmlns="" type="text/css"></style></head><body> 
    164    
    175    
     
    219     
    2210    
    23    <div class="Standard">This is a test</div> 
    24    
    25   
    26  
     11   <div xmlns="" class="Standard">This is a test</div> 
     12  </body></html> 
  • PortalTransforms/trunk/tests/test_transforms.py

    r35296 r35307  
    103103      None, 0 
    104104     ), 
     105    ('Products.PortalTransforms.transforms.opendocument_to_html', 
     106     "test_opendocument_calc.ods", "test_opendocument_calc.ods.html", 
     107      None, 0 
     108     ), 
     109    ('Products.PortalTransforms.transforms.opendocument_to_html', 
     110     "test_opendocument_calc.ots", "test_opendocument_calc.ots.html", 
     111      None, 0 
     112     ), 
     113    ('Products.PortalTransforms.transforms.opendocument_to_html', 
     114     "test_opendocument_impress.odp", "test_opendocument_impress.odp.html", 
     115      None, 0 
     116     ), 
     117    ('Products.PortalTransforms.transforms.opendocument_to_html', 
     118     "test_opendocument_impress.otp", "test_opendocument_impress.otp.html", 
     119      None, 0 
     120     ), 
    105121    ) 
    106122 
  • PortalTransforms/trunk/transforms/od2ml/document2xhtml.xsl

    r35288 r35307  
    7171 <xsl:key name="listTypes" match="text:list-style" use="@style:name" /> 
    7272  
    73  <xsl:template match="/office:document"> 
     73 
     74<xsl:template match="/*">  
     75 
    7476 <html xmlns="http://www.w3.org/1999/xhtml"> 
    7577 <head> 
    7678 <title><xsl:value-of select="$title"></xsl:value-of></title> 
    7779 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> 
    78  <xsl:apply-templates select="office:automatic-styles"/> 
     80    <xsl:apply-templates select="office:automatic-styles"/> 
    7981 </head> 
    8082 <body> 
    81  <xsl:apply-templates select="office:body/office:text"/> 
     83    <xsl:apply-templates select="office:body/office:text"/> 
     84    <xsl:apply-templates select="office:body/office:spreadsheet"/> 
     85    <xsl:apply-templates select="office:body/office:presentation"/> 
    8286 </body> 
    8387 </html> 
    84  </xsl:template> 
    85   
     88</xsl:template>  
     89 
    8690 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --> 
    8791 <!-- 
     
    526530             <int:attr name="fo:text-align" action="check-align"/> 
    527531     </int:attr-map> 
     532 
    528533     </xsl:stylesheet> 
  • PortalTransforms/trunk/transforms/opendocument_to_html.py

    r35287 r35307  
    2222    inputs = ('application/vnd.oasis.opendocument.text', 
    2323              'application/vnd.oasis.opendocument.text-template', 
    24              # 'application/vnd.oasis.opendocument.spreadsheet', 
    25              # 'application/vnd.oasis.opendocument.spreadsheet-template', 
    26              # 'application/vnd.oasis.opendocument.presentation', 
    27              # 'application/vnd.oasis.opendocument.presentation-template', 
     24              'application/vnd.oasis.opendocument.spreadsheet', 
     25              'application/vnd.oasis.opendocument.spreadsheet-template', 
     26              'application/vnd.oasis.opendocument.presentation', 
     27              'application/vnd.oasis.opendocument.presentation-template', 
    2828             # 'application/vnd.oasis.opendocument.graphics', 
    2929             # 'application/vnd.oasis.opendocument.graphics-template',