⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xml.h

📁 IBM Lotus C++ API 7.0a for IBM Lotus Notes/Domino Directory Release --------- ------------------
💻 H
📖 第 1 页 / 共 2 页
字号:

#if defined(OS400) && (__OS400_TGTVRM__ >= 510)
#pragma datamodel(P128)
#endif

/*********************************************************************/
/*                                                                   */
/* Licensed Materials - Property of IBM                              */
/*                                                                   */
/* L-GHUS-5VMPGW, L-GHUS-5S3PEE                                      */
/* (C) Copyright IBM Corp. 2002, 2005  All Rights Reserved           */
/*                                                                   */
/* US Government Users Restricted Rights - Use, duplication or       */
/* disclosure restricted by GSA ADP Schedule Contract with           */
/* IBM Corp.                                                         */
/*                                                                   */
/*********************************************************************/



#if !defined (XML_H)
#define XML_H

#ifndef GLOBAL_DEFS
#include "global.h"
#endif

#ifndef NSF_DATA_DEFS
#include "nsfdata.h"
#endif

#ifndef NAME_DEFS
#include "names.h"
#endif


#ifdef __cplusplus
extern "C" {
#endif

typedef MEMHANDLE DXLEXPORTHANDLE;
typedef MEMHANDLE DXLIMPORTHANDLE;
typedef MEMHANDLE XSLTRANSFORMHANDLE;


/*
 *--------------------------------------------------------------------------------------
 *	XML COMMON DEFINITIONS (SHARED BY TWO OR MORE XML PROCESSORS)
 *--------------------------------------------------------------------------------------
 *
 */

/* XML validation options */
typedef enum
{
	Xml_Validate_Never = 0,
	Xml_Validate_Always = 1,
	Xml_Validate_Auto = 2

} Xml_Validation_Option;

typedef DWORD (LNCALLBACKPTR XML_READ_FUNCTION) (BYTE *pBuffer, DWORD length, void far *pAction);
typedef void (LNCALLBACKPTR XML_WRITE_FUNCTION) (const BYTE *pBuffer, DWORD length, void far *pAction );

/*
 *--------------------------------------------------------------------------------------
 *	DXL IMPORT API
 *--------------------------------------------------------------------------------------
 *
 *	DXL importer options for ACL, design elements, and documents (each can be set independently).
 *
 *	Notes:
 *
 *		1) The REPLACE options remove matching data completely before importing new data from DXL
 *
 *			* For documents and design elements, matching is done by UNID.  When a DXL document
 *			  or design element matches one in the the database, then all items in the database's
 *			  document or design element will be replace with the DXL content. When a DXL document
 *			  or design element does not match one in the database, then the DXL content will be
 *			  ignored if the DXLIMPORTOPTION_REPLACE_ELSE_IGNORE. If, instead, the option is
 *			  DXLIMPORTOPTION_REPLACE_ELSE_CREATE, then an entirely new document or design element
 *			  will be created from the DXL.
 *
 *			* For the ACL, the only valid REPLACE option is DXLIMPORTOPTION_REPLACE_ELSE_IGNORE.
 *			  If the DXL contains ACL info and the database has an ACL (almost always true), then
 *			  the database's ACL will be depopulated and replaced by the ACL entries from the DXL.
 *
 *		2) The UPDATE options work at the item level for documents and the entry level for the ACL,
 *		   and preexisting non-matching items/entries in the database will be preserved.
 *
 *			* For documents, matching is done first by UNID and then by item name. When a DXL item
 *			  matches a document item, the document item is replaced by the DXL content. When a DXL
 *			  item does not have a match in the document, it is added to the document if the
 *			  DXLIMPORTOPTION_UPDATE_ELSE_CREATE option is specified and ignored if the DXLIMPORTOPTION-
 *			  _UPDATE_ELSE_IGNORE option is specified.
 *
 *			* UPDATE options are not applicable to design elements.
 *
 *			* For the ACL, if a DXL ACL entry matches an existing database ACL entry by name, then the
 *			  entry in the database is replaced with the DXL entry. When a DXL ACL entry does not match
 *			  anything already in the database ACL, it is added to the ACL if the DXLIMPORTOPTION-
 *			  _UPDATE_ELSE_CREATE option is specified and ignored if the DXLIMPORTOPTION_UPDATE_ELSE_IGNORE
 *			  option is specified.
 *
 */ 

typedef enum
{
	DXLIMPORTOPTION_IGNORE=1,				/* ignore imported data */

	DXLIMPORTOPTION_CREATE=2,				/* create new data from imported data */
	DXLIMPORTOPTION_IGNORE_ELSE_CREATE=3,	/* if imported data matches existing data, ignore the imported data, */
											/* ... otherwise create it */
	DXLIMPORTOPTION_CREATE_RESERVED2=4,		/* do not used - reserved for future variation of create option */

	DXLIMPORTOPTION_REPLACE_ELSE_IGNORE=5,	/* if imported data matches existing data, then replace existing */
											/* ... data with imported data, else ignore imported data. */
	DXLIMPORTOPTION_REPLACE_ELSE_CREATE=6,	/* if imported data matches existing data, then replace existing */
											/* ... data with imported data, else create new data from imported data */
	DXLIMPORTOPTION_REPLACE_RESERVED1=7,	/* do not used - reserved for future variation of replace option */
	DXLIMPORTOPTION_REPLACE_RESERVED2=8,	/* do not used - reserved for future variation of replace option */

	DXLIMPORTOPTION_UPDATE_ELSE_IGNORE=9,	/* if imported  data matches existing data, then update existing */
											/* ... data with imported data, else ignore imported data. */
	DXLIMPORTOPTION_UPDATE_ELSE_CREATE=10,	/* if imported data matches existing data, then update existing */
											/* ... data with imported data, else create new data from imported data */
	DXLIMPORTOPTION_UPDATE_RESERVED1=11,	/* do not used - reserved for future variation of update option */
	DXLIMPORTOPTION_UPDATE_RESERVED2=12		/* do not used - reserved for future variation of update option */

} DXLIMPORTOPTION;



/*
 *	Options for logging various types of DXL import error situations.
 *	(For example, unknown elements and attributes in the DXL input stream).
 */

typedef enum
{
	DXLLOGOPTION_IGNORE=1,		/* ignore the action.  don't log anything and just continue */
	DXLLOGOPTION_WARNING=2,		/* log the problem as a warning */
	DXLLOGOPTION_ERROR=3,		/* log the problem as an error */
	DXLLOGOPTION_FATALERROR=4	/* log the problem as a fatal error */

} DXLLOGOPTION; 


/*
 *	DXL_IMPORT_PROPERTY default values are set as follows:
 *
 *			Note:	(i) = can input new value into the importer.
 *					(o) = can get current value out of importer.
 *					(io) = can do both. 
 *
 *		iACLImportOption					= (io) DXLIMPORTOPTION_IGNORE
 *		iDesignImportOption					= (io) DXLIMPORTOPTION_IGNORE
 *		iDocumentsImportOption				= (io) DXLIMPOROPTION_CREATE
 *		iCreateFullTextIndex				= (io) FALSE
 *		iReplaceDbProperties				= (io) FALSE
 *		iInputValidationOption				= (io) Xml_Validate_Auto
 *		iReplicaRequiredForReplaceOrUpdate	= (io) TRUE
 *		iExitOnFirstFatalError				= (io) TRUE
 *		iUnknownTokenLogOption				= (io) DXLLOGOPTION_FATALERROR
 *		iResultLogComment					= (io) NULLMEMHANDLE
 *		iResultLog							= (o)  NULLMEMHANDLE
 *		iImportedNoteList					= (o)  NULLHANDLE
 */

typedef enum
{
	iACLImportOption=1,			/* WORD, Assign to value defined in DXLIMPORTOPTION */
	iDesignImportOption=2,		/* WORD, Assign to value defined in DXLIMPORTOPTION */
	iDocumentsImportOption=3,	/* WORD, Assign to value defined in DXLIMPORTOPTION */
	iCreateFullTextIndex=4,		/* BOOL, TRUE = create full text index, FALSE Do NOT create full text index */
								/* In order to create FullTextIndex ReplaceDbProperties needs to be True */ 
								/* element <fulltextsettings> needs to exist in the Dxl */
	iReplaceDbProperties=5,		/* BOOL, TRUE = replace database properties, FALSE Do NOT replace database properties */
	iInputValidationOption=6,	/* Xml_Validation_Option, Values defined in Xml_Validation_Option, ...Validate_Never, ...Validate_Always, ...Validate_Auto */
	iReplicaRequiredForReplaceOrUpdate=7,	/* BOOL, TRUE = skip replace/update ops if target DB and import DXL do not have same replicaid's */
											/* ... FALSE = allow replace/update ops even if target DB and import DXL do not have same replicaid's */
	iExitOnFirstFatalError=8,	/* BOOL, TRUE = importer exits on first fatal error, FALSE = importer continues even if fatal error found */
	iUnknownTokenLogOption=9,	/* WORD, Assign to value defined in DXLLOGOPTION. Specifies what to do if DXL contains an unknown element or attribute */
	iResultLogComment=10,		/* char*(i)/MEMHANDLE(o)  LMBCS string to be added as comment to top of result log */  
	iResultLog=11,				/* MEMHANDLE, (readonly) The result log from the last import */
	iImportedNoteList=12		/* HANDLE, (readonly) An IDTABLE listing the notes imported by the last import operation */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -