You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Daniel Bonniot de Ruisselet (JIRA)" <ji...@apache.org> on 2013/04/18 13:25:16 UTC
[jira] [Comment Edited] (TIKA-1109) Metadata not extracted before
the context in OOXML (pptx)
[ https://issues.apache.org/jira/browse/TIKA-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13635096#comment-13635096 ]
Daniel Bonniot de Ruisselet edited comment on TIKA-1109 at 4/18/13 11:24 AM:
-----------------------------------------------------------------------------
Nick, thanks a lot for your answer. I do use the API, and I see the same behaviour: when my ContentHandler is called on the text data, the metadata is not set (yet). It is only set when endDocument is called. Am I doing something wrong?
Looking at:
http://svn.apache.org/viewvc/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml/OOXMLExtractorFactory.java?revision=1339390&view=markup
and specifically:
108 // We need to get the content first, but not end
109 // the document just yet
110 EndDocumentShieldingContentHandler handler =
111 new EndDocumentShieldingContentHandler(baseHandler);
112 extractor.getXHTML(handler, metadata, context);
113
114 // Now we can get the metadata
115 extractor.getMetadataExtractor().extract(metadata);
It seems to me that metadata is read only after the text, which explains the behaviour. Why is this needed? Am I misunderstanding something?
was (Author: dbr):
Nick, thanks a lot for your answer. I do use the API, and I see the same behaviour: when my ContentHandler is called on the text data, the metadata is not set (yet). It is only set when endDocument is called. Am I doing something wrong?
Looking at:
http://svn.apache.org/viewvc/tika/trunk/tika-parsers/src/main/java/org/apache/tika/parser/microsoft/ooxml/OOXMLExtractorFactory.java?revision=1339390&view=markup
and specifically:
> Metadata not extracted before the context in OOXML (pptx)
> ---------------------------------------------------------
>
> Key: TIKA-1109
> URL: https://issues.apache.org/jira/browse/TIKA-1109
> Project: Tika
> Issue Type: Bug
> Reporter: Daniel Bonniot de Ruisselet
> Priority: Critical
> Fix For: 1.4
>
>
> It seems that when processing OOXML documents, the metadata is only read after the text. This means it's impossible to use the medata while processing the text. I think it would be more useful to have the metadata populated first.
> As a symptom:
> java -jar tika-app-1.3.jar test-classes/test-documents/testPPT.pptx
> outputs only as metadata:
> <meta name="Content-Length" content="36518"/>
> <meta name="Content-Type" content="application/vnd.openxmlformats-officedocument.presentationml.presentation"/>
> <meta name="resourceName" content="testPPT.pptx"/>
> while there is more medata in the file (e.g. <dc:title>Attachment Test</dc:title>).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira