OASIS extension and default import class

Author Message

J-A Eberhard

Monday 04 December 2006 11:51:40 pm

The OASIS (ezodf) have a setting to specify the default class for import in odf.ini

[ODFImport]
# Default class for import
DefaultImportClass=article

I want to use the OASIS import for different type of objects, articles, products, ....
How could I have:
- The possibility for the user to choose the type of object he want his Open Office document to be
- The ability of eZ publish to override this settings according to the node / subtree of the import?

Thanks

Open Source Solution Provider
Open-Net Ltd Switzerland
http://www.open-net.ch

Daniele P.

Wednesday 06 December 2006 6:07:31 am

Hi,
Look at odf.ini. You could define different classes.
The match is done looking at document sections name. In OpenOffice use Insert -> Section and create a template for yor class. AFAIK there is no such option in Mircosoft Word so all Word documents are imported using the default class.

Felipe Jaramillo

Monday 16 July 2007 10:51:44 pm

Hello all,

I have been looking at something similar to what is mentioned in this post.

After looking at modules/ezdf/ezooimport.php file it seems that the odf -> eZ class matching is done by trying to match the document's seaction names to attribute names in the available declared classes.

Therefore, if I understand correctly, <i>classes need to have a unique attribute/identifier combinations</i>, to avoid being mistakenly mapped to another class.

I guess it would be useful to have a different way of identifying classes, like prepending the class to the filename (eg. article_nameofarticle.odf and publication_nameofpublication.ofg) even if both classes contain the same attributes and have the same identifiers.

Another need for better matching would be to have pre-filled content objects which contain datatypes not currently supported by the extension.

Could anyone confirm this?

Regards,

Felipe

Felipe Jaramillo
eZ Certified Extension Developer
http://www.aplyca.com | Bogotá, Colombia

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 11:39:05
Script start
Timing: Jan 18 2025 11:39:05
Module start 'layout'
Timing: Jan 18 2025 11:39:05
Module start 'content'
Timing: Jan 18 2025 11:39:05
Module end 'content'
Timing: Jan 18 2025 11:39:05
Script end

Main resources:

Total runtime0.6370 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 589.4766152.6406
Module start 'layout' 0.00780.0038 742.117239.4766
Module start 'content' 0.01160.6239 781.5938568.1563
Module end 'content' 0.63560.0014 1,349.750012.1250
Script end 0.6370  1,361.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.6315160.0003
Check MTime0.00140.2155160.0001
Mysql Total
Database connection0.00140.227210.0014
Mysqli_queries0.582191.3803590.0099
Looping result0.00070.1173570.0000
Template Total0.599694.120.2998
Template load0.00250.391120.0012
Template processing0.597193.739120.2986
Template load and register function0.00010.013310.0001
states
state_id_array0.00210.322810.0021
state_identifier_array0.00080.131920.0004
Override
Cache load0.00210.3309250.0001
Sytem overhead
Fetch class attribute can translate value0.00110.177130.0004
Fetch class attribute name0.00150.233340.0004
XML
Image XML parsing0.00070.105230.0002
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00080.1300150.0001
String conversion0.00000.001840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 13
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs