Exemplo n.º 1
0
static void process_file(FILE *f, FILE *output, FILE* outputHeader)
{
  process_header(f);

  print_file_header(output, outputHeader);

  process_content(f, output, outputHeader);

  print_codepage_tables(output);

  print_dictionary_table(output, outputHeader);
}
Exemplo n.º 2
0
 void copy(const DOM::Node<std::string>& node, ExecutionContext& context) const
 {
   switch(node.getNodeType())
   {
   case DOM::Node_base::ATTRIBUTE_NODE:
     context.sink().add_attribute(node.getNamespaceURI(),
                                  node.getLocalName(),
                                  node.getNodeName(),
                                  node.getNodeValue());
     break;
   case DOM::Node_base::COMMENT_NODE:
     context.sink().start_comment();
     context.sink().characters(node.getNodeValue());
     context.sink().end_comment();
     break;
   case DOM::Node_base::DOCUMENT_NODE:
   case DOM::Node_base::DOCUMENT_FRAGMENT_NODE:
     process_content(node, context);
     break;
   case DOM::Node_base::ELEMENT_NODE:
     if(context.sink().start_element(node.getPrefix(), node.getLocalName(), node.getNamespaceURI()))
     {
       process_content(node, context);
       context.sink().end_element(node.getPrefix(), node.getLocalName(), node.getNamespaceURI());
     }
     break;
   case DOM::Node_base::PROCESSING_INSTRUCTION_NODE:
     context.sink().start_processing_instruction(node.getNodeName());
     context.sink().characters(node.getNodeValue());
     context.sink().end_processing_instruction();
     break;
   case DOM::Node_base::TEXT_NODE:
   case DOM::Node_base::CDATA_SECTION_NODE:
     context.sink().characters(node.getNodeValue());
     break;
   } // switch
 } // execute