fred-mod-eppd
Macros | Enumerations | Functions
/build/mod-eppd-2.21.1/epp_xmlcommon.h File Reference
#include <libxml/tree.h>
#include <libxml/xmlschemas.h>
Include dependency graph for epp_xmlcommon.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NS_EPP   "urn:ietf:params:xml:ns:epp-1.0"
 
#define NS_CONTACT   "http://www.nic.cz/xml/epp/contact-1.6"
 
#define NS_DOMAIN   "http://www.nic.cz/xml/epp/domain-1.4"
 
#define NS_NSSET   "http://www.nic.cz/xml/epp/nsset-1.2"
 
#define NS_KEYSET   "http://www.nic.cz/xml/epp/keyset-1.3"
 
#define NS_FRED   "http://www.nic.cz/xml/epp/fred-1.5"
 
#define NS_ENUMVAL   "http://www.nic.cz/xml/epp/enumval-1.2"
 
#define NS_EXTRAADDR   "http://www.nic.cz/xml/epp/extra-addr-1.0"
 
#define LOC_EPP   NS_EPP " epp-1.0.xsd"
 
#define LOC_CONTACT   NS_CONTACT " contact-1.6.4.xsd"
 
#define LOC_DOMAIN   NS_DOMAIN " domain-1.4.1.xsd"
 
#define LOC_NSSET   NS_NSSET " nsset-1.2.1.xsd"
 
#define LOC_KEYSET   NS_KEYSET " keyset-1.3.1.xsd"
 
#define LOC_FRED   NS_FRED " fred-1.5.0.xsd"
 
#define LOC_ENUMVAL   NS_ENUMVAL " enumval-1.2.0.xsd"
 
#define LOC_EXTRAADDR   NS_EXTRAADDR " extra-addr-1.0.xsd"
 

Enumerations

enum  valid_status { VAL_OK, VAL_NOT_VALID, VAL_ESCHEMA, VAL_EINTERNAL }
 

Functions

valid_status validate_doc (void *pool, xmlSchemaPtr schema, xmlDocPtr doc, qhead *err_list)
 
char * epp_getSubtree (void *pool, epp_command_data *cdata, const char *xpath_expr, int position)
 

Detailed Description

This file gathers declarations common to both libxml components (parser and generator).

Macro Definition Documentation

◆ LOC_CONTACT

#define LOC_CONTACT   NS_CONTACT " contact-1.6.4.xsd"

Namespace + location of contact xml schema

◆ LOC_DOMAIN

#define LOC_DOMAIN   NS_DOMAIN " domain-1.4.1.xsd"

Namespace + location of domain xml schema

◆ LOC_ENUMVAL

#define LOC_ENUMVAL   NS_ENUMVAL " enumval-1.2.0.xsd"

Namespace + location of enumval xml schema

◆ LOC_EPP

#define LOC_EPP   NS_EPP " epp-1.0.xsd"

Namespace + location of epp xml schema

◆ LOC_EXTRAADDR

#define LOC_EXTRAADDR   NS_EXTRAADDR " extra-addr-1.0.xsd"

Namespace + location of extraaddr xml schema

◆ LOC_FRED

#define LOC_FRED   NS_FRED " fred-1.5.0.xsd"

Namespace + location of fred xml schema

◆ LOC_KEYSET

#define LOC_KEYSET   NS_KEYSET " keyset-1.3.1.xsd"

Namespace + location of keyset xml schema

◆ LOC_NSSET

#define LOC_NSSET   NS_NSSET " nsset-1.2.1.xsd"

Namespace + location of nsset xml schema

◆ NS_CONTACT

#define NS_CONTACT   "http://www.nic.cz/xml/epp/contact-1.6"

Our custom namespace used for contact object

◆ NS_DOMAIN

#define NS_DOMAIN   "http://www.nic.cz/xml/epp/domain-1.4"

Our custom namespace used for domain object

◆ NS_ENUMVAL

#define NS_ENUMVAL   "http://www.nic.cz/xml/epp/enumval-1.2"

Our custom namespace used for enum validation extension

◆ NS_EPP

#define NS_EPP   "urn:ietf:params:xml:ns:epp-1.0"

Standard EPP xml namespace

◆ NS_EXTRAADDR

#define NS_EXTRAADDR   "http://www.nic.cz/xml/epp/extra-addr-1.0"

Our custom namespace used for extra contact address extension

◆ NS_FRED

#define NS_FRED   "http://www.nic.cz/xml/epp/fred-1.5"

Our custom namespace used for extensions definition

◆ NS_KEYSET

#define NS_KEYSET   "http://www.nic.cz/xml/epp/keyset-1.3"

Our custom namespace used for keyset object

◆ NS_NSSET

#define NS_NSSET   "http://www.nic.cz/xml/epp/nsset-1.2"

Our custom namespace used for nsset object

Enumeration Type Documentation

◆ valid_status

Enumaration of statuses returned by validator.

Enumerator
VAL_OK 

Document is valid.

VAL_NOT_VALID 

Document does not validate.

VAL_ESCHEMA 

Error when loading or parsing schema.

VAL_EINTERNAL 

Internal error (malloc failed).

Function Documentation

◆ epp_getSubtree()

char* epp_getSubtree ( void *  pool,
epp_command_data cdata,
const char *  xpath_expr,
int  position 
)

Get subtree of XML document based on xpath expression.

If there is no node matching xpath expression at appropriate position, empty string is returned. In case of internal error NULL is returned.

Parameters
poolPool for memory allocations.
cdataStructure containing xpath context and parsed document.
xpath_exprXPath expression which identifies element.
positionPoradi elementu v mnozine pasujicich elementu.
Returns
String with resulting subtree allocated from pool.

◆ validate_doc()

valid_status validate_doc ( void *  pool,
xmlSchemaPtr  schema,
xmlDocPtr  doc,
qhead err_list 
)

Function for validating xml document.

Parameters
poolPool to allocate memory from.
schemaSchema used for validation.
docXML document.
err_listInitialized and empty list for storing encountered errors.
Returns
Status.