Skip to content

Commit

Permalink
Changed the internals a lot for DOM, entity support, slight changes o…
Browse files Browse the repository at this point in the history
…f API,

more (if not all) formating of function comments, started documentation, Daniel.
  • Loading branch information
Daniel Veillard committed Oct 27, 1998
1 parent 11e0058 commit ccb0963
Show file tree
Hide file tree
Showing 23 changed files with 1,067 additions and 219 deletions.
11 changes: 11 additions & 0 deletions ChangeLog
@@ -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.
Expand Down
15 changes: 6 additions & 9 deletions SAX.c
Expand Up @@ -8,6 +8,7 @@
#include <stdlib.h>
#include "tree.h"
#include "parser.h"
#include "entities.h"
#include "error.h"

/* #define DEBUG_SAX */
Expand Down Expand Up @@ -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)
Expand All @@ -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);
}

Expand Down Expand Up @@ -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);

}

/**
Expand Down Expand Up @@ -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);
}

/**
Expand Down
64 changes: 64 additions & 0 deletions doc/DOM.fig
@@ -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
Binary file added doc/DOM.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ccb0963

Please sign in to comment.