TiXI  3.3.0
Validation Functions

Functions

DLL_EXPORT ReturnCode tixiSchemaValidateFromFile (const TixiDocumentHandle handle, const char *xsdFilename)
 Validate XML-document against an XML-schema. More...
 
DLL_EXPORT ReturnCode tixiSchemaValidateWithDefaultsFromFile (const TixiDocumentHandle handle, const char *xsdFilename)
 Validate XML-document against an XML-schema and insert missing default elements and attributes. More...
 
DLL_EXPORT ReturnCode tixiSchemaValidateFromString (const TixiDocumentHandle handle, const char *xsdString)
 Validate XML-document against an XML-schema. More...
 
DLL_EXPORT ReturnCode tixiDTDValidate (const TixiDocumentHandle handle, const char *DTDFilename)
 Validate XML-document against a DTD. More...
 

Detailed Description

Functions to validate document with respect to DTD or Schemas.

Function Documentation

DLL_EXPORT ReturnCode tixiDTDValidate ( const TixiDocumentHandle  handle,
const char *  DTDFilename 
)

Validate XML-document against a DTD.

Validates an XML-document against a DTD specified by DTDFilename. This routine is to be called after opening a document by tixiOpenDocument and before tixiSaveDocument if the validation against a DTD is desired for the input file and the output file, respectively.

Fortran syntax:

tixi_dtd_validate( integer handle, character*n dtd_filename, integer error )

Parameters
[in]DTDFilenamename of the DTD-file to be used
[in]handlehandle to the XML-document to be validated.
Returns
  • SUCCESS if the document is successfully validated
  • NOT_WELL_FORMED if the XML-document is not well formed
  • NOT_DTD_COMPLIANT if the XML-document is well-formed but validating against the given DTD fails
  • OPEN_DTD_FAILED if opening of the DTD-file failed
DLL_EXPORT ReturnCode tixiSchemaValidateFromFile ( const TixiDocumentHandle  handle,
const char *  xsdFilename 
)

Validate XML-document against an XML-schema.

Validates an XML-document against an XML-schema specified by xsdFilename. This routine should be called after opening a document by tixiOpenDocument and before tixiSaveDocument if the validation against an XML-schema is desired for the input file and the output file, respectively.

Fortran syntax:

tixi_schema_validate_from_file( integer handle, character*n xsd_filename, integer error )

Parameters
[in]xsdFilenamename of the XML-schema-file to be used.
[in]handlehandle to the XML-document.
Returns
  • SUCCESS if the document is successfully validated
  • NOT_WELL_FORMED if the XML-document is not well formed
  • NOT_SCHEMA_COMPLIANT if the XML-document is well-formed but validating against the given XML-schema fails
  • OPEN_SCHEMA_FAILED if opening of the XML-schema-file failed
  • FAILED for all internal errors
DLL_EXPORT ReturnCode tixiSchemaValidateFromString ( const TixiDocumentHandle  handle,
const char *  xsdString 
)

Validate XML-document against an XML-schema.

Validates an XML-document against an XML-schema specified by xsdString. This routine should be called after opening a document by tixiOpenDocument and before tixiSaveDocument if the validation against an XML-schema is desired for the input file and the output file, respectively. The complete schema has to be in the string xsdString before running this function.

Fortran syntax:

tixi_schema_validate_from_string( integer handle, character*n xsd_string, integer error )

Parameters
[in]xsdStringchar array witch is holding a schema.
[in]handlehandle to the XML-document.
Returns
  • SUCCESS if the document is successfully validated
  • NOT_WELL_FORMED if the XML-document is not well formed
  • NOT_SCHEMA_COMPLIANT if the XML-document is well-formed but validating against the given XML-schema fails
  • OPEN_SCHEMA_FAILED if opening of the XML-schema-file failed
  • FAILED for all internal errors
DLL_EXPORT ReturnCode tixiSchemaValidateWithDefaultsFromFile ( const TixiDocumentHandle  handle,
const char *  xsdFilename 
)

Validate XML-document against an XML-schema and insert missing default elements and attributes.

Validates an XML-document against an XML-schema specified by xsdFilename. This routine should be called after opening a document by tixiOpenDocument and before tixiSaveDocument if the validation against an XML-schema is desired for the input file and the output file, respectively. If the schema contains default values, these are added to the XML-document (which is not the case for tixiSchemaValidateFromFile).

Fortran syntax:

tixi_schema_validate_with_defaults_from_file( integer handle, character*n xsd_filename, integer error )

Parameters
[in]xsdFilenamename of the XML-schema-file to be used.
[in]handlehandle to the XML-document.
Returns
  • SUCCESS if the document is successfully validated
  • NOT_WELL_FORMED if the XML-document is not well formed
  • NOT_SCHEMA_COMPLIANT if the XML-document is well-formed but validating against the given XML-schema fails
  • OPEN_SCHEMA_FAILED if opening of the XML-schema-file failed
  • FAILED for all internal errors

Generated Tue Mar 8 2022 14:11:54, by Martin Siggel DLR