Re: [xml] patch: custom I/O BufferCreateFilename handlers



From: Daniel Veillard

  Send the app code, I will see what I can do,

The app code was the start of an xmlwriter php module - which has been
dumped for a new base, so not sure how helpful it would be. Let me know if
you still want it though. Basically, the first libxml include was
xmlwriter.h (which would bomb unless I added tree.h before that include).

This is the layout with which I was able to get all the headers working
with. The only thing is that xmlParserInputBufferCreateFilenameDefault and
xmlOutputBufferCreateFilenameDefault are defined in globals.h but the
functions actually live in xmlIO.c

Rob

Index: include/libxml/globals.h
===================================================================
RCS file: /cvs/gnome/gnome-xml/include/libxml/globals.h,v
retrieving revision 1.23
diff -c -r1.23 globals.h
*** a/include/libxml/globals.h 8 Jun 2004 10:16:42 -0000 1.23
--- b/include/libxml/globals.h 10 Jun 2004 11:50:31 -0000
***************
*** 28,33 ****
--- 28,41 ----
  XMLPUBFUN void XMLCALL xmlInitGlobals(void);
  XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);

+ typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc)
(const char *URI, xmlCharEncoding enc);
+ typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const
char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
+
+ XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
+  xmlParserInputBufferCreateFilenameDefault
(xmlParserInputBufferCreateFilenameFunc func);
+ XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
+  xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc
func);
+
  /*
   * Externally global symbols which need to be protected for backwards
   * compatibility support.
Index: include/libxml/xmlIO.h
===================================================================
RCS file: /cvs/gnome/gnome-xml/include/libxml/xmlIO.h,v
retrieving revision 1.54
diff -c -r1.54 xmlIO.h
*** a/include/libxml/xmlIO.h 8 Jun 2004 10:16:42 -0000 1.54
--- b/include/libxml/xmlIO.h 10 Jun 2004 11:50:31 -0000
***************
*** 62,70 ****
   */
  typedef int (*xmlInputCloseCallback) (void * context);

- typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc)
(const char *URI, xmlCharEncoding enc);
- typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const
char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
-
  #ifdef LIBXML_OUTPUT_ENABLED
  /*
   * Those are the functions and datatypes for the library output
--- 62,67 ----
***************
*** 210,220 ****
         xmlInputReadCallback readFunc,
         xmlInputCloseCallback closeFunc);

- XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
-  xmlParserInputBufferCreateFilenameDefault
(xmlParserInputBufferCreateFilenameFunc func);
- XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
-  xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc
func);
-
  xmlParserInputBufferPtr
   __xmlParserInputBufferCreateFilename(const char *URI,
            xmlCharEncoding enc);
--- 207,212 ----





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]