mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-29 15:41:13 +03:00
applied the same kind of fixes to the Python Makefiels than to libxml2
* python/Makefile.am python/generator.py python/libxslt.c python/types.c python/tests/Makefile.am: applied the same kind of fixes to the Python Makefiels than to libxml2 ones. Updates and cleanups too. Daniel
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
Mon Mar 18 16:22:46 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* python/Makefile.am python/generator.py python/libxslt.c
|
||||||
|
python/types.c python/tests/Makefile.am: applied the same kind of
|
||||||
|
fixes to the Python Makefiels than to libxml2 ones. Updates
|
||||||
|
and cleanups too.
|
||||||
|
|
||||||
Sat Mar 16 23:48:21 CET 2002 Daniel Veillard <daniel@veillard.com>
|
Sat Mar 16 23:48:21 CET 2002 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* libexslt/common.c libxslt/pattern.c libxslt/transform.c
|
* libexslt/common.c libxslt/pattern.c libxslt/transform.c
|
||||||
|
@ -31,10 +31,19 @@
|
|||||||
<exports symbol='xslAddCall'/>
|
<exports symbol='xslAddCall'/>
|
||||||
<exports symbol='xslDropCall'/>
|
<exports symbol='xslDropCall'/>
|
||||||
</file>
|
</file>
|
||||||
<file name='attributes'>
|
<file name='xsltwin32config'>
|
||||||
<exports symbol='xsltParseStylesheetAttributeSet'/>
|
<exports symbol='LIBXSLT_DOTTED_VERSION'/>
|
||||||
<exports symbol='xsltFreeAttributeSetsHashes'/>
|
<exports symbol='LIBXSLT_VERSION'/>
|
||||||
<exports symbol='xsltApplyAttributeSet'/>
|
<exports symbol='LIBXSLT_VERSION_STRING'/>
|
||||||
|
<exports symbol='WITH_XSLT_DEBUG'/>
|
||||||
|
<exports symbol='DEBUG_MEMORY'/>
|
||||||
|
<exports symbol='DEBUG_MEMORY_LOCATION'/>
|
||||||
|
<exports symbol='ATTRIBUTE_UNUSED'/>
|
||||||
|
<exports symbol='LIBXSLT_PUBLIC'/>
|
||||||
|
</file>
|
||||||
|
<file name='libxslt'>
|
||||||
|
<exports symbol='IN_LIBXSLT'/>
|
||||||
|
<exports symbol='LIBXSLT_PUBLIC'/>
|
||||||
</file>
|
</file>
|
||||||
<file name='numbersInternals'>
|
<file name='numbersInternals'>
|
||||||
</file>
|
</file>
|
||||||
@ -84,15 +93,10 @@
|
|||||||
<exports symbol='xsltPreComputeExtModuleElement'/>
|
<exports symbol='xsltPreComputeExtModuleElement'/>
|
||||||
<exports symbol='xsltRegisterTestModule'/>
|
<exports symbol='xsltRegisterTestModule'/>
|
||||||
</file>
|
</file>
|
||||||
<file name='imports'>
|
<file name='attributes'>
|
||||||
<exports symbol='XSLT_GET_IMPORT_PTR'/>
|
<exports symbol='xsltParseStylesheetAttributeSet'/>
|
||||||
<exports symbol='XSLT_GET_IMPORT_INT'/>
|
<exports symbol='xsltFreeAttributeSetsHashes'/>
|
||||||
<exports symbol='xsltParseStylesheetImport'/>
|
<exports symbol='xsltApplyAttributeSet'/>
|
||||||
<exports symbol='xsltParseStylesheetInclude'/>
|
|
||||||
<exports symbol='xsltNextImport'/>
|
|
||||||
<exports symbol='xsltNeedElemSpaceHandling'/>
|
|
||||||
<exports symbol='xsltFindElemSpaceHandling'/>
|
|
||||||
<exports symbol='xsltFindTemplate'/>
|
|
||||||
</file>
|
</file>
|
||||||
<file name='xsltInternals'>
|
<file name='xsltInternals'>
|
||||||
<exports symbol='XSLT_MAX_SORT'/>
|
<exports symbol='XSLT_MAX_SORT'/>
|
||||||
@ -141,9 +145,77 @@
|
|||||||
<exports symbol='xsltAllocateExtra'/>
|
<exports symbol='xsltAllocateExtra'/>
|
||||||
<exports symbol='xsltAllocateExtraCtxt'/>
|
<exports symbol='xsltAllocateExtraCtxt'/>
|
||||||
</file>
|
</file>
|
||||||
<file name='libxslt'>
|
<file name='pattern'>
|
||||||
<exports symbol='IN_LIBXSLT'/>
|
<exports symbol='xsltCompMatch'/>
|
||||||
<exports symbol='LIBXSLT_PUBLIC'/>
|
<exports symbol='xsltCompMatchPtr'/>
|
||||||
|
<exports symbol='xsltCompilePattern'/>
|
||||||
|
<exports symbol='xsltFreeCompMatchList'/>
|
||||||
|
<exports symbol='xsltTestCompMatchList'/>
|
||||||
|
<exports symbol='xsltAddTemplate'/>
|
||||||
|
<exports symbol='xsltGetTemplate'/>
|
||||||
|
<exports symbol='xsltFreeTemplateHashes'/>
|
||||||
|
<exports symbol='xsltCleanupTemplates'/>
|
||||||
|
<exports symbol='xsltMatchPattern'/>
|
||||||
|
</file>
|
||||||
|
<file name='documents'>
|
||||||
|
<exports symbol='xsltNewDocument'/>
|
||||||
|
<exports symbol='xsltLoadDocument'/>
|
||||||
|
<exports symbol='xsltFindDocument'/>
|
||||||
|
<exports symbol='xsltFreeDocuments'/>
|
||||||
|
<exports symbol='xsltLoadStyleDocument'/>
|
||||||
|
<exports symbol='xsltNewStyleDocument'/>
|
||||||
|
<exports symbol='xsltFreeStyleDocuments'/>
|
||||||
|
</file>
|
||||||
|
<file name='variables'>
|
||||||
|
<exports symbol='XSLT_REGISTER_VARIABLE_LOOKUP'/>
|
||||||
|
<exports symbol='xsltEvalGlobalVariables'/>
|
||||||
|
<exports symbol='xsltEvalUserParams'/>
|
||||||
|
<exports symbol='xsltQuoteUserParams'/>
|
||||||
|
<exports symbol='xsltEvalOneUserParam'/>
|
||||||
|
<exports symbol='xsltQuoteOneUserParam'/>
|
||||||
|
<exports symbol='xsltParseGlobalVariable'/>
|
||||||
|
<exports symbol='xsltParseGlobalParam'/>
|
||||||
|
<exports symbol='xsltParseStylesheetVariable'/>
|
||||||
|
<exports symbol='xsltParseStylesheetParam'/>
|
||||||
|
<exports symbol='xsltParseStylesheetCallerParam'/>
|
||||||
|
<exports symbol='xsltAddStackElemList'/>
|
||||||
|
<exports symbol='xsltFreeGlobalVariables'/>
|
||||||
|
<exports symbol='xsltVariableLookup'/>
|
||||||
|
<exports symbol='xsltXPathVariableLookup'/>
|
||||||
|
</file>
|
||||||
|
<file name='imports'>
|
||||||
|
<exports symbol='XSLT_GET_IMPORT_PTR'/>
|
||||||
|
<exports symbol='XSLT_GET_IMPORT_INT'/>
|
||||||
|
<exports symbol='xsltParseStylesheetImport'/>
|
||||||
|
<exports symbol='xsltParseStylesheetInclude'/>
|
||||||
|
<exports symbol='xsltNextImport'/>
|
||||||
|
<exports symbol='xsltNeedElemSpaceHandling'/>
|
||||||
|
<exports symbol='xsltFindElemSpaceHandling'/>
|
||||||
|
<exports symbol='xsltFindTemplate'/>
|
||||||
|
</file>
|
||||||
|
<file name='keys'>
|
||||||
|
<exports symbol='xsltAddKey'/>
|
||||||
|
<exports symbol='xsltGetKey'/>
|
||||||
|
<exports symbol='xsltInitCtxtKeys'/>
|
||||||
|
<exports symbol='xsltFreeKeys'/>
|
||||||
|
<exports symbol='xsltFreeDocumentKeys'/>
|
||||||
|
</file>
|
||||||
|
<file name='extra'>
|
||||||
|
<exports symbol='XSLT_LIBXSLT_NAMESPACE'/>
|
||||||
|
<exports symbol='XSLT_SAXON_NAMESPACE'/>
|
||||||
|
<exports symbol='XSLT_XT_NAMESPACE'/>
|
||||||
|
<exports symbol='XSLT_XALAN_NAMESPACE'/>
|
||||||
|
<exports symbol='XSLT_NORM_SAXON_NAMESPACE'/>
|
||||||
|
<exports symbol='xsltFunctionNodeSet'/>
|
||||||
|
<exports symbol='xsltDebug'/>
|
||||||
|
<exports symbol='xsltRegisterExtras'/>
|
||||||
|
<exports symbol='xsltRegisterAllExtras'/>
|
||||||
|
</file>
|
||||||
|
<file name='preproc'>
|
||||||
|
<exports symbol='xsltExtMarker'/>
|
||||||
|
<exports symbol='xsltDocumentComp'/>
|
||||||
|
<exports symbol='xsltStylePreCompute'/>
|
||||||
|
<exports symbol='xsltFreeStylePreComps'/>
|
||||||
</file>
|
</file>
|
||||||
<file name='transform'>
|
<file name='transform'>
|
||||||
<exports symbol='xsltSetXIncludeDefault'/>
|
<exports symbol='xsltSetXIncludeDefault'/>
|
||||||
@ -177,62 +249,6 @@
|
|||||||
<exports symbol='xsltRegisterAllElement'/>
|
<exports symbol='xsltRegisterAllElement'/>
|
||||||
<exports symbol='xslHandleDebugger'/>
|
<exports symbol='xslHandleDebugger'/>
|
||||||
</file>
|
</file>
|
||||||
<file name='documents'>
|
|
||||||
<exports symbol='xsltNewDocument'/>
|
|
||||||
<exports symbol='xsltLoadDocument'/>
|
|
||||||
<exports symbol='xsltFindDocument'/>
|
|
||||||
<exports symbol='xsltFreeDocuments'/>
|
|
||||||
<exports symbol='xsltLoadStyleDocument'/>
|
|
||||||
<exports symbol='xsltNewStyleDocument'/>
|
|
||||||
<exports symbol='xsltFreeStyleDocuments'/>
|
|
||||||
</file>
|
|
||||||
<file name='extra'>
|
|
||||||
<exports symbol='XSLT_LIBXSLT_NAMESPACE'/>
|
|
||||||
<exports symbol='XSLT_SAXON_NAMESPACE'/>
|
|
||||||
<exports symbol='XSLT_XT_NAMESPACE'/>
|
|
||||||
<exports symbol='XSLT_XALAN_NAMESPACE'/>
|
|
||||||
<exports symbol='XSLT_NORM_SAXON_NAMESPACE'/>
|
|
||||||
<exports symbol='xsltFunctionNodeSet'/>
|
|
||||||
<exports symbol='xsltDebug'/>
|
|
||||||
<exports symbol='xsltRegisterExtras'/>
|
|
||||||
<exports symbol='xsltRegisterAllExtras'/>
|
|
||||||
</file>
|
|
||||||
<file name='variables'>
|
|
||||||
<exports symbol='XSLT_REGISTER_VARIABLE_LOOKUP'/>
|
|
||||||
<exports symbol='xsltEvalGlobalVariables'/>
|
|
||||||
<exports symbol='xsltEvalUserParams'/>
|
|
||||||
<exports symbol='xsltQuoteUserParams'/>
|
|
||||||
<exports symbol='xsltEvalOneUserParam'/>
|
|
||||||
<exports symbol='xsltQuoteOneUserParam'/>
|
|
||||||
<exports symbol='xsltParseGlobalVariable'/>
|
|
||||||
<exports symbol='xsltParseGlobalParam'/>
|
|
||||||
<exports symbol='xsltParseStylesheetVariable'/>
|
|
||||||
<exports symbol='xsltParseStylesheetParam'/>
|
|
||||||
<exports symbol='xsltParseStylesheetCallerParam'/>
|
|
||||||
<exports symbol='xsltAddStackElemList'/>
|
|
||||||
<exports symbol='xsltFreeGlobalVariables'/>
|
|
||||||
<exports symbol='xsltVariableLookup'/>
|
|
||||||
<exports symbol='xsltXPathVariableLookup'/>
|
|
||||||
</file>
|
|
||||||
<file name='pattern'>
|
|
||||||
<exports symbol='xsltCompMatch'/>
|
|
||||||
<exports symbol='xsltCompMatchPtr'/>
|
|
||||||
<exports symbol='xsltCompilePattern'/>
|
|
||||||
<exports symbol='xsltFreeCompMatchList'/>
|
|
||||||
<exports symbol='xsltTestCompMatchList'/>
|
|
||||||
<exports symbol='xsltAddTemplate'/>
|
|
||||||
<exports symbol='xsltGetTemplate'/>
|
|
||||||
<exports symbol='xsltFreeTemplateHashes'/>
|
|
||||||
<exports symbol='xsltCleanupTemplates'/>
|
|
||||||
<exports symbol='xsltMatchPattern'/>
|
|
||||||
</file>
|
|
||||||
<file name='keys'>
|
|
||||||
<exports symbol='xsltAddKey'/>
|
|
||||||
<exports symbol='xsltGetKey'/>
|
|
||||||
<exports symbol='xsltInitCtxtKeys'/>
|
|
||||||
<exports symbol='xsltFreeKeys'/>
|
|
||||||
<exports symbol='xsltFreeDocumentKeys'/>
|
|
||||||
</file>
|
|
||||||
<file name='xslt'>
|
<file name='xslt'>
|
||||||
<exports symbol='XSLT_DEFAULT_VERSION'/>
|
<exports symbol='XSLT_DEFAULT_VERSION'/>
|
||||||
<exports symbol='XSLT_DEFAULT_VENDOR'/>
|
<exports symbol='XSLT_DEFAULT_VENDOR'/>
|
||||||
@ -241,22 +257,6 @@
|
|||||||
<exports symbol='LIBXSLT_PUBLIC'/>
|
<exports symbol='LIBXSLT_PUBLIC'/>
|
||||||
<exports symbol='xsltCleanupGlobals'/>
|
<exports symbol='xsltCleanupGlobals'/>
|
||||||
</file>
|
</file>
|
||||||
<file name='preproc'>
|
|
||||||
<exports symbol='xsltExtMarker'/>
|
|
||||||
<exports symbol='xsltDocumentComp'/>
|
|
||||||
<exports symbol='xsltStylePreCompute'/>
|
|
||||||
<exports symbol='xsltFreeStylePreComps'/>
|
|
||||||
</file>
|
|
||||||
<file name='xsltwin32config'>
|
|
||||||
<exports symbol='LIBXSLT_DOTTED_VERSION'/>
|
|
||||||
<exports symbol='LIBXSLT_VERSION'/>
|
|
||||||
<exports symbol='LIBXSLT_VERSION_STRING'/>
|
|
||||||
<exports symbol='WITH_XSLT_DEBUG'/>
|
|
||||||
<exports symbol='DEBUG_MEMORY'/>
|
|
||||||
<exports symbol='DEBUG_MEMORY_LOCATION'/>
|
|
||||||
<exports symbol='ATTRIBUTE_UNUSED'/>
|
|
||||||
<exports symbol='LIBXSLT_PUBLIC'/>
|
|
||||||
</file>
|
|
||||||
<file name='xsltconfig'>
|
<file name='xsltconfig'>
|
||||||
<exports symbol='LIBXSLT_DOTTED_VERSION'/>
|
<exports symbol='LIBXSLT_DOTTED_VERSION'/>
|
||||||
<exports symbol='LIBXSLT_VERSION'/>
|
<exports symbol='LIBXSLT_VERSION'/>
|
||||||
@ -326,7 +326,7 @@
|
|||||||
<macro name='LIBXSLT_DOTTED_VERSION' file='xsltwin32config'>
|
<macro name='LIBXSLT_DOTTED_VERSION' file='xsltwin32config'>
|
||||||
<info>the version string like "1.2.3"</info>
|
<info>the version string like "1.2.3"</info>
|
||||||
</macro>
|
</macro>
|
||||||
<macro name='LIBXSLT_PUBLIC' file='libxslt'>
|
<macro name='LIBXSLT_PUBLIC' file='xsltwin32config'>
|
||||||
<info>This macro is needed on Win32 when using MSVC. It enables the client code to access exported variables. It should expand to nothing when compiling this library itself, but must expand to __declspec(dllimport) when a client includes the library header and that only if it links dynamically against this library.</info>
|
<info>This macro is needed on Win32 when using MSVC. It enables the client code to access exported variables. It should expand to nothing when compiling this library itself, but must expand to __declspec(dllimport) when a client includes the library header and that only if it links dynamically against this library.</info>
|
||||||
</macro>
|
</macro>
|
||||||
<macro name='LIBXSLT_VERSION' file='xsltwin32config'>
|
<macro name='LIBXSLT_VERSION' file='xsltwin32config'>
|
||||||
@ -792,7 +792,7 @@
|
|||||||
<arg name='ctxt' type='xsltTransformContextPtr' info='the XSLT transformation context '/>
|
<arg name='ctxt' type='xsltTransformContextPtr' info='the XSLT transformation context '/>
|
||||||
<arg name='comp' type='xmlXPathCompExprPtr' info='the compiled XPath expression '/>
|
<arg name='comp' type='xmlXPathCompExprPtr' info='the compiled XPath expression '/>
|
||||||
</function>
|
</function>
|
||||||
<function name='xsltExtElementLookup' file='extensions'>
|
<function name='xsltExtElementLookup' file='transform'>
|
||||||
<info>Looks up an extension element. ctxt can be NULL to search only in module elements.</info>
|
<info>Looks up an extension element. ctxt can be NULL to search only in module elements.</info>
|
||||||
<return type='xsltTransformFunction' info='the element callback or NULL if not found '/>
|
<return type='xsltTransformFunction' info='the element callback or NULL if not found '/>
|
||||||
<arg name='ctxt' type='xsltTransformContextPtr' info='an XSLT process context '/>
|
<arg name='ctxt' type='xsltTransformContextPtr' info='an XSLT process context '/>
|
||||||
|
1354
doc/libxslt-decl.txt
1354
doc/libxslt-decl.txt
File diff suppressed because it is too large
Load Diff
@ -518,12 +518,12 @@
|
|||||||
<ref name='xsltAttrTemplateProcess'/>
|
<ref name='xsltAttrTemplateProcess'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlChar *'>
|
<type name='xmlChar *'>
|
||||||
<ref name='xsltGetNsProp'/>
|
|
||||||
<ref name='xsltEvalTemplateString'/>
|
<ref name='xsltEvalTemplateString'/>
|
||||||
<ref name='xsltEvalAttrValueTemplate'/>
|
<ref name='xsltEvalAttrValueTemplate'/>
|
||||||
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
||||||
<ref name='xsltEvalXPathString'/>
|
<ref name='xsltEvalXPathString'/>
|
||||||
<ref name='xsltAttrTemplateValueProcess'/>
|
<ref name='xsltAttrTemplateValueProcess'/>
|
||||||
|
<ref name='xsltGetNsProp'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlDocPtr'>
|
<type name='xmlDocPtr'>
|
||||||
<ref name='xsltApplyStylesheetUser'/>
|
<ref name='xsltApplyStylesheetUser'/>
|
||||||
@ -546,9 +546,9 @@
|
|||||||
<ref name='xsltFormatNumberConversion'/>
|
<ref name='xsltFormatNumberConversion'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlXPathFunction'>
|
<type name='xmlXPathFunction'>
|
||||||
<ref name='xsltXPathFunctionLookup'/>
|
|
||||||
<ref name='xsltExtFunctionLookup'/>
|
<ref name='xsltExtFunctionLookup'/>
|
||||||
<ref name='xsltExtModuleFunctionLookup'/>
|
<ref name='xsltExtModuleFunctionLookup'/>
|
||||||
|
<ref name='xsltXPathFunctionLookup'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlXPathObjectPtr'>
|
<type name='xmlXPathObjectPtr'>
|
||||||
<ref name='xsltVariableLookup'/>
|
<ref name='xsltVariableLookup'/>
|
||||||
@ -587,20 +587,20 @@
|
|||||||
<ref name='xsltLoadStylesheetPI'/>
|
<ref name='xsltLoadStylesheetPI'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltTemplatePtr'>
|
<type name='xsltTemplatePtr'>
|
||||||
<ref name='xsltGetTemplate'/>
|
|
||||||
<ref name='xsltFindTemplate'/>
|
<ref name='xsltFindTemplate'/>
|
||||||
|
<ref name='xsltGetTemplate'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltTopLevelFunction'>
|
<type name='xsltTopLevelFunction'>
|
||||||
<ref name='xsltExtModuleTopLevelLookup'/>
|
<ref name='xsltExtModuleTopLevelLookup'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltTransformContextPtr'>
|
<type name='xsltTransformContextPtr'>
|
||||||
<ref name='xsltNewTransformContext'/>
|
|
||||||
<ref name='xsltXPathGetTransformContext'/>
|
<ref name='xsltXPathGetTransformContext'/>
|
||||||
|
<ref name='xsltNewTransformContext'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltTransformFunction'>
|
<type name='xsltTransformFunction'>
|
||||||
<ref name='xsltExtElementLookup'/>
|
|
||||||
<ref name='xsltExtElementLookup'/>
|
<ref name='xsltExtElementLookup'/>
|
||||||
<ref name='xsltExtModuleElementLookup'/>
|
<ref name='xsltExtModuleElementLookup'/>
|
||||||
|
<ref name='xsltExtElementLookup'/>
|
||||||
</type>
|
</type>
|
||||||
</constructors>
|
</constructors>
|
||||||
<functions>
|
<functions>
|
||||||
@ -619,35 +619,8 @@
|
|||||||
<ref name='xsltQuoteUserParams'/>
|
<ref name='xsltQuoteUserParams'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='const xmlChar *'>
|
<type name='const xmlChar *'>
|
||||||
<ref name='xsltAddKey'/>
|
<ref name='xsltLoadDocument'/>
|
||||||
<ref name='xsltAddKey'/>
|
<ref name='xsltLoadStyleDocument'/>
|
||||||
<ref name='xsltAddKey'/>
|
|
||||||
<ref name='xsltAddKey'/>
|
|
||||||
<ref name='xsltGetKey'/>
|
|
||||||
<ref name='xsltGetKey'/>
|
|
||||||
<ref name='xsltGetKey'/>
|
|
||||||
<ref name='xsltCompilePattern'/>
|
|
||||||
<ref name='xsltAddTemplate'/>
|
|
||||||
<ref name='xsltAddTemplate'/>
|
|
||||||
<ref name='xsltMatchPattern'/>
|
|
||||||
<ref name='xsltExtElementLookup'/>
|
|
||||||
<ref name='xsltExtElementLookup'/>
|
|
||||||
<ref name='xsltGetNsProp'/>
|
|
||||||
<ref name='xsltGetNsProp'/>
|
|
||||||
<ref name='xsltEvalAttrValueTemplate'/>
|
|
||||||
<ref name='xsltEvalAttrValueTemplate'/>
|
|
||||||
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
|
||||||
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
|
||||||
<ref name='xsltEvalOneUserParam'/>
|
|
||||||
<ref name='xsltEvalOneUserParam'/>
|
|
||||||
<ref name='xsltQuoteOneUserParam'/>
|
|
||||||
<ref name='xsltQuoteOneUserParam'/>
|
|
||||||
<ref name='xsltVariableLookup'/>
|
|
||||||
<ref name='xsltVariableLookup'/>
|
|
||||||
<ref name='xsltXPathVariableLookup'/>
|
|
||||||
<ref name='xsltXPathVariableLookup'/>
|
|
||||||
<ref name='xsltXPathFunctionLookup'/>
|
|
||||||
<ref name='xsltXPathFunctionLookup'/>
|
|
||||||
<ref name='xsltStyleExtInitFunction'/>
|
<ref name='xsltStyleExtInitFunction'/>
|
||||||
<ref name='xsltStyleExtShutdownFunction'/>
|
<ref name='xsltStyleExtShutdownFunction'/>
|
||||||
<ref name='xsltExtInitFunction'/>
|
<ref name='xsltExtInitFunction'/>
|
||||||
@ -688,12 +661,39 @@
|
|||||||
<ref name='xsltRegisterExtPrefix'/>
|
<ref name='xsltRegisterExtPrefix'/>
|
||||||
<ref name='xsltRegisterExtPrefix'/>
|
<ref name='xsltRegisterExtPrefix'/>
|
||||||
<ref name='xsltCheckExtPrefix'/>
|
<ref name='xsltCheckExtPrefix'/>
|
||||||
|
<ref name='xsltXPathFunctionLookup'/>
|
||||||
|
<ref name='xsltXPathFunctionLookup'/>
|
||||||
<ref name='xsltFindTemplate'/>
|
<ref name='xsltFindTemplate'/>
|
||||||
<ref name='xsltFindTemplate'/>
|
<ref name='xsltFindTemplate'/>
|
||||||
|
<ref name='xsltAddKey'/>
|
||||||
|
<ref name='xsltAddKey'/>
|
||||||
|
<ref name='xsltAddKey'/>
|
||||||
|
<ref name='xsltAddKey'/>
|
||||||
|
<ref name='xsltGetKey'/>
|
||||||
|
<ref name='xsltGetKey'/>
|
||||||
|
<ref name='xsltGetKey'/>
|
||||||
<ref name='xsltGetSpecialNamespace'/>
|
<ref name='xsltGetSpecialNamespace'/>
|
||||||
<ref name='xsltGetSpecialNamespace'/>
|
<ref name='xsltGetSpecialNamespace'/>
|
||||||
<ref name='xsltLoadDocument'/>
|
<ref name='xsltCompilePattern'/>
|
||||||
<ref name='xsltLoadStyleDocument'/>
|
<ref name='xsltAddTemplate'/>
|
||||||
|
<ref name='xsltAddTemplate'/>
|
||||||
|
<ref name='xsltMatchPattern'/>
|
||||||
|
<ref name='xsltEvalAttrValueTemplate'/>
|
||||||
|
<ref name='xsltEvalAttrValueTemplate'/>
|
||||||
|
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
||||||
|
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
||||||
|
<ref name='xsltExtElementLookup'/>
|
||||||
|
<ref name='xsltExtElementLookup'/>
|
||||||
|
<ref name='xsltEvalOneUserParam'/>
|
||||||
|
<ref name='xsltEvalOneUserParam'/>
|
||||||
|
<ref name='xsltQuoteOneUserParam'/>
|
||||||
|
<ref name='xsltQuoteOneUserParam'/>
|
||||||
|
<ref name='xsltVariableLookup'/>
|
||||||
|
<ref name='xsltVariableLookup'/>
|
||||||
|
<ref name='xsltXPathVariableLookup'/>
|
||||||
|
<ref name='xsltXPathVariableLookup'/>
|
||||||
|
<ref name='xsltGetNsProp'/>
|
||||||
|
<ref name='xsltGetNsProp'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='const xmlChar*'>
|
<type name='const xmlChar*'>
|
||||||
<ref name='xsltAttrTemplateValueProcess'/>
|
<ref name='xsltAttrTemplateValueProcess'/>
|
||||||
@ -709,12 +709,12 @@
|
|||||||
<ref name='xsltCalibrateAdjust'/>
|
<ref name='xsltCalibrateAdjust'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='void *'>
|
<type name='void *'>
|
||||||
|
<ref name='xsltStyleExtShutdownFunction'/>
|
||||||
|
<ref name='xsltExtShutdownFunction'/>
|
||||||
|
<ref name='xsltXPathVariableLookup'/>
|
||||||
<ref name='xsltSetGenericErrorFunc'/>
|
<ref name='xsltSetGenericErrorFunc'/>
|
||||||
<ref name='xsltSetGenericDebugFunc'/>
|
<ref name='xsltSetGenericDebugFunc'/>
|
||||||
<ref name='xsltSetDebuggerCallbacks'/>
|
<ref name='xsltSetDebuggerCallbacks'/>
|
||||||
<ref name='xsltXPathVariableLookup'/>
|
|
||||||
<ref name='xsltStyleExtShutdownFunction'/>
|
|
||||||
<ref name='xsltExtShutdownFunction'/>
|
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlAttrPtr'>
|
<type name='xmlAttrPtr'>
|
||||||
<ref name='xsltAttrListTemplateProcess'/>
|
<ref name='xsltAttrListTemplateProcess'/>
|
||||||
@ -727,10 +727,13 @@
|
|||||||
<ref name='xsltFormatNumberConversion'/>
|
<ref name='xsltFormatNumberConversion'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlChar **'>
|
<type name='xmlChar **'>
|
||||||
<ref name='xsltGetQNameURI'/>
|
|
||||||
<ref name='xsltFormatNumberConversion'/>
|
<ref name='xsltFormatNumberConversion'/>
|
||||||
|
<ref name='xsltGetQNameURI'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlDocPtr'>
|
<type name='xmlDocPtr'>
|
||||||
|
<ref name='xsltNewDocument'/>
|
||||||
|
<ref name='xsltFindDocument'/>
|
||||||
|
<ref name='xsltNewStyleDocument'/>
|
||||||
<ref name='xsltCompilePattern'/>
|
<ref name='xsltCompilePattern'/>
|
||||||
<ref name='xsltMatchPattern'/>
|
<ref name='xsltMatchPattern'/>
|
||||||
<ref name='xsltNewTransformContext'/>
|
<ref name='xsltNewTransformContext'/>
|
||||||
@ -738,28 +741,53 @@
|
|||||||
<ref name='xsltApplyStylesheet'/>
|
<ref name='xsltApplyStylesheet'/>
|
||||||
<ref name='xsltProfileStylesheet'/>
|
<ref name='xsltProfileStylesheet'/>
|
||||||
<ref name='xsltRunStylesheet'/>
|
<ref name='xsltRunStylesheet'/>
|
||||||
|
<ref name='xsltParseStylesheetProcess'/>
|
||||||
|
<ref name='xsltParseStylesheetDoc'/>
|
||||||
|
<ref name='xsltLoadStylesheetPI'/>
|
||||||
<ref name='xsltSaveResultTo'/>
|
<ref name='xsltSaveResultTo'/>
|
||||||
<ref name='xsltSaveResultToFilename'/>
|
<ref name='xsltSaveResultToFilename'/>
|
||||||
<ref name='xsltSaveResultToFile'/>
|
<ref name='xsltSaveResultToFile'/>
|
||||||
<ref name='xsltSaveResultToFd'/>
|
<ref name='xsltSaveResultToFd'/>
|
||||||
<ref name='xsltNewDocument'/>
|
|
||||||
<ref name='xsltFindDocument'/>
|
|
||||||
<ref name='xsltNewStyleDocument'/>
|
|
||||||
<ref name='xsltParseStylesheetProcess'/>
|
|
||||||
<ref name='xsltParseStylesheetDoc'/>
|
|
||||||
<ref name='xsltLoadStylesheetPI'/>
|
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlGenericErrorFunc'>
|
<type name='xmlGenericErrorFunc'>
|
||||||
<ref name='xsltSetGenericErrorFunc'/>
|
<ref name='xsltSetGenericErrorFunc'/>
|
||||||
<ref name='xsltSetGenericDebugFunc'/>
|
<ref name='xsltSetGenericDebugFunc'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlNodePtr'>
|
<type name='xmlNodePtr'>
|
||||||
|
<ref name='xsltParseStylesheetAttributeSet'/>
|
||||||
|
<ref name='xsltApplyAttributeSet'/>
|
||||||
|
<ref name='xsltApplyAttributeSet'/>
|
||||||
|
<ref name='xsltDebug'/>
|
||||||
|
<ref name='xsltDebug'/>
|
||||||
|
<ref name='xsltNewElemPreComp'/>
|
||||||
|
<ref name='xsltInitElemPreComp'/>
|
||||||
|
<ref name='xsltTopLevelFunction'/>
|
||||||
|
<ref name='xsltPreComputeExtModuleElement'/>
|
||||||
|
<ref name='xsltParseStylesheetImport'/>
|
||||||
|
<ref name='xsltParseStylesheetInclude'/>
|
||||||
|
<ref name='xsltFindElemSpaceHandling'/>
|
||||||
<ref name='xsltAddKey'/>
|
<ref name='xsltAddKey'/>
|
||||||
|
<ref name='xsltNamespaceAlias'/>
|
||||||
|
<ref name='xsltGetNamespace'/>
|
||||||
|
<ref name='xsltGetNamespace'/>
|
||||||
|
<ref name='xsltGetSpecialNamespace'/>
|
||||||
|
<ref name='xsltGetSpecialNamespace'/>
|
||||||
|
<ref name='xsltCopyNamespace'/>
|
||||||
|
<ref name='xsltCopyNamespaceList'/>
|
||||||
<ref name='xsltCompilePattern'/>
|
<ref name='xsltCompilePattern'/>
|
||||||
<ref name='xsltTestCompMatchList'/>
|
<ref name='xsltTestCompMatchList'/>
|
||||||
<ref name='xsltGetTemplate'/>
|
<ref name='xsltGetTemplate'/>
|
||||||
<ref name='xsltMatchPattern'/>
|
<ref name='xsltMatchPattern'/>
|
||||||
<ref name='xsltMatchPattern'/>
|
<ref name='xsltMatchPattern'/>
|
||||||
|
<ref name='xsltDocumentComp'/>
|
||||||
|
<ref name='xsltStylePreCompute'/>
|
||||||
|
<ref name='xsltEvalTemplateString'/>
|
||||||
|
<ref name='xsltEvalTemplateString'/>
|
||||||
|
<ref name='xsltEvalAttrValueTemplate'/>
|
||||||
|
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
||||||
|
<ref name='xsltTemplateProcess'/>
|
||||||
|
<ref name='xsltAttrListTemplateProcess'/>
|
||||||
|
<ref name='xsltAttrTemplateProcess'/>
|
||||||
<ref name='xsltApplyStripSpaces'/>
|
<ref name='xsltApplyStripSpaces'/>
|
||||||
<ref name='xsltApplyOneTemplate'/>
|
<ref name='xsltApplyOneTemplate'/>
|
||||||
<ref name='xsltApplyOneTemplate'/>
|
<ref name='xsltApplyOneTemplate'/>
|
||||||
@ -799,6 +827,16 @@
|
|||||||
<ref name='xsltForEach'/>
|
<ref name='xsltForEach'/>
|
||||||
<ref name='xslHandleDebugger'/>
|
<ref name='xslHandleDebugger'/>
|
||||||
<ref name='xslHandleDebugger'/>
|
<ref name='xslHandleDebugger'/>
|
||||||
|
<ref name='xsltParseGlobalVariable'/>
|
||||||
|
<ref name='xsltParseGlobalParam'/>
|
||||||
|
<ref name='xsltParseStylesheetVariable'/>
|
||||||
|
<ref name='xsltParseStylesheetParam'/>
|
||||||
|
<ref name='xsltParseStylesheetCallerParam'/>
|
||||||
|
<ref name='xsltTransformFunction'/>
|
||||||
|
<ref name='xsltTransformFunction'/>
|
||||||
|
<ref name='xsltParseStylesheetOutput'/>
|
||||||
|
<ref name='xsltNumberFormat'/>
|
||||||
|
<ref name='xsltParseTemplateContent'/>
|
||||||
<ref name='xsltGetNsProp'/>
|
<ref name='xsltGetNsProp'/>
|
||||||
<ref name='xsltPrintErrorContext'/>
|
<ref name='xsltPrintErrorContext'/>
|
||||||
<ref name='xsltMessage'/>
|
<ref name='xsltMessage'/>
|
||||||
@ -808,44 +846,6 @@
|
|||||||
<ref name='xsltHandleDebuggerCallback'/>
|
<ref name='xsltHandleDebuggerCallback'/>
|
||||||
<ref name='xsltAddCallCallback'/>
|
<ref name='xsltAddCallCallback'/>
|
||||||
<ref name='xslAddCall'/>
|
<ref name='xslAddCall'/>
|
||||||
<ref name='xsltEvalTemplateString'/>
|
|
||||||
<ref name='xsltEvalTemplateString'/>
|
|
||||||
<ref name='xsltEvalAttrValueTemplate'/>
|
|
||||||
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
|
||||||
<ref name='xsltTemplateProcess'/>
|
|
||||||
<ref name='xsltAttrListTemplateProcess'/>
|
|
||||||
<ref name='xsltAttrTemplateProcess'/>
|
|
||||||
<ref name='xsltParseGlobalVariable'/>
|
|
||||||
<ref name='xsltParseGlobalParam'/>
|
|
||||||
<ref name='xsltParseStylesheetVariable'/>
|
|
||||||
<ref name='xsltParseStylesheetParam'/>
|
|
||||||
<ref name='xsltParseStylesheetCallerParam'/>
|
|
||||||
<ref name='xsltNewElemPreComp'/>
|
|
||||||
<ref name='xsltInitElemPreComp'/>
|
|
||||||
<ref name='xsltTopLevelFunction'/>
|
|
||||||
<ref name='xsltPreComputeExtModuleElement'/>
|
|
||||||
<ref name='xsltParseStylesheetImport'/>
|
|
||||||
<ref name='xsltParseStylesheetInclude'/>
|
|
||||||
<ref name='xsltFindElemSpaceHandling'/>
|
|
||||||
<ref name='xsltParseStylesheetAttributeSet'/>
|
|
||||||
<ref name='xsltApplyAttributeSet'/>
|
|
||||||
<ref name='xsltApplyAttributeSet'/>
|
|
||||||
<ref name='xsltNamespaceAlias'/>
|
|
||||||
<ref name='xsltGetNamespace'/>
|
|
||||||
<ref name='xsltGetNamespace'/>
|
|
||||||
<ref name='xsltGetSpecialNamespace'/>
|
|
||||||
<ref name='xsltGetSpecialNamespace'/>
|
|
||||||
<ref name='xsltCopyNamespace'/>
|
|
||||||
<ref name='xsltCopyNamespaceList'/>
|
|
||||||
<ref name='xsltDebug'/>
|
|
||||||
<ref name='xsltDebug'/>
|
|
||||||
<ref name='xsltDocumentComp'/>
|
|
||||||
<ref name='xsltStylePreCompute'/>
|
|
||||||
<ref name='xsltTransformFunction'/>
|
|
||||||
<ref name='xsltTransformFunction'/>
|
|
||||||
<ref name='xsltParseStylesheetOutput'/>
|
|
||||||
<ref name='xsltNumberFormat'/>
|
|
||||||
<ref name='xsltParseTemplateContent'/>
|
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlNodePtr *'>
|
<type name='xmlNodePtr *'>
|
||||||
<ref name='xsltDoSortFunction'/>
|
<ref name='xsltDoSortFunction'/>
|
||||||
@ -881,6 +881,8 @@
|
|||||||
<ref name='xsltRegisterExtFunction'/>
|
<ref name='xsltRegisterExtFunction'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xmlXPathParserContextPtr'>
|
<type name='xmlXPathParserContextPtr'>
|
||||||
|
<ref name='xsltFunctionNodeSet'/>
|
||||||
|
<ref name='xsltXPathGetTransformContext'/>
|
||||||
<ref name='xsltDocumentFunction'/>
|
<ref name='xsltDocumentFunction'/>
|
||||||
<ref name='xsltKeyFunction'/>
|
<ref name='xsltKeyFunction'/>
|
||||||
<ref name='xsltUnparsedEntityURIFunction'/>
|
<ref name='xsltUnparsedEntityURIFunction'/>
|
||||||
@ -889,8 +891,6 @@
|
|||||||
<ref name='xsltSystemPropertyFunction'/>
|
<ref name='xsltSystemPropertyFunction'/>
|
||||||
<ref name='xsltElementAvailableFunction'/>
|
<ref name='xsltElementAvailableFunction'/>
|
||||||
<ref name='xsltFunctionAvailableFunction'/>
|
<ref name='xsltFunctionAvailableFunction'/>
|
||||||
<ref name='xsltXPathGetTransformContext'/>
|
|
||||||
<ref name='xsltFunctionNodeSet'/>
|
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltCompMatchPtr'>
|
<type name='xsltCompMatchPtr'>
|
||||||
<ref name='xsltFreeCompMatchList'/>
|
<ref name='xsltFreeCompMatchList'/>
|
||||||
@ -937,6 +937,7 @@
|
|||||||
<ref name='xsltRegisterExtModuleFull'/>
|
<ref name='xsltRegisterExtModuleFull'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltStylePreCompPtr'>
|
<type name='xsltStylePreCompPtr'>
|
||||||
|
<ref name='xsltDebug'/>
|
||||||
<ref name='xsltDocumentElem'/>
|
<ref name='xsltDocumentElem'/>
|
||||||
<ref name='xsltSort'/>
|
<ref name='xsltSort'/>
|
||||||
<ref name='xsltCopy'/>
|
<ref name='xsltCopy'/>
|
||||||
@ -954,29 +955,13 @@
|
|||||||
<ref name='xsltChoose'/>
|
<ref name='xsltChoose'/>
|
||||||
<ref name='xsltIf'/>
|
<ref name='xsltIf'/>
|
||||||
<ref name='xsltForEach'/>
|
<ref name='xsltForEach'/>
|
||||||
<ref name='xsltDebug'/>
|
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltStylesheetPtr'>
|
<type name='xsltStylesheetPtr'>
|
||||||
<ref name='xsltAddKey'/>
|
<ref name='xsltParseStylesheetAttributeSet'/>
|
||||||
<ref name='xsltFreeKeys'/>
|
<ref name='xsltFreeAttributeSetsHashes'/>
|
||||||
<ref name='xsltCompilePattern'/>
|
<ref name='xsltLoadStyleDocument'/>
|
||||||
<ref name='xsltAddTemplate'/>
|
<ref name='xsltNewStyleDocument'/>
|
||||||
<ref name='xsltGetTemplate'/>
|
<ref name='xsltFreeStyleDocuments'/>
|
||||||
<ref name='xsltFreeTemplateHashes'/>
|
|
||||||
<ref name='xsltCleanupTemplates'/>
|
|
||||||
<ref name='xsltNewTransformContext'/>
|
|
||||||
<ref name='xsltApplyStylesheetUser'/>
|
|
||||||
<ref name='xsltApplyStylesheet'/>
|
|
||||||
<ref name='xsltProfileStylesheet'/>
|
|
||||||
<ref name='xsltRunStylesheet'/>
|
|
||||||
<ref name='xsltPrintErrorContext'/>
|
|
||||||
<ref name='xsltSaveResultTo'/>
|
|
||||||
<ref name='xsltSaveResultToFilename'/>
|
|
||||||
<ref name='xsltSaveResultToFile'/>
|
|
||||||
<ref name='xsltSaveResultToFd'/>
|
|
||||||
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
|
||||||
<ref name='xsltParseGlobalVariable'/>
|
|
||||||
<ref name='xsltParseGlobalParam'/>
|
|
||||||
<ref name='xsltStyleExtInitFunction'/>
|
<ref name='xsltStyleExtInitFunction'/>
|
||||||
<ref name='xsltStyleExtShutdownFunction'/>
|
<ref name='xsltStyleExtShutdownFunction'/>
|
||||||
<ref name='xsltStyleGetExtData'/>
|
<ref name='xsltStyleGetExtData'/>
|
||||||
@ -991,22 +976,37 @@
|
|||||||
<ref name='xsltParseStylesheetImport'/>
|
<ref name='xsltParseStylesheetImport'/>
|
||||||
<ref name='xsltParseStylesheetInclude'/>
|
<ref name='xsltParseStylesheetInclude'/>
|
||||||
<ref name='xsltNextImport'/>
|
<ref name='xsltNextImport'/>
|
||||||
<ref name='xsltParseStylesheetAttributeSet'/>
|
<ref name='xsltAddKey'/>
|
||||||
<ref name='xsltFreeAttributeSetsHashes'/>
|
<ref name='xsltFreeKeys'/>
|
||||||
<ref name='xsltNamespaceAlias'/>
|
<ref name='xsltNamespaceAlias'/>
|
||||||
<ref name='xsltFreeNamespaceAliasHashes'/>
|
<ref name='xsltFreeNamespaceAliasHashes'/>
|
||||||
<ref name='xsltLoadStyleDocument'/>
|
<ref name='xsltCompilePattern'/>
|
||||||
<ref name='xsltNewStyleDocument'/>
|
<ref name='xsltAddTemplate'/>
|
||||||
<ref name='xsltFreeStyleDocuments'/>
|
<ref name='xsltGetTemplate'/>
|
||||||
|
<ref name='xsltFreeTemplateHashes'/>
|
||||||
|
<ref name='xsltCleanupTemplates'/>
|
||||||
<ref name='xsltDocumentComp'/>
|
<ref name='xsltDocumentComp'/>
|
||||||
<ref name='xsltStylePreCompute'/>
|
<ref name='xsltStylePreCompute'/>
|
||||||
<ref name='xsltFreeStylePreComps'/>
|
<ref name='xsltFreeStylePreComps'/>
|
||||||
|
<ref name='xsltEvalStaticAttrValueTemplate'/>
|
||||||
|
<ref name='xsltNewTransformContext'/>
|
||||||
|
<ref name='xsltApplyStylesheetUser'/>
|
||||||
|
<ref name='xsltApplyStylesheet'/>
|
||||||
|
<ref name='xsltProfileStylesheet'/>
|
||||||
|
<ref name='xsltRunStylesheet'/>
|
||||||
|
<ref name='xsltParseGlobalVariable'/>
|
||||||
|
<ref name='xsltParseGlobalParam'/>
|
||||||
<ref name='xsltFreeStylesheet'/>
|
<ref name='xsltFreeStylesheet'/>
|
||||||
<ref name='xsltDecimalFormatGetByName'/>
|
<ref name='xsltDecimalFormatGetByName'/>
|
||||||
<ref name='xsltParseStylesheetProcess'/>
|
<ref name='xsltParseStylesheetProcess'/>
|
||||||
<ref name='xsltParseStylesheetOutput'/>
|
<ref name='xsltParseStylesheetOutput'/>
|
||||||
<ref name='xsltParseTemplateContent'/>
|
<ref name='xsltParseTemplateContent'/>
|
||||||
<ref name='xsltAllocateExtra'/>
|
<ref name='xsltAllocateExtra'/>
|
||||||
|
<ref name='xsltPrintErrorContext'/>
|
||||||
|
<ref name='xsltSaveResultTo'/>
|
||||||
|
<ref name='xsltSaveResultToFilename'/>
|
||||||
|
<ref name='xsltSaveResultToFile'/>
|
||||||
|
<ref name='xsltSaveResultToFd'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltTemplatePtr'>
|
<type name='xsltTemplatePtr'>
|
||||||
<ref name='xsltAddTemplate'/>
|
<ref name='xsltAddTemplate'/>
|
||||||
@ -1020,12 +1020,44 @@
|
|||||||
<ref name='xsltRegisterExtModuleTopLevel'/>
|
<ref name='xsltRegisterExtModuleTopLevel'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltTransformContextPtr'>
|
<type name='xsltTransformContextPtr'>
|
||||||
|
<ref name='xsltApplyAttributeSet'/>
|
||||||
|
<ref name='xsltDebug'/>
|
||||||
|
<ref name='xsltRegisterExtras'/>
|
||||||
|
<ref name='xsltNewDocument'/>
|
||||||
|
<ref name='xsltLoadDocument'/>
|
||||||
|
<ref name='xsltFindDocument'/>
|
||||||
|
<ref name='xsltFreeDocuments'/>
|
||||||
|
<ref name='xsltExtInitFunction'/>
|
||||||
|
<ref name='xsltExtShutdownFunction'/>
|
||||||
|
<ref name='xsltGetExtData'/>
|
||||||
|
<ref name='xsltShutdownCtxtExts'/>
|
||||||
|
<ref name='xsltExtFunctionLookup'/>
|
||||||
|
<ref name='xsltExtElementLookup'/>
|
||||||
|
<ref name='xsltRegisterExtFunction'/>
|
||||||
|
<ref name='xsltRegisterExtElement'/>
|
||||||
|
<ref name='xsltInitCtxtExts'/>
|
||||||
|
<ref name='xsltFreeCtxtExts'/>
|
||||||
|
<ref name='xsltNeedElemSpaceHandling'/>
|
||||||
|
<ref name='xsltFindElemSpaceHandling'/>
|
||||||
|
<ref name='xsltFindTemplate'/>
|
||||||
<ref name='xsltGetKey'/>
|
<ref name='xsltGetKey'/>
|
||||||
<ref name='xsltInitCtxtKeys'/>
|
<ref name='xsltInitCtxtKeys'/>
|
||||||
|
<ref name='xsltGetNamespace'/>
|
||||||
|
<ref name='xsltGetSpecialNamespace'/>
|
||||||
|
<ref name='xsltCopyNamespace'/>
|
||||||
|
<ref name='xsltCopyNamespaceList'/>
|
||||||
<ref name='xsltCompilePattern'/>
|
<ref name='xsltCompilePattern'/>
|
||||||
<ref name='xsltTestCompMatchList'/>
|
<ref name='xsltTestCompMatchList'/>
|
||||||
<ref name='xsltGetTemplate'/>
|
<ref name='xsltGetTemplate'/>
|
||||||
<ref name='xsltMatchPattern'/>
|
<ref name='xsltMatchPattern'/>
|
||||||
|
<ref name='xsltEvalXPathPredicate'/>
|
||||||
|
<ref name='xsltEvalTemplateString'/>
|
||||||
|
<ref name='xsltEvalAttrValueTemplate'/>
|
||||||
|
<ref name='xsltEvalXPathString'/>
|
||||||
|
<ref name='xsltTemplateProcess'/>
|
||||||
|
<ref name='xsltAttrListTemplateProcess'/>
|
||||||
|
<ref name='xsltAttrTemplateProcess'/>
|
||||||
|
<ref name='xsltAttrTemplateValueProcess'/>
|
||||||
<ref name='xsltFreeTransformContext'/>
|
<ref name='xsltFreeTransformContext'/>
|
||||||
<ref name='xsltApplyStylesheetUser'/>
|
<ref name='xsltApplyStylesheetUser'/>
|
||||||
<ref name='xsltApplyStripSpaces'/>
|
<ref name='xsltApplyStripSpaces'/>
|
||||||
@ -1050,19 +1082,6 @@
|
|||||||
<ref name='xsltForEach'/>
|
<ref name='xsltForEach'/>
|
||||||
<ref name='xsltRegisterAllElement'/>
|
<ref name='xsltRegisterAllElement'/>
|
||||||
<ref name='xslHandleDebugger'/>
|
<ref name='xslHandleDebugger'/>
|
||||||
<ref name='xsltPrintErrorContext'/>
|
|
||||||
<ref name='xsltMessage'/>
|
|
||||||
<ref name='xsltDoSortFunction'/>
|
|
||||||
<ref name='xsltSaveProfiling'/>
|
|
||||||
<ref name='xsltHandleDebuggerCallback'/>
|
|
||||||
<ref name='xsltEvalXPathPredicate'/>
|
|
||||||
<ref name='xsltEvalTemplateString'/>
|
|
||||||
<ref name='xsltEvalAttrValueTemplate'/>
|
|
||||||
<ref name='xsltEvalXPathString'/>
|
|
||||||
<ref name='xsltTemplateProcess'/>
|
|
||||||
<ref name='xsltAttrListTemplateProcess'/>
|
|
||||||
<ref name='xsltAttrTemplateProcess'/>
|
|
||||||
<ref name='xsltAttrTemplateValueProcess'/>
|
|
||||||
<ref name='xsltEvalGlobalVariables'/>
|
<ref name='xsltEvalGlobalVariables'/>
|
||||||
<ref name='xsltEvalUserParams'/>
|
<ref name='xsltEvalUserParams'/>
|
||||||
<ref name='xsltQuoteUserParams'/>
|
<ref name='xsltQuoteUserParams'/>
|
||||||
@ -1074,33 +1093,14 @@
|
|||||||
<ref name='xsltAddStackElemList'/>
|
<ref name='xsltAddStackElemList'/>
|
||||||
<ref name='xsltFreeGlobalVariables'/>
|
<ref name='xsltFreeGlobalVariables'/>
|
||||||
<ref name='xsltVariableLookup'/>
|
<ref name='xsltVariableLookup'/>
|
||||||
<ref name='xsltExtInitFunction'/>
|
|
||||||
<ref name='xsltExtShutdownFunction'/>
|
|
||||||
<ref name='xsltGetExtData'/>
|
|
||||||
<ref name='xsltShutdownCtxtExts'/>
|
|
||||||
<ref name='xsltExtFunctionLookup'/>
|
|
||||||
<ref name='xsltExtElementLookup'/>
|
|
||||||
<ref name='xsltRegisterExtFunction'/>
|
|
||||||
<ref name='xsltRegisterExtElement'/>
|
|
||||||
<ref name='xsltInitCtxtExts'/>
|
|
||||||
<ref name='xsltFreeCtxtExts'/>
|
|
||||||
<ref name='xsltNeedElemSpaceHandling'/>
|
|
||||||
<ref name='xsltFindElemSpaceHandling'/>
|
|
||||||
<ref name='xsltFindTemplate'/>
|
|
||||||
<ref name='xsltApplyAttributeSet'/>
|
|
||||||
<ref name='xsltGetNamespace'/>
|
|
||||||
<ref name='xsltGetSpecialNamespace'/>
|
|
||||||
<ref name='xsltCopyNamespace'/>
|
|
||||||
<ref name='xsltCopyNamespaceList'/>
|
|
||||||
<ref name='xsltNewDocument'/>
|
|
||||||
<ref name='xsltLoadDocument'/>
|
|
||||||
<ref name='xsltFindDocument'/>
|
|
||||||
<ref name='xsltFreeDocuments'/>
|
|
||||||
<ref name='xsltDebug'/>
|
|
||||||
<ref name='xsltRegisterExtras'/>
|
|
||||||
<ref name='xsltTransformFunction'/>
|
<ref name='xsltTransformFunction'/>
|
||||||
<ref name='xsltNumberFormat'/>
|
<ref name='xsltNumberFormat'/>
|
||||||
<ref name='xsltAllocateExtraCtxt'/>
|
<ref name='xsltAllocateExtraCtxt'/>
|
||||||
|
<ref name='xsltPrintErrorContext'/>
|
||||||
|
<ref name='xsltMessage'/>
|
||||||
|
<ref name='xsltDoSortFunction'/>
|
||||||
|
<ref name='xsltSaveProfiling'/>
|
||||||
|
<ref name='xsltHandleDebuggerCallback'/>
|
||||||
</type>
|
</type>
|
||||||
<type name='xsltTransformFunction'>
|
<type name='xsltTransformFunction'>
|
||||||
<ref name='xsltNewElemPreComp'/>
|
<ref name='xsltNewElemPreComp'/>
|
||||||
|
@ -4,13 +4,13 @@ AUTOMAKE_OPTIONS = 1.4 foreign
|
|||||||
SUBDIRS= . tests
|
SUBDIRS= . tests
|
||||||
|
|
||||||
INCLUDES = \
|
INCLUDES = \
|
||||||
-I/usr/include/python$(PYTHON_VERSION) \
|
|
||||||
-I$(PYTHON_INCLUDES) \
|
-I$(PYTHON_INCLUDES) \
|
||||||
$(LIBXML_CFLAGS) \
|
$(LIBXML_CFLAGS) \
|
||||||
-I$(top_srcdir)
|
-I$(top_srcdir)
|
||||||
|
|
||||||
DOCS_DIR = $(prefix)/share/doc/libxslt-python-$(LIBXML_VERSION)
|
DOCS_DIR = $(prefix)/share/doc/libxslt-python-$(LIBXML_VERSION)
|
||||||
DOCS = TODO libxsltclass.txt
|
# libxsltclass.txt is generated
|
||||||
|
DOCS = TODO
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
libxslt.c \
|
libxslt.c \
|
||||||
@ -22,37 +22,20 @@ EXTRA_DIST = \
|
|||||||
libxslt-python-api.xml \
|
libxslt-python-api.xml \
|
||||||
$(DOCS)
|
$(DOCS)
|
||||||
|
|
||||||
|
libxsltmod_la_LDFLAGS = -module -avoid-version
|
||||||
|
|
||||||
if WITH_PYTHON
|
if WITH_PYTHON
|
||||||
mylibs = \
|
mylibs = \
|
||||||
$(top_builddir)/libxslt/libxslt.la \
|
$(top_builddir)/libxslt/libxslt.la \
|
||||||
$(top_builddir)/libexslt/libexslt.la
|
$(top_builddir)/libexslt/libexslt.la
|
||||||
|
|
||||||
LDADD = -lxslt -lexslt
|
all: libxslt.py
|
||||||
CFLAGS = -Wall -g
|
|
||||||
|
|
||||||
pythondir = $(prefix)/lib/python${PYTHON_VERSION}/site-packages
|
pythondir = $(prefix)/lib/python${PYTHON_VERSION}/site-packages
|
||||||
python_PROGRAMS = libxsltmod.so
|
python_LTLIBRARIES = libxsltmod.la
|
||||||
|
|
||||||
libxsltmod_so_SOURCES =
|
|
||||||
libxsltmod_so_LDFLAGS = $(mylibs) $(LIBS) -shared -Wl,-soname,libxsltmod.so
|
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libxsltmodule.la
|
|
||||||
libxsltmodule_la_SOURCES = libxslt.c types.c libxslt-py.c
|
|
||||||
|
|
||||||
GENERATE = generator.py
|
|
||||||
API_DESC = $(top_srcdir)/doc/libxslt-api.xml $(srcdir)/libxslt-python-api.xml
|
|
||||||
GENERATED= $(srcdir)/libxsltclass.py \
|
|
||||||
$(srcdir)/libxslt-export.c \
|
|
||||||
$(srcdir)/libxslt-py.c \
|
|
||||||
$(srcdir)/libxslt-py.h
|
|
||||||
|
|
||||||
all: $(GENERATED) libxsltmod.so libxslt.py $(PYTHONSODV)
|
|
||||||
|
|
||||||
libxsltmod.so: $(libxsltmodule_la_OBJECTS) libxsltmodule.la
|
|
||||||
-(rm -f .libs/libxsltmod.so; \
|
|
||||||
$(LINK) -o $@ $(libxsltmodule_la_OBJECTS) $(libxsltmod_so_LDFLAGS);\
|
|
||||||
if [ -r .libs/libxsltmod.so ] ; then cp .libs/libxsltmod.so . ; fi)
|
|
||||||
|
|
||||||
|
libxsltmod_la_SOURCES = libxslt.c types.c libxslt-py.c
|
||||||
|
libxsltmod_la_LIBADD = $(mylibs)
|
||||||
|
|
||||||
libxslt.py: $(srcdir)/libxsl.py libxsltclass.py
|
libxslt.py: $(srcdir)/libxsl.py libxsltclass.py
|
||||||
cat $(srcdir)/libxsl.py libxsltclass.py > libxslt.py
|
cat $(srcdir)/libxsl.py libxsltclass.py > libxslt.py
|
||||||
@ -64,6 +47,13 @@ install-data-local:
|
|||||||
-@(for doc in $(DOCS) ; \
|
-@(for doc in $(DOCS) ; \
|
||||||
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
do @INSTALL@ -m 0644 $$doc $(DESTDIR)$(DOCS_DIR) ; done)
|
||||||
|
|
||||||
|
GENERATE = generator.py
|
||||||
|
API_DESC = $(top_srcdir)/doc/libxslt-api.xml $(srcdir)/libxslt-python-api.xml
|
||||||
|
GENERATED= $(srcdir)/libxsltclass.py \
|
||||||
|
$(srcdir)/libxslt-export.c \
|
||||||
|
$(srcdir)/libxslt-py.c \
|
||||||
|
$(srcdir)/libxslt-py.h
|
||||||
|
|
||||||
$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
$(GENERATED): $(srcdir)/$(GENERATE) $(API_DESC)
|
||||||
cd $(srcdir) && $(PYTHON) $(GENERATE)
|
cd $(srcdir) && $(PYTHON) $(GENERATE)
|
||||||
|
|
||||||
@ -78,4 +68,3 @@ tests test: all
|
|||||||
clean:
|
clean:
|
||||||
rm -f $(GENERATED) *.o libxslt.so *.pyc libxslt.py
|
rm -f $(GENERATED) *.o libxslt.so *.pyc libxslt.py
|
||||||
|
|
||||||
|
|
||||||
|
@ -351,8 +351,14 @@ def print_function_wrapper(name, output, export, include):
|
|||||||
|
|
||||||
if ret[0] == 'void':
|
if ret[0] == 'void':
|
||||||
if file == "python_accessor":
|
if file == "python_accessor":
|
||||||
c_call = "\n %s->%s = %s;\n" % (args[0][0], args[1][0],
|
if args[1][1] == "char *" or args[1][1] == "xmlChar *":
|
||||||
args[1][0])
|
c_call = "\n if (%s->%s != NULL) xmlFree(%s->%s);\n" % (
|
||||||
|
args[0][0], args[1][0], args[0][0], args[1][0])
|
||||||
|
c_call = c_call + " %s->%s = xmlStrdup((const xmlChar *)%s);\n" % (args[0][0],
|
||||||
|
args[1][0], args[1][0])
|
||||||
|
else:
|
||||||
|
c_call = "\n %s->%s = %s;\n" % (args[0][0], args[1][0],
|
||||||
|
args[1][0])
|
||||||
else:
|
else:
|
||||||
c_call = "\n %s(%s);\n" % (name, c_call);
|
c_call = "\n %s(%s);\n" % (name, c_call);
|
||||||
ret_convert = " Py_INCREF(Py_None);\n return(Py_None);\n"
|
ret_convert = " Py_INCREF(Py_None);\n return(Py_None);\n"
|
||||||
@ -368,7 +374,10 @@ def print_function_wrapper(name, output, export, include):
|
|||||||
elif py_return_types.has_key(ret[0]):
|
elif py_return_types.has_key(ret[0]):
|
||||||
(f, t, n, c, p) = py_return_types[ret[0]]
|
(f, t, n, c, p) = py_return_types[ret[0]]
|
||||||
c_return = " %s c_retval;\n" % (ret[0])
|
c_return = " %s c_retval;\n" % (ret[0])
|
||||||
c_call = "\n c_retval = %s(%s);\n" % (name, c_call);
|
if file == "python_accessor" and ret[2] != None:
|
||||||
|
c_call = "\n c_retval = %s->%s;\n" % (args[0][0], ret[2])
|
||||||
|
else:
|
||||||
|
c_call = "\n c_retval = %s(%s);\n" % (name, c_call);
|
||||||
ret_convert = " py_retval = %s%sWrap((%s) c_retval);\n" % (p,n,c)
|
ret_convert = " py_retval = %s%sWrap((%s) c_retval);\n" % (p,n,c)
|
||||||
ret_convert = ret_convert + " return(py_retval);\n"
|
ret_convert = ret_convert + " return(py_retval);\n"
|
||||||
else:
|
else:
|
||||||
@ -384,7 +393,7 @@ def print_function_wrapper(name, output, export, include):
|
|||||||
include.write("PyObject * ")
|
include.write("PyObject * ")
|
||||||
include.write("libxslt_%s(PyObject *self, PyObject *args);\n" % (name))
|
include.write("libxslt_%s(PyObject *self, PyObject *args);\n" % (name))
|
||||||
|
|
||||||
export.write(" { \"%s\", libxslt_%s, METH_VARARGS, NULL },\n" % (name, name))
|
export.write(" { (char *)\"%s\", libxslt_%s, METH_VARARGS, NULL },\n" % (name, name))
|
||||||
|
|
||||||
if file == "python":
|
if file == "python":
|
||||||
# Those have been manually generated
|
# Those have been manually generated
|
||||||
@ -394,7 +403,10 @@ def print_function_wrapper(name, output, export, include):
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
output.write("PyObject *\n")
|
output.write("PyObject *\n")
|
||||||
output.write("libxslt_%s(PyObject *self, PyObject *args) {\n" % (name))
|
output.write("libxslt_%s(ATTRIBUTE_UNUSED PyObject *self," % (name))
|
||||||
|
if format == "":
|
||||||
|
output.write("ATTRIBUTE_UNUSED ")
|
||||||
|
output.write(" PyObject *args) {\n")
|
||||||
if ret[0] != 'void':
|
if ret[0] != 'void':
|
||||||
output.write(" PyObject *py_retval;\n")
|
output.write(" PyObject *py_retval;\n")
|
||||||
if c_return != "":
|
if c_return != "":
|
||||||
@ -402,7 +414,7 @@ def print_function_wrapper(name, output, export, include):
|
|||||||
if c_args != "":
|
if c_args != "":
|
||||||
output.write(c_args)
|
output.write(c_args)
|
||||||
if format != "":
|
if format != "":
|
||||||
output.write("\n if (!PyArg_ParseTuple(args, \"%s\"%s))\n" %
|
output.write("\n if (!PyArg_ParseTuple(args, (char *)\"%s\"%s))\n" %
|
||||||
(format, format_args))
|
(format, format_args))
|
||||||
output.write(" return(NULL);\n")
|
output.write(" return(NULL);\n")
|
||||||
if c_convert != "":
|
if c_convert != "":
|
||||||
@ -461,6 +473,8 @@ def buildStubs():
|
|||||||
export.write("/* Generated */\n\n")
|
export.write("/* Generated */\n\n")
|
||||||
wrapper = open("libxslt-py.c", "w")
|
wrapper = open("libxslt-py.c", "w")
|
||||||
wrapper.write("/* Generated */\n\n")
|
wrapper.write("/* Generated */\n\n")
|
||||||
|
wrapper.write("#include \"config.h\"\n")
|
||||||
|
wrapper.write("#include <libxslt/xsltconfig.h>\n")
|
||||||
wrapper.write("#include \"libxslt_wrap.h\"\n")
|
wrapper.write("#include \"libxslt_wrap.h\"\n")
|
||||||
wrapper.write("#include \"libxslt-py.h\"\n\n")
|
wrapper.write("#include \"libxslt-py.h\"\n\n")
|
||||||
for function in functions.keys():
|
for function in functions.keys():
|
||||||
|
121
python/libxslt.c
121
python/libxslt.c
@ -12,17 +12,21 @@
|
|||||||
* daniel@veillard.com
|
* daniel@veillard.com
|
||||||
*/
|
*/
|
||||||
#include <Python.h>
|
#include <Python.h>
|
||||||
|
#include "config.h"
|
||||||
#include <libxml/xmlmemory.h>
|
#include <libxml/xmlmemory.h>
|
||||||
#include <libxml/tree.h>
|
#include <libxml/tree.h>
|
||||||
#include <libxml/xpath.h>
|
#include <libxml/xpath.h>
|
||||||
#include "libxslt_wrap.h"
|
#include "libxslt_wrap.h"
|
||||||
#include "libxslt-py.h"
|
#include "libxslt-py.h"
|
||||||
|
|
||||||
|
|
||||||
/* #define DEBUG */
|
/* #define DEBUG */
|
||||||
/* #define DEBUG_XPATH */
|
/* #define DEBUG_XPATH */
|
||||||
/* #define DEBUG_ERROR */
|
/* #define DEBUG_ERROR */
|
||||||
/* #define DEBUG_MEMORY */
|
/* #define DEBUG_MEMORY */
|
||||||
|
|
||||||
|
void initlibxsltmod(void);
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
* Per type specific glue *
|
* Per type specific glue *
|
||||||
@ -40,7 +44,8 @@ libxslt_xsltStylesheetPtrWrap(xsltStylesheetPtr style) {
|
|||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return(Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) style, "xsltStylesheetPtr", NULL);
|
ret = PyCObject_FromVoidPtrAndDesc((void *) style,
|
||||||
|
(char *)"xsltStylesheetPtr", NULL);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,95 +60,11 @@ libxslt_xsltTransformContextPtrWrap(xsltTransformContextPtr ctxt) {
|
|||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return(Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) ctxt, "xsltTransformContextPtr", NULL);
|
ret = PyCObject_FromVoidPtrAndDesc((void *) ctxt,
|
||||||
|
(char *)"xsltTransformContextPtr", NULL);
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
|
||||||
* *
|
|
||||||
* Memory debug interface *
|
|
||||||
* *
|
|
||||||
************************************************************************/
|
|
||||||
|
|
||||||
extern void xmlMemFree(void *ptr);
|
|
||||||
extern void *xmlMemMalloc(size_t size);
|
|
||||||
extern void *xmlMemRealloc(void *ptr,size_t size);
|
|
||||||
extern char *xmlMemoryStrdup(const char *str);
|
|
||||||
|
|
||||||
static int libxsltMemoryDebugActivated = 0;
|
|
||||||
static long libxsltMemoryAllocatedBase = 0;
|
|
||||||
|
|
||||||
static int libxsltMemoryDebug = 0;
|
|
||||||
static xmlFreeFunc freeFunc = NULL;
|
|
||||||
static xmlMallocFunc mallocFunc = NULL;
|
|
||||||
static xmlReallocFunc reallocFunc = NULL;
|
|
||||||
static xmlStrdupFunc strdupFunc = NULL;
|
|
||||||
|
|
||||||
PyObject *
|
|
||||||
libxslt_xmlDebugMemory(PyObject *self, PyObject *args) {
|
|
||||||
int activate;
|
|
||||||
PyObject *py_retval;
|
|
||||||
long ret;
|
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "i:xmlDebugMemory", &activate))
|
|
||||||
return(NULL);
|
|
||||||
|
|
||||||
#ifdef DEBUG_MEMORY
|
|
||||||
printf("libxslt_xmlDebugMemory(%d) called\n", activate);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (activate != 0) {
|
|
||||||
if (libxsltMemoryDebug == 0) {
|
|
||||||
/*
|
|
||||||
* First initialize the library and grab the old memory handlers
|
|
||||||
* and switch the library to memory debugging
|
|
||||||
*/
|
|
||||||
xmlMemGet((xmlFreeFunc *) &freeFunc,
|
|
||||||
(xmlMallocFunc *)&mallocFunc,
|
|
||||||
(xmlReallocFunc *)&reallocFunc,
|
|
||||||
(xmlStrdupFunc *) &strdupFunc);
|
|
||||||
if ((freeFunc == xmlMemFree) && (mallocFunc == xmlMemMalloc) &&
|
|
||||||
(reallocFunc == xmlMemRealloc) &&
|
|
||||||
(strdupFunc == xmlMemoryStrdup)) {
|
|
||||||
libxsltMemoryAllocatedBase = xmlMemUsed();
|
|
||||||
} else {
|
|
||||||
ret = (long) xmlMemSetup(xmlMemFree, xmlMemMalloc,
|
|
||||||
xmlMemRealloc, xmlMemoryStrdup);
|
|
||||||
if (ret < 0)
|
|
||||||
goto error;
|
|
||||||
libxsltMemoryAllocatedBase = xmlMemUsed();
|
|
||||||
}
|
|
||||||
xmlInitParser();
|
|
||||||
ret = 0;
|
|
||||||
} else if (libxsltMemoryDebugActivated == 0) {
|
|
||||||
libxsltMemoryAllocatedBase = xmlMemUsed();
|
|
||||||
ret = 0;
|
|
||||||
} else {
|
|
||||||
ret = xmlMemUsed() - libxsltMemoryAllocatedBase;
|
|
||||||
}
|
|
||||||
libxsltMemoryDebug = 1;
|
|
||||||
libxsltMemoryDebugActivated = 1;
|
|
||||||
} else {
|
|
||||||
if (libxsltMemoryDebugActivated == 1)
|
|
||||||
ret = xmlMemUsed() - libxsltMemoryAllocatedBase;
|
|
||||||
else
|
|
||||||
ret = 0;
|
|
||||||
libxsltMemoryDebugActivated = 0;
|
|
||||||
}
|
|
||||||
error:
|
|
||||||
py_retval = libxml_longWrap(ret);
|
|
||||||
return(py_retval);
|
|
||||||
}
|
|
||||||
|
|
||||||
PyObject *
|
|
||||||
libxslt_xmlDumpMemory(PyObject *self, PyObject *args) {
|
|
||||||
|
|
||||||
if (libxsltMemoryDebug != 0)
|
|
||||||
xmlMemoryDump();
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
return(Py_None);
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* *
|
* *
|
||||||
* Extending the API *
|
* Extending the API *
|
||||||
@ -199,14 +120,15 @@ libxslt_xmlXPathFuncCallback(xmlXPathParserContextPtr ctxt, int nargs) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxslt_xsltRegisterExtModuleFunction(PyObject *self, PyObject *args) {
|
libxslt_xsltRegisterExtModuleFunction(PyObject *self ATTRIBUTE_UNUSED,
|
||||||
|
PyObject *args) {
|
||||||
PyObject *py_retval;
|
PyObject *py_retval;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
xmlChar *name;
|
xmlChar *name;
|
||||||
xmlChar *ns_uri;
|
xmlChar *ns_uri;
|
||||||
PyObject *pyobj_f;
|
PyObject *pyobj_f;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "szO:registerXPathFunction",
|
if (!PyArg_ParseTuple(args, (char *)"szO:registerXPathFunction",
|
||||||
&name, &ns_uri, &pyobj_f))
|
&name, &ns_uri, &pyobj_f))
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
@ -239,8 +161,8 @@ libxslt_xsltRegisterExtModuleFunction(PyObject *self, PyObject *args) {
|
|||||||
return(py_retval);
|
return(py_retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
deallocateCallback(void *payload, xmlChar *name) {
|
deallocateCallback(void *payload, xmlChar *name ATTRIBUTE_UNUSED) {
|
||||||
PyObject *function = (PyObject *) payload;
|
PyObject *function = (PyObject *) payload;
|
||||||
|
|
||||||
#ifdef DEBUG_XPATH
|
#ifdef DEBUG_XPATH
|
||||||
@ -257,7 +179,7 @@ deallocateCallback(void *payload, xmlChar *name) {
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxslt_xsltApplyStylesheet(PyObject *self, PyObject *args) {
|
libxslt_xsltApplyStylesheet(PyObject *self ATTRIBUTE_UNUSED, PyObject *args) {
|
||||||
PyObject *py_retval;
|
PyObject *py_retval;
|
||||||
xmlDocPtr c_retval;
|
xmlDocPtr c_retval;
|
||||||
xsltStylesheetPtr style;
|
xsltStylesheetPtr style;
|
||||||
@ -270,7 +192,8 @@ libxslt_xsltApplyStylesheet(PyObject *self, PyObject *args) {
|
|||||||
PyObject *name;
|
PyObject *name;
|
||||||
PyObject *value;
|
PyObject *value;
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "OOO:xsltApplyStylesheet", &pyobj_style, &pyobj_doc, &pyobj_params))
|
if (!PyArg_ParseTuple(args, (char *) "OOO:xsltApplyStylesheet",
|
||||||
|
&pyobj_style, &pyobj_doc, &pyobj_params))
|
||||||
return(NULL);
|
return(NULL);
|
||||||
|
|
||||||
if (pyobj_params != Py_None) {
|
if (pyobj_params != Py_None) {
|
||||||
@ -291,11 +214,12 @@ libxslt_xsltApplyStylesheet(PyObject *self, PyObject *args) {
|
|||||||
|
|
||||||
tmp = PyString_AS_STRING(name);
|
tmp = PyString_AS_STRING(name);
|
||||||
size = PyString_GET_SIZE(name);
|
size = PyString_GET_SIZE(name);
|
||||||
params[j * 2] = xmlCharStrndup(tmp, size);
|
params[j * 2] = (char *) xmlCharStrndup(tmp, size);
|
||||||
if (PyString_Check(value)) {
|
if (PyString_Check(value)) {
|
||||||
tmp = PyString_AS_STRING(value);
|
tmp = PyString_AS_STRING(value);
|
||||||
size = PyString_GET_SIZE(value);
|
size = PyString_GET_SIZE(value);
|
||||||
params[(j * 2) + 1] = xmlCharStrndup(tmp, size);
|
params[(j * 2) + 1] = (char *)
|
||||||
|
xmlCharStrndup(tmp, size);
|
||||||
} else {
|
} else {
|
||||||
params[(j * 2) + 1] = NULL;
|
params[(j * 2) + 1] = NULL;
|
||||||
}
|
}
|
||||||
@ -334,7 +258,8 @@ libxslt_xsltApplyStylesheet(PyObject *self, PyObject *args) {
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxslt_xsltCleanup(PyObject *self, PyObject *args) {
|
libxslt_xsltCleanup(PyObject *self ATTRIBUTE_UNUSED,
|
||||||
|
PyObject *args ATTRIBUTE_UNUSED) {
|
||||||
|
|
||||||
if (libxslt_extModuleFunctions != NULL) {
|
if (libxslt_extModuleFunctions != NULL) {
|
||||||
xmlHashFree(libxslt_extModuleFunctions, deallocateCallback);
|
xmlHashFree(libxslt_extModuleFunctions, deallocateCallback);
|
||||||
@ -352,7 +277,7 @@ libxslt_xsltCleanup(PyObject *self, PyObject *args) {
|
|||||||
************************************************************************/
|
************************************************************************/
|
||||||
static PyMethodDef libxsltMethods[] = {
|
static PyMethodDef libxsltMethods[] = {
|
||||||
#include "libxslt-export.c"
|
#include "libxslt-export.c"
|
||||||
{ NULL }
|
{ NULL, NULL, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef MERGED_MODULES
|
#ifdef MERGED_MODULES
|
||||||
@ -369,7 +294,7 @@ void initlibxsltmod(void) {
|
|||||||
|
|
||||||
if (initialized != 0)
|
if (initialized != 0)
|
||||||
return;
|
return;
|
||||||
m = Py_InitModule("libxsltmod", libxsltMethods);
|
m = Py_InitModule((char *)"libxsltmod", libxsltMethods);
|
||||||
initialized = 1;
|
initialized = 1;
|
||||||
/* libxslt_xmlErrorInitialize(); */
|
/* libxslt_xmlErrorInitialize(); */
|
||||||
/*
|
/*
|
||||||
|
@ -15,7 +15,7 @@ EXTRA_DIST = $(TESTSPY) $(XMLS) $(EXTRAS)
|
|||||||
|
|
||||||
if WITH_PYTHON
|
if WITH_PYTHON
|
||||||
tests: $(TESTSPY)
|
tests: $(TESTSPY)
|
||||||
-@(PYTHONPATH=".." ; export PYTHONPATH; \
|
-@(PYTHONPATH="..:../.libs" ; export PYTHONPATH; \
|
||||||
for test in $(TESTSPY) ; do echo "-- $$test" ; $(PYTHON) $$test ; done)
|
for test in $(TESTSPY) ; do echo "-- $$test" ; $(PYTHON) $$test ; done)
|
||||||
else
|
else
|
||||||
tests:
|
tests:
|
||||||
|
403
python/types.c
403
python/types.c
@ -6,303 +6,466 @@
|
|||||||
*
|
*
|
||||||
* daniel@veillard.com
|
* daniel@veillard.com
|
||||||
*/
|
*/
|
||||||
#include "libxslt_wrap.h"
|
#include "libxml_wrap.h"
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_intWrap(int val) {
|
libxml_intWrap(int val)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_intWrap: val = %d\n", val);
|
printf("libxml_intWrap: val = %d\n", val);
|
||||||
#endif
|
#endif
|
||||||
ret = PyInt_FromLong((long) val);
|
ret = PyInt_FromLong((long) val);
|
||||||
return(ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_longWrap(long val) {
|
libxml_longWrap(long val)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_longWrap: val = %ld\n", val);
|
printf("libxml_longWrap: val = %ld\n", val);
|
||||||
#endif
|
#endif
|
||||||
ret = PyInt_FromLong(val);
|
ret = PyInt_FromLong(val);
|
||||||
return(ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_doubleWrap(double val) {
|
libxml_doubleWrap(double val)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_doubleWrap: val = %f\n", val);
|
printf("libxml_doubleWrap: val = %f\n", val);
|
||||||
#endif
|
#endif
|
||||||
ret = PyFloat_FromDouble((double) val);
|
ret = PyFloat_FromDouble((double) val);
|
||||||
return(ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_charPtrWrap(char *str) {
|
libxml_charPtrWrap(char *str)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlcharPtrWrap: str = %s\n", str);
|
printf("libxml_xmlcharPtrWrap: str = %s\n", str);
|
||||||
#endif
|
#endif
|
||||||
if (str == NULL) {
|
if (str == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
/* TODO: look at deallocation */
|
/* TODO: look at deallocation */
|
||||||
ret = PyString_FromString(str);
|
ret = PyString_FromString(str);
|
||||||
xmlFree(str);
|
xmlFree(str);
|
||||||
return(ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlCharPtrWrap(xmlChar *str) {
|
libxml_charPtrConstWrap(const char *str)
|
||||||
PyObject *ret;
|
{
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
printf("libxml_xmlCharPtrWrap: str = %s\n", str);
|
|
||||||
#endif
|
|
||||||
if (str == NULL) {
|
|
||||||
Py_INCREF(Py_None);
|
|
||||||
return(Py_None);
|
|
||||||
}
|
|
||||||
/* TODO: look at deallocation */
|
|
||||||
ret = PyString_FromString(str);
|
|
||||||
xmlFree(str);
|
|
||||||
return(ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
PyObject *
|
|
||||||
libxml_constcharPtrWrap(const char *str) {
|
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlcharPtrWrap: str = %s\n", str);
|
printf("libxml_xmlcharPtrWrap: str = %s\n", str);
|
||||||
#endif
|
#endif
|
||||||
if (str == NULL) {
|
if (str == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
/* TODO: look at deallocation */
|
/* TODO: look at deallocation */
|
||||||
ret = PyString_FromString(str);
|
ret = PyString_FromString(str);
|
||||||
return(ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_constxmlCharPtrWrap(const xmlChar *str) {
|
libxml_xmlCharPtrWrap(xmlChar * str)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlCharPtrWrap: str = %s\n", str);
|
printf("libxml_xmlCharPtrWrap: str = %s\n", str);
|
||||||
#endif
|
#endif
|
||||||
if (str == NULL) {
|
if (str == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
/* TODO: look at deallocation */
|
/* TODO: look at deallocation */
|
||||||
ret = PyString_FromString(str);
|
ret = PyString_FromString((char *) str);
|
||||||
return(ret);
|
xmlFree(str);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlDocPtrWrap(xmlDocPtr doc) {
|
libxml_xmlCharPtrConstWrap(const xmlChar * str)
|
||||||
|
{
|
||||||
|
PyObject *ret;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("libxml_xmlCharPtrWrap: str = %s\n", str);
|
||||||
|
#endif
|
||||||
|
if (str == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return (Py_None);
|
||||||
|
}
|
||||||
|
/* TODO: look at deallocation */
|
||||||
|
ret = PyString_FromString((char *) str);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
libxml_constcharPtrWrap(const char *str)
|
||||||
|
{
|
||||||
|
PyObject *ret;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("libxml_xmlcharPtrWrap: str = %s\n", str);
|
||||||
|
#endif
|
||||||
|
if (str == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return (Py_None);
|
||||||
|
}
|
||||||
|
/* TODO: look at deallocation */
|
||||||
|
ret = PyString_FromString(str);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
libxml_constxmlCharPtrWrap(const xmlChar * str)
|
||||||
|
{
|
||||||
|
PyObject *ret;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("libxml_xmlCharPtrWrap: str = %s\n", str);
|
||||||
|
#endif
|
||||||
|
if (str == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return (Py_None);
|
||||||
|
}
|
||||||
|
/* TODO: look at deallocation */
|
||||||
|
ret = PyString_FromString((char *) str);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
libxml_xmlDocPtrWrap(xmlDocPtr doc)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlDocPtrWrap: doc = %p\n", doc);
|
printf("libxml_xmlDocPtrWrap: doc = %p\n", doc);
|
||||||
#endif
|
#endif
|
||||||
if (doc == NULL) {
|
if (doc == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
/* TODO: look at deallocation */
|
/* TODO: look at deallocation */
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) doc, "xmlDocPtr", NULL);
|
ret =
|
||||||
return(ret);
|
PyCObject_FromVoidPtrAndDesc((void *) doc, (char *) "xmlDocPtr",
|
||||||
|
NULL);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlNodePtrWrap(xmlNodePtr node) {
|
libxml_xmlNodePtrWrap(xmlNodePtr node)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlNodePtrWrap: node = %p\n", node);
|
printf("libxml_xmlNodePtrWrap: node = %p\n", node);
|
||||||
#endif
|
#endif
|
||||||
if (node == NULL) {
|
if (node == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) node, "xmlNodePtr", NULL);
|
ret =
|
||||||
return(ret);
|
PyCObject_FromVoidPtrAndDesc((void *) node, (char *) "xmlNodePtr",
|
||||||
|
NULL);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlNsPtrWrap(xmlNsPtr ns) {
|
libxml_xmlURIPtrWrap(xmlURIPtr uri)
|
||||||
|
{
|
||||||
|
PyObject *ret;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("libxml_xmlURIPtrWrap: uri = %p\n", uri);
|
||||||
|
#endif
|
||||||
|
if (uri == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return (Py_None);
|
||||||
|
}
|
||||||
|
ret =
|
||||||
|
PyCObject_FromVoidPtrAndDesc((void *) uri, (char *) "xmlURIPtr",
|
||||||
|
NULL);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
libxml_xmlNsPtrWrap(xmlNsPtr ns)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlNsPtrWrap: node = %p\n", ns);
|
printf("libxml_xmlNsPtrWrap: node = %p\n", ns);
|
||||||
#endif
|
#endif
|
||||||
if (ns == NULL) {
|
if (ns == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) ns, "xmlNsPtr", NULL);
|
ret =
|
||||||
return(ret);
|
PyCObject_FromVoidPtrAndDesc((void *) ns, (char *) "xmlNsPtr",
|
||||||
|
NULL);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlAttrPtrWrap(xmlAttrPtr attr) {
|
libxml_xmlAttrPtrWrap(xmlAttrPtr attr)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlAttrNodePtrWrap: attr = %p\n", attr);
|
printf("libxml_xmlAttrNodePtrWrap: attr = %p\n", attr);
|
||||||
#endif
|
#endif
|
||||||
if (attr == NULL) {
|
if (attr == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) attr, "xmlAttrPtr", NULL);
|
ret =
|
||||||
return(ret);
|
PyCObject_FromVoidPtrAndDesc((void *) attr, (char *) "xmlAttrPtr",
|
||||||
|
NULL);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlAttributePtrWrap(xmlAttributePtr attr) {
|
libxml_xmlAttributePtrWrap(xmlAttributePtr attr)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlAttributePtrWrap: attr = %p\n", attr);
|
printf("libxml_xmlAttributePtrWrap: attr = %p\n", attr);
|
||||||
#endif
|
#endif
|
||||||
if (attr == NULL) {
|
if (attr == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) attr, "xmlAttributePtr", NULL);
|
ret =
|
||||||
return(ret);
|
PyCObject_FromVoidPtrAndDesc((void *) attr,
|
||||||
|
(char *) "xmlAttributePtr", NULL);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlElementPtrWrap(xmlElementPtr elem) {
|
libxml_xmlElementPtrWrap(xmlElementPtr elem)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlElementNodePtrWrap: elem = %p\n", elem);
|
printf("libxml_xmlElementNodePtrWrap: elem = %p\n", elem);
|
||||||
#endif
|
#endif
|
||||||
if (elem == NULL) {
|
if (elem == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) elem, "xmlElementPtr", NULL);
|
ret =
|
||||||
return(ret);
|
PyCObject_FromVoidPtrAndDesc((void *) elem,
|
||||||
|
(char *) "xmlElementPtr", NULL);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt) {
|
libxml_xmlXPathContextPtrWrap(xmlXPathContextPtr ctxt)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlXPathContextPtrWrap: ctxt = %p\n", ctxt);
|
printf("libxml_xmlXPathContextPtrWrap: ctxt = %p\n", ctxt);
|
||||||
#endif
|
#endif
|
||||||
if (ctxt == NULL) {
|
if (ctxt == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) ctxt, "xmlXPathContextPtr",
|
ret =
|
||||||
NULL);
|
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
|
||||||
return(ret);
|
(char *) "xmlXPathContextPtr", NULL);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt) {
|
libxml_xmlXPathParserContextPtrWrap(xmlXPathParserContextPtr ctxt)
|
||||||
|
{
|
||||||
|
PyObject *ret;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("libxml_xmlXPathParserContextPtrWrap: ctxt = %p\n", ctxt);
|
||||||
|
#endif
|
||||||
|
if (ctxt == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return (Py_None);
|
||||||
|
}
|
||||||
|
ret = PyCObject_FromVoidPtrAndDesc((void *) ctxt,
|
||||||
|
(char *) "xmlXPathParserContextPtr",
|
||||||
|
NULL);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
libxml_xmlParserCtxtPtrWrap(xmlParserCtxtPtr ctxt)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlParserCtxtPtrWrap: ctxt = %p\n", ctxt);
|
printf("libxml_xmlParserCtxtPtrWrap: ctxt = %p\n", ctxt);
|
||||||
#endif
|
#endif
|
||||||
if (ctxt == NULL) {
|
if (ctxt == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
ret = PyCObject_FromVoidPtrAndDesc((void *) ctxt, "xmlParserCtxtPtr",
|
ret =
|
||||||
NULL);
|
PyCObject_FromVoidPtrAndDesc((void *) ctxt,
|
||||||
return(ret);
|
(char *) "xmlParserCtxtPtr", NULL);
|
||||||
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
PyObject *
|
PyObject *
|
||||||
libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj) {
|
libxml_xmlXPathObjectPtrWrap(xmlXPathObjectPtr obj)
|
||||||
|
{
|
||||||
PyObject *ret;
|
PyObject *ret;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlXPathObjectPtrWrap: ctxt = %p\n", obj);
|
printf("libxml_xmlXPathObjectPtrWrap: ctxt = %p\n", obj);
|
||||||
#endif
|
#endif
|
||||||
if (obj == NULL) {
|
if (obj == NULL) {
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
return(Py_None);
|
return (Py_None);
|
||||||
}
|
}
|
||||||
switch(obj->type) {
|
switch (obj->type) {
|
||||||
case XPATH_XSLT_TREE:
|
case XPATH_XSLT_TREE:
|
||||||
/* TODO !!!! Allocation problems */
|
/* TODO !!!! Allocation problems */
|
||||||
case XPATH_NODESET:
|
case XPATH_NODESET:
|
||||||
if ((obj->nodesetval == NULL) || (obj->nodesetval->nodeNr == 0))
|
if ((obj->nodesetval == NULL)
|
||||||
ret = PyList_New(0);
|
|| (obj->nodesetval->nodeNr == 0))
|
||||||
else {
|
ret = PyList_New(0);
|
||||||
int i;
|
else {
|
||||||
xmlNodePtr node;
|
int i;
|
||||||
|
xmlNodePtr node;
|
||||||
|
|
||||||
ret = PyList_New(obj->nodesetval->nodeNr);
|
ret = PyList_New(obj->nodesetval->nodeNr);
|
||||||
for (i = 0;i < obj->nodesetval->nodeNr;i++) {
|
for (i = 0; i < obj->nodesetval->nodeNr; i++) {
|
||||||
node = obj->nodesetval->nodeTab[i];
|
node = obj->nodesetval->nodeTab[i];
|
||||||
/* TODO: try to cast directly to the proper node type */
|
/* TODO: try to cast directly to the proper node type */
|
||||||
PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));
|
PyList_SetItem(ret, i, libxml_xmlNodePtrWrap(node));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case XPATH_BOOLEAN:
|
case XPATH_BOOLEAN:
|
||||||
ret = PyInt_FromLong((long) obj->boolval);
|
ret = PyInt_FromLong((long) obj->boolval);
|
||||||
break;
|
break;
|
||||||
case XPATH_NUMBER:
|
case XPATH_NUMBER:
|
||||||
ret = PyFloat_FromDouble(obj->floatval);
|
ret = PyFloat_FromDouble(obj->floatval);
|
||||||
break;
|
break;
|
||||||
case XPATH_STRING:
|
case XPATH_STRING:
|
||||||
ret = PyString_FromString(obj->stringval);
|
ret = PyString_FromString((char *) obj->stringval);
|
||||||
break;
|
break;
|
||||||
case XPATH_POINT:
|
case XPATH_POINT:
|
||||||
case XPATH_RANGE:
|
case XPATH_RANGE:
|
||||||
case XPATH_LOCATIONSET:
|
case XPATH_LOCATIONSET:
|
||||||
default:
|
default:
|
||||||
printf("Unable to convert XPath object type %d\n", obj->type);
|
printf("Unable to convert XPath object type %d\n", obj->type);
|
||||||
Py_INCREF(Py_None);
|
Py_INCREF(Py_None);
|
||||||
ret = Py_None;
|
ret = Py_None;
|
||||||
}
|
}
|
||||||
xmlXPathFreeObject(obj);
|
xmlXPathFreeObject(obj);
|
||||||
return(ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlXPathObjectPtr
|
xmlXPathObjectPtr
|
||||||
libxml_xmlXPathObjectPtrConvert(PyObject * obj) {
|
libxml_xmlXPathObjectPtrConvert(PyObject * obj)
|
||||||
xmlXPathObjectPtr ret;
|
{
|
||||||
|
xmlXPathObjectPtr ret = NULL;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
printf("libxml_xmlXPathObjectPtrConvert: obj = %p\n", obj);
|
printf("libxml_xmlXPathObjectPtrConvert: obj = %p\n", obj);
|
||||||
#endif
|
#endif
|
||||||
if (obj == NULL) {
|
if (obj == NULL) {
|
||||||
return(NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
if PyFloat_Check(obj) {
|
if PyFloat_Check
|
||||||
ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
|
(obj) {
|
||||||
} else if PyString_Check(obj) {
|
ret = xmlXPathNewFloat((double) PyFloat_AS_DOUBLE(obj));
|
||||||
xmlChar *str;
|
} else if PyString_Check
|
||||||
|
(obj) {
|
||||||
|
xmlChar *str;
|
||||||
|
|
||||||
str = xmlStrndup((const xmlChar *)PyString_AS_STRING(obj),
|
str = xmlStrndup((const xmlChar *) PyString_AS_STRING(obj),
|
||||||
PyString_GET_SIZE(obj));
|
PyString_GET_SIZE(obj));
|
||||||
ret = xmlXPathWrapString(str);
|
ret = xmlXPathWrapString(str);
|
||||||
|
} else if PyList_Check
|
||||||
|
(obj) {
|
||||||
|
int i;
|
||||||
|
PyObject *node;
|
||||||
|
xmlNodePtr cur;
|
||||||
|
xmlNodeSetPtr set;
|
||||||
|
|
||||||
|
set = xmlXPathNodeSetCreate(NULL);
|
||||||
|
|
||||||
|
for (i = 0; i < PyList_Size(obj); i++) {
|
||||||
|
node = PyList_GetItem(obj, i);
|
||||||
|
if ((node == NULL) || (node->ob_type == NULL))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
cur = NULL;
|
||||||
|
if (PyCObject_Check(node)) {
|
||||||
|
printf("Got a CObject\n");
|
||||||
|
cur = PyxmlNode_Get(node);
|
||||||
|
} else if (PyInstance_Check(node)) {
|
||||||
|
PyInstanceObject *inst = (PyInstanceObject *) node;
|
||||||
|
PyObject *name = inst->in_class->cl_name;
|
||||||
|
|
||||||
|
if PyString_Check
|
||||||
|
(name) {
|
||||||
|
char *type = PyString_AS_STRING(name);
|
||||||
|
PyObject *wrapper;
|
||||||
|
|
||||||
|
if (!strcmp(type, "xmlNode")) {
|
||||||
|
wrapper =
|
||||||
|
PyObject_GetAttrString(node, (char *) "_o");
|
||||||
|
if (wrapper != NULL) {
|
||||||
|
cur = PyxmlNode_Get(wrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
printf("Unknown object in Python return list\n");
|
||||||
|
}
|
||||||
|
if (cur != NULL) {
|
||||||
|
xmlXPathNodeSetAdd(set, cur);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ret = xmlXPathWrapNodeSet(set);
|
||||||
} else {
|
} else {
|
||||||
printf("Unable to convert Python Object to XPath");
|
printf("Unable to convert Python Object to XPath");
|
||||||
}
|
}
|
||||||
Py_DECREF(obj);
|
Py_DECREF(obj);
|
||||||
return(ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PyObject *
|
||||||
|
libxml_xmlCatalogPtrWrap(xmlCatalogPtr catal)
|
||||||
|
{
|
||||||
|
PyObject *ret;
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
printf("libxml_xmlNodePtrWrap: catal = %p\n", catal);
|
||||||
|
#endif
|
||||||
|
if (catal == NULL) {
|
||||||
|
Py_INCREF(Py_None);
|
||||||
|
return (Py_None);
|
||||||
|
}
|
||||||
|
ret =
|
||||||
|
PyCObject_FromVoidPtrAndDesc((void *) catal,
|
||||||
|
(char *) "xmlCatalogPtr", NULL);
|
||||||
|
return (ret);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user