Permalink
Browse files

Changed the internals a lot for DOM, entity support, slight changes o…

…f API,

more (if not all) formating of function comments, started documentation, Daniel.
  • Loading branch information...
1 parent 11e0058 commit ccb096379ac43c44755023007ee1dc9e61fbeec7 Daniel Veillard committed Oct 27, 1998
Showing with 1,067 additions and 219 deletions.
  1. +11 −0 ChangeLog
  2. +6 −9 SAX.c
  3. +64 −0 doc/DOM.fig
  4. BIN doc/DOM.gif
  5. +303 −0 doc/structure.fig
  6. BIN doc/structure.gif
  7. +78 −0 doc/xml.html
  8. +1 −1 encoding.c
  9. +23 −0 entities.c
  10. +5 −1 entities.h
  11. +5 −1 include/libxml/entities.h
  12. +2 −0 include/libxml/parser.h
  13. +34 −21 include/libxml/tree.h
  14. +191 −123 parser.c
  15. +2 −0 parser.h
  16. +1 −2 result/ent1
  17. +2 −3 result/ent2
  18. +1 −1 result/ent3
  19. +7 −0 result/ent4
  20. +1 −1 result/p3p
  21. +8 −0 test/ent4
  22. +288 −35 tree.c
  23. +34 −21 tree.h
View
@@ -1,3 +1,14 @@
+Tue Oct 27 01:15:39 EST 1998 Daniel Veillard <Daniel.Veillard@w3.org>
+
+ * parser.[ch] SAX.c tree.[ch]: large amount of changes to improve
+ entity support and provide an internal representation close to
+ DOM one (entity ref nodes, and attribute value as tree). I tried
+ to preserve the interface but this will surely break some apps
+ (I have to change rpm2html/rpmfind for example). I had to change
+ two interfaces, and the generated tree is somewhat different.
+ * doc/* : started documenting the XML library, the tree and
+ DOM/Corba. This is a first step.
+
Sat Oct 24 14:23:51 EDT 1998 Daniel Veillard <Daniel.Veillard@w3.org>
* parser.c: Set up the fonctions comment block, boring but useful.
View
15 SAX.c
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include "tree.h"
#include "parser.h"
+#include "entities.h"
#include "error.h"
/* #define DEBUG_SAX */
@@ -85,8 +86,11 @@ xmlSAXLocator xmlDefaultSAXLocator = {
*
* Special entity resolver, better left to the parser, it has
* more context than the application layer.
+ * The default behaviour is to NOT resolve the entities, in that case
+ * the ENTITY_REF nodes are built in the structure (and the parameter
+ * values).
*
- * return values: an int
+ * return values: the xmlParserInputPtr if inlined or NULL for DOM behaviour.
*/
xmlParserInputPtr
resolveEntity(xmlParserCtxtPtr ctxt, const CHAR *publicId, const CHAR *systemId)
@@ -95,6 +99,7 @@ resolveEntity(xmlParserCtxtPtr ctxt, const CHAR *publicId, const CHAR *systemId)
#ifdef DEBUG_SAX
fprintf(stderr, "SAX.resolveEntity(%s, %s)\n", publicId, systemId);
#endif
+
return(NULL);
}
@@ -206,16 +211,9 @@ endDocument(xmlParserCtxtPtr ctxt)
void
startElement(xmlParserCtxtPtr ctxt, const CHAR *name)
{
- xmlNodePtr parent;
-
#ifdef DEBUG_SAX
fprintf(stderr, "SAX.startElement(%s)\n", name);
#endif
- if (ctxt->nodeNr < 2) return;
- parent = ctxt->nodeTab[ctxt->nodeNr - 2];
- if (parent != NULL)
- xmlAddChild(parent, ctxt->node);
-
}
/**
@@ -254,7 +252,6 @@ attribute(xmlParserCtxtPtr ctxt, const CHAR *name, const CHAR *value)
#ifdef DEBUG_SAX
fprintf(stderr, "SAX.attribute(%s, %s)\n", name, value);
#endif
- xmlNewProp(ctxt->node, name, value);
}
/**
View
@@ -0,0 +1,64 @@
+#FIG 3.2
+Landscape
+Center
+Inches
+Letter
+100.00
+Single
+-2
+1200 2
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 825 1125 2625 1125 2625 3375 825 3375 825 1125
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 4125 1125 5925 1125 5925 3375 4125 3375 4125 1125
+2 4 0 1 0 7 0 0 -1 0.000 0 0 7 0 0 5
+ 2025 3075 2025 1650 1050 1650 1050 3075 2025 3075
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 1425 1875 1575 1875 1575 2025 1425 2025 1425 1875
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 1200 2175 1350 2175 1350 2325 1200 2325 1200 2175
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 1500 2175 1650 2175 1650 2325 1500 2325 1500 2175
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 1800 2175 1950 2175 1950 2325 1800 2325 1800 2175
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 1500 2475 1650 2475 1650 2625 1500 2625 1500 2475
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 1725 2700 1875 2700 1875 2850 1725 2850 1725 2700
+2 2 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 5
+ 1275 2700 1425 2700 1425 2850 1275 2850 1275 2700
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+ 1500 2025 1350 2175
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+ 1500 2025 1575 2175
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+ 1500 2025 1875 2175
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+ 1575 2325 1575 2475
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+ 1650 2625 1725 2700
+2 1 0 1 0 7 0 0 -1 0.000 0 0 -1 0 0 2
+ 1500 2625 1425 2700
+2 3 0 2 0 7 0 0 -1 6.000 0 0 -1 0 0 5
+ 2550 1725 2175 1950 2175 2850 2550 3075 2550 1725
+2 3 0 2 0 7 0 0 -1 6.000 0 0 -1 0 0 5
+ 4575 1725 4200 1950 4200 2850 4575 3075 4575 1725
+2 2 0 1 0 7 0 0 -1 4.000 0 0 -1 0 0 5
+ 2700 2025 4050 2025 4050 2775 2700 2775 2700 2025
+2 1 0 2 0 7 0 0 -1 6.000 0 0 -1 0 0 2
+ 5025 2025 4575 2175
+2 1 1 2 0 7 0 0 -1 6.000 0 0 -1 1 0 3
+ 1 1 2.00 120.00 240.00
+ 4575 2175 4200 2250 2025 2250
+2 1 1 2 0 7 0 0 -1 6.000 0 0 -1 0 0 3
+ 2025 2475 4200 2475 4575 2550
+2 1 0 2 0 7 0 0 -1 6.000 0 0 -1 1 0 2
+ 1 1 2.00 120.00 240.00
+ 4575 2550 5025 2625
+4 0 0 0 0 0 18 0.0000 4 255 1155 1050 825 Program 1\001
+4 0 0 0 0 0 18 0.0000 4 255 1155 4425 900 Program 2\001
+4 0 0 0 0 0 18 0.0000 4 195 585 1350 1500 XML\001
+4 0 0 0 0 0 18 0.0000 4 195 975 3000 3075 CORBA\001
+4 0 0 0 0 0 18 0.0000 4 195 735 3000 3375 ORBit\001
+4 0 0 0 0 0 18 0.0000 4 195 1395 2175 1575 DOM server\001
+4 0 0 0 0 0 18 0.0000 4 195 1335 4200 1650 DOM client\001
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit ccb0963

Please sign in to comment.