38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync This stylesheet is used to transform doc/libxml2-api.xml into a pseudo-source,
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync which can then be preprocessed to get the .DEF file for the Microsoft's linker.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync Use any XSLT processor to produce a file called libxml2.def.src in the win32
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync subdirectory, for example, run xsltproc from the win32 subdirectory:
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync xsltproc -o libxml2.def.src defgen.xsl /doc/libxml2-api.xml
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync Once that finishes, rest assured, the Makefile will know what to do with the
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync generated file.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync April 2003, Igor Zlatkovic <igor@zlatkovic.com>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync<!DOCTYPE xsl:stylesheet [ <!ENTITY nl '
'> ]>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#define LIBXML2_COMPILING_MSCCDEF&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#include "/include/libxml/xmlversion.h"&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:for-each select="/api/symbols/*[self::variable or self::function]">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!-- Basic tests -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_C14N_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_CATALOG_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_DEBUG_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'HTMLtree')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_HTTP_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'xmlschemas')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'xmlschemastypes')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_SCHEMAS_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_XINCLUDE_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_XLINK_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_AUTOMATA_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'xmlunicode')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_REGEXP_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'xpathInternals')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_XPATH_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_XPTR_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!-- Extended tests -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:if test="(@name = 'htmlDefaultSAXHandlerInit')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'htmlInitAutoClose')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'htmlCreateFileParserCtxt')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'inithtmlDefaultSAXHandler')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIsXHTML')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPOpenW')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlRegisterHTTPPostCallbacks')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPMatch')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPOpen')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPRead')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPClose')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:if test="(@name = 'docbDefaultSAXHandlerInit')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'initdocbDefaultSAXHandler')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:if test="@name = 'xmlValidBuildContentModel'">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_REGEXP_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOFTPOpen')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOFTPRead')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOFTPClose')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:if test="(@name = 'xmlTextReaderRelaxNGValidate')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlTextReaderRelaxNGSetSchema')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_SCHEMAS_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlXPathDebugDumpCompExpr')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_DEBUG_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlMallocAtomicLoc')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlReallocLoc')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlMemStrdupLoc')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef DEBUG_MEMORY_LOCATION&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!-- Symbol -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlMallocAtomic')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlRealloc')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlFree')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlMemStrdup')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_THREAD_ALLOC_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'htmlDefaultSAXHandler')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'oldXMLWDcompatibility')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlBufferAllocScheme')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlDefaultBufferSize')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlDefaultSAXHandler')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlDefaultSAXLocator')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlDoValidityCheckingDefaultValue')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlGenericError')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlGenericErrorContext')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlGetWarningsDefaultValue')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIndentTreeOutput')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlTreeIndentString')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlKeepBlanksDefaultValue')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlLineNumbersDefaultValue')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlLoadExtDtdDefaultValue')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlParserDebugEntities')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlParserVersion')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlPedanticParserDefaultValue')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlSaveNoEmptyTags')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlSubstituteEntitiesDefaultValue')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlRegisterNodeDefaultValue')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlDeregisterNodeDefaultValue')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_THREAD_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_DOCB_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:text>#ifdef LIBXML_HTML_ENABLED&nl;</xsl:text>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!-- Basic tests (close) -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'HTMLtree')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'xmlschemas')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'xmlschemastypes')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'xmlunicode')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@file = 'xpathInternals')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <!-- Extended tests (close) -->
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:if test="(@name = 'htmlDefaultSAXHandlerInit')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'htmlInitAutoClose')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'htmlCreateFileParserCtxt')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'inithtmlDefaultSAXHandler')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIsXHTML')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPOpenW')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlRegisterHTTPPostCallbacks')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPMatch')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPOpen')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPRead')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOHTTPClose')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:if test="(@name = 'docbDefaultSAXHandlerInit')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'initdocbDefaultSAXHandler')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:if test="@name = 'xmlValidBuildContentModel'">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOFTPOpen')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOFTPRead')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlIOFTPClose')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync <xsl:if test="(@name = 'xmlTextReaderRelaxNGValidate')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlTextReaderRelaxNGSetSchema')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlXPathDebugDumpCompExpr')">
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlMallocAtomicLoc')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlReallocLoc')
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync or (@name = 'xmlMemStrdupLoc')">