Difference between revisions of "Documentation/DevGuide/OfficeDev/The Exporter"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (1 revision(s))
m (FINAL VERSION FOR L10N)
(4 intermediate revisions by 3 users not shown)
Line 5: Line 5:
 
|ShowPrevNext=block
 
|ShowPrevNext=block
 
|PrevPage=Documentation/DevGuide/OfficeDev/The Importer
 
|PrevPage=Documentation/DevGuide/OfficeDev/The Importer
|NextPage=Documentation/DevGuide/OfficeDev/Configuration
+
|NextPage=Documentation/DevGuide/OfficeDev/XML Filter Detection
 
}}
 
}}
{{DISPLAYTITLE:The Exporter}}
+
{{Documentation/DevGuideLanguages|Documentation/DevGuide/OfficeDev/{{SUBPAGENAME}}}}
 +
{{DISPLAYTITLE:The Exporter}}
 
=== Evaluating XExportFilter Parameters ===
 
=== Evaluating XExportFilter Parameters ===
  
Line 21: Line 22:
  
 
For the filtering, the <idl>com.sun.star.xml.sax.XDocumentHandler</idl> implementation is used. This consists of a set of SAX event handling methods, which define how particular XML tags are handled. These methods are:
 
For the filtering, the <idl>com.sun.star.xml.sax.XDocumentHandler</idl> implementation is used. This consists of a set of SAX event handling methods, which define how particular XML tags are handled. These methods are:
 
+
<source lang="cpp">
 
   startDocument(){
 
   startDocument(){
 
   }
 
   }
Line 38: Line 39:
 
   setDocumentLocator(){
 
   setDocumentLocator(){
 
   }
 
   }
 
+
</source>
 
The result of this event handling can be processed and written to the <code>XOutputStream</code> that was extracted from the <code>MediaDescriptor</code>.
 
The result of this event handling can be processed and written to the <code>XOutputStream</code> that was extracted from the <code>MediaDescriptor</code>.
  
 
{{PDL1}}
 
{{PDL1}}
[[Category: Office Development]]
+
 
 +
[[Category:Documentation/Developer's Guide/Office Development]]

Revision as of 11:21, 13 May 2009



Evaluating XExportFilter Parameters

The exporter() method operates in much the same way as importer(), except that instead of the exporter using a provided XDocumentHandler, it is itself a com.sun.star.xml.sax.XDocumentHandler implementation.

When the exporter() method is invoked, the necessary variables need to be extracted for use by the filter. This is the same thing that happens with the importer, except that the MediaDescriptor contains an XOutputStream, instead of the importer's XInputStream. Once the variables have been extracted (and - in some cases - a Pipe has been created) the exporter() method returns. It does not carry out the filtering at this stage.

Template:Documentation/Note

Exporter Filtering

After the exporter() method returns, the XML filter adapter then invokes the com.sun.star.xml.sax.XDocumentHandler methods to parse the XML output.

For the filtering, the com.sun.star.xml.sax.XDocumentHandler implementation is used. This consists of a set of SAX event handling methods, which define how particular XML tags are handled. These methods are:

  startDocument(){
  }
  endDocument(){
  }
  startElement(){
  }
  endElement(){
  }
  charactors(){
  }
  ignorableWhitespace(){
  }
  processingInstruction(){
  }
  setDocumentLocator(){
  }

The result of this event handling can be processed and written to the XOutputStream that was extracted from the MediaDescriptor.

Content on this page is licensed under the Public Documentation License (PDL).
Personal tools
In other languages