r1603 - dev/concept/moongoo

neocool at linuxfromscratch.org neocool at linuxfromscratch.org
Tue Nov 30 04:52:16 PST 2004


Author: neocool
Date: 2004-11-30 05:52:16 -0700 (Tue, 30 Nov 2004)
New Revision: 1603

Modified:
   dev/concept/moongoo/alfs.c
   dev/concept/moongoo/moongoo.c
Log:
Entity resolving


Modified: dev/concept/moongoo/alfs.c
===================================================================
--- dev/concept/moongoo/alfs.c	2004-11-30 02:02:46 UTC (rev 1602)
+++ dev/concept/moongoo/alfs.c	2004-11-30 12:52:16 UTC (rev 1603)
@@ -198,10 +198,12 @@
 	{
 		if (node->type==XML_ENTITY_REF_NODE)
 		{
-			printf("%s\n", node->parent->parent->parent->name);
-			//print_subtree(node->parent->children);
-			//node->prev->next=node->next->next;
-			//printf("%s %s\n", node->name, entity_val((char *)node->name));
+			// TODO: Resolve entities which are outside text nodes
+			if ((node->prev) && (node->prev->type==XML_TEXT_NODE) &&
+				(strcmp(node->prev->parent->name, "title")))
+			{
+				xmlNodeAddContent(node->prev, entity_val((char *)node->name));
+			}
 		}
 		resolve_entities(node->children);
 		node=node->next;

Modified: dev/concept/moongoo/moongoo.c
===================================================================
--- dev/concept/moongoo/moongoo.c	2004-11-30 02:02:46 UTC (rev 1602)
+++ dev/concept/moongoo/moongoo.c	2004-11-30 12:52:16 UTC (rev 1603)
@@ -18,8 +18,6 @@
 		return 1;
 	}
 	
-	// TODO: Resolving of entities
-	//xmlSubstituteEntitiesDefault(1);
 	doc=xmlParseFile(argv[1]);
 	if (!doc)
 		return 2;




More information about the alfs-log mailing list