cvs commit: ALFS/nALFS/src libXML-tree.c

kpfleming at linuxfromscratch.org kpfleming at linuxfromscratch.org
Sat Feb 28 19:32:14 PST 2004


kpfleming    04/02/28 20:32:14

  Modified:    nALFS/src libXML-tree.c
  Log:
  call handler's valid_child function before completing child parsing, in case it will be ignored
  
  Revision  Changes    Path
  1.16      +9 -10     ALFS/nALFS/src/libXML-tree.c
  
  Index: libXML-tree.c
  ===================================================================
  RCS file: /home/cvsroot/ALFS/nALFS/src/libXML-tree.c,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- libXML-tree.c	29 Feb 2004 03:30:00 -0000	1.15
  +++ libXML-tree.c	29 Feb 2004 03:32:14 -0000	1.16
  @@ -238,6 +238,15 @@
   	handler_info_s *parent = element->parent->handler;
   	int result;
   
  +	/* If the element's parent wants to validate its children */
  +	if (parent->valid_child) {
  +		result = parent->valid_child(element->parent, element);
  +		if (!result) {
  +			Nprint_warn("<%s>: <%s> not valid here.", parent->name, handler->name);
  +			return -1;
  +		}
  +	}
  +
   	if (handler->setup && ((result = handler->setup(element)) == 0)) {
   		result = parse_node_attributes(node, element);
   		if (result)
  @@ -272,16 +281,6 @@
   			result = handler->valid_data(element);
   			if (!result)
   				return -1;
  -		}
  -
  -	}
  -
  -	/* If the element's parent wants to validate its children */
  -	if (parent->valid_child) {
  -		result = parent->valid_child(element->parent, element);
  -		if (!result) {
  -			Nprint_warn("<%s>: <%s> not valid here.", parent->name, handler->name);
  -			return -1;
   		}
   	}
   
  
  
  



More information about the alfs-log mailing list