diff options
Diffstat (limited to 'relaxng.c')
-rw-r--r-- | relaxng.c | 105 |
1 files changed, 52 insertions, 53 deletions
@@ -39,10 +39,9 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *) "http://relaxng.org/ns/structure/1.0"; -#define IS_RELAXNG(node, typ) \ +#define IS_RELAXNG(node, type) \ ((node != NULL) && (node->ns != NULL) && \ - (node->type == XML_ELEMENT_NODE) && \ - (xmlStrEqual(node->name, (const xmlChar *) typ)) && \ + (xmlStrEqual(node->name, (const xmlChar *) type)) && \ (xmlStrEqual(node->ns->href, xmlRelaxNGNs))) @@ -61,7 +60,7 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *) #define DEBUG_LIST 1 -#define DEBUG_INCLUDE 1 +#define DEBUG_INCLUDE 1 #define DEBUG_ERROR 1 @@ -72,7 +71,7 @@ static const xmlChar *xmlRelaxNGNs = (const xmlChar *) #define MAX_ERROR 5 -#define TODO \ +#define TODO \ xmlGenericError(xmlGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); @@ -422,7 +421,7 @@ struct _xmlRelaxNGDocument { /************************************************************************ * * - * Some factorized error routines * + * Some factorized error routines * * * ************************************************************************/ @@ -565,9 +564,9 @@ xmlRngVErr(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node, int error, } /************************************************************************ - * * - * Preliminary type checking interfaces * - * * + * * + * Preliminary type checking interfaces * + * * ************************************************************************/ /** @@ -655,9 +654,9 @@ struct _xmlRelaxNGTypeLibrary { }; /************************************************************************ - * * - * Allocation functions * - * * + * * + * Allocation functions * + * * ************************************************************************/ static void xmlRelaxNGFreeGrammar(xmlRelaxNGGrammarPtr grammar); static void xmlRelaxNGFreeDefine(xmlRelaxNGDefinePtr define); @@ -1398,9 +1397,9 @@ xmlRelaxNGFreeValidState(xmlRelaxNGValidCtxtPtr ctxt, } /************************************************************************ - * * - * Semi internal functions * - * * + * * + * Semi internal functions * + * * ************************************************************************/ /** @@ -1430,9 +1429,9 @@ xmlRelaxParserSetFlag(xmlRelaxNGParserCtxtPtr ctxt, int flags) } /************************************************************************ - * * - * Document functions * - * * + * * + * Document functions * + * * ************************************************************************/ static xmlDocPtr xmlRelaxNGCleanupDoc(xmlRelaxNGParserCtxtPtr ctxt, xmlDocPtr doc); @@ -2008,9 +2007,9 @@ xmlRelaxNGLoadExternalRef(xmlRelaxNGParserCtxtPtr ctxt, } /************************************************************************ - * * - * Error functions * - * * + * * + * Error functions * + * * ************************************************************************/ #define VALID_ERR(a) xmlRelaxNGAddValidError(ctxt, a, NULL, NULL, 0); @@ -2361,7 +2360,7 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt, * generate the error directly */ if (((ctxt->flags & FLAGS_IGNORABLE) == 0) || - (ctxt->flags & FLAGS_NEGATIVE)) { + (ctxt->flags & FLAGS_NEGATIVE)) { xmlNodePtr node, seq; /* @@ -2391,9 +2390,9 @@ xmlRelaxNGAddValidError(xmlRelaxNGValidCtxtPtr ctxt, /************************************************************************ - * * - * Type library hooks * - * * + * * + * Type library hooks * + * * ************************************************************************/ static xmlChar *xmlRelaxNGNormalize(xmlRelaxNGValidCtxtPtr ctxt, const xmlChar * str); @@ -2848,12 +2847,12 @@ xmlRelaxNGCleanupTypes(void) } /************************************************************************ - * * - * Compiling element content into regexp * - * * + * * + * Compiling element content into regexp * + * * * Sometime the element content can be compiled into a pure regexp, * * This allows a faster execution and streamability at that level * - * * + * * ************************************************************************/ /* from automata.c but not exported */ @@ -3326,9 +3325,9 @@ xmlRelaxNGTryCompile(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGDefinePtr def) } /************************************************************************ - * * - * Parsing functions * - * * + * * + * Parsing functions * + * * ************************************************************************/ static xmlRelaxNGDefinePtr xmlRelaxNGParseAttribute(xmlRelaxNGParserCtxtPtr @@ -6706,9 +6705,9 @@ xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node) } /************************************************************************ - * * - * Reading RelaxNGs * - * * + * * + * Reading RelaxNGs * + * * ************************************************************************/ /** @@ -7522,7 +7521,7 @@ xmlRelaxNGParse(xmlRelaxNGParserCtxtPtr ctxt) xmlRngPErr(ctxt, (xmlNodePtr) doc, XML_RNGP_EMPTY, "xmlRelaxNGParse: %s is empty\n", (ctxt->URL ? ctxt->URL : BAD_CAST "schemas"), NULL); - + xmlFreeDoc(ctxt->document); ctxt->document = NULL; return (NULL); @@ -7664,9 +7663,9 @@ xmlRelaxNGSetParserStructuredErrors(xmlRelaxNGParserCtxtPtr ctxt, #ifdef LIBXML_OUTPUT_ENABLED /************************************************************************ - * * - * Dump back a compiled form * - * * + * * + * Dump back a compiled form * + * * ************************************************************************/ static void xmlRelaxNGDumpDefine(FILE * output, xmlRelaxNGDefinePtr define); @@ -7807,7 +7806,7 @@ xmlRelaxNGDumpDefine(FILE * output, xmlRelaxNGDefinePtr define) * xmlRelaxNGDumpGrammar: * @output: the file output * @grammar: a grammar structure - * @top: is this a top grammar + * @top: is this a top grammar * * Dump a RelaxNG structure back */ @@ -7900,9 +7899,9 @@ xmlRelaxNGDumpTree(FILE * output, xmlRelaxNGPtr schema) #endif /* LIBXML_OUTPUT_ENABLED */ /************************************************************************ - * * - * Validation of compiled content * - * * + * * + * Validation of compiled content * + * * ************************************************************************/ static int xmlRelaxNGValidateDefinition(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGDefinePtr define); @@ -8045,9 +8044,9 @@ xmlRelaxNGValidateCompiledContent(xmlRelaxNGValidCtxtPtr ctxt, } /************************************************************************ - * * - * Progressive validation of when possible * - * * + * * + * Progressive validation of when possible * + * * ************************************************************************/ static int xmlRelaxNGValidateAttributeList(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGDefinePtr defines); @@ -8347,7 +8346,7 @@ xmlRelaxNGValidatePushElement(xmlRelaxNGValidCtxtPtr ctxt, * xmlRelaxNGValidatePushCData: * @ctxt: the RelaxNG validation context * @data: some character data read - * @len: the length of the data + * @len: the lenght of the data * * check the CData parsed for validation in the current stack * @@ -8481,9 +8480,9 @@ xmlRelaxNGValidateFullElement(xmlRelaxNGValidCtxtPtr ctxt, } /************************************************************************ - * * - * Generic interpreted validation implementation * - * * + * * + * Generic interpreted validation implementation * + * * ************************************************************************/ static int xmlRelaxNGValidateValue(xmlRelaxNGValidCtxtPtr ctxt, xmlRelaxNGDefinePtr define); @@ -10843,9 +10842,9 @@ xmlRelaxNGCleanPSVI(xmlNodePtr node) { return; } /************************************************************************ - * * - * Validation interfaces * - * * + * * + * Validation interfaces * + * * ************************************************************************/ /** |