Changeset 39 for trunk/include/helpers/xml.h
- Timestamp:
- Feb 23, 2001, 7:50:07 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/helpers/xml.h
r38 r39 52 52 // more than one declaration for an attribute type 53 53 ERROR_DOM_UNDECLARED_ATTRIBUTE, 54 ERROR_ELEMENT_CANNOT_HAVE_CONTENT, 55 // element was declared "empty" and contains text anyway, 56 // or was declared "children" and contains something other 57 // than whitespace 58 ERROR_DOM_INVALID_ATTRIB_VALUE, 59 ERROR_DOM_REQUIRED_ATTRIBUTE_MISSING, 60 ERROR_DOM_SUBELEMENT_IN_EMPTY_ELEMENT, 54 61 // END MATCHING ERROR MESSAGES (xmlDescribeError) 55 62 … … 60 67 // additional DOM errors 61 68 ERROR_DOM_NODETYPE_NOT_SUPPORTED, 62 // invalid node type in xmlCreate Node69 // invalid node type in xmlCreateDomNode 63 70 ERROR_DOM_NO_DOCUMENT, 64 71 // cannot find document node … … 80 87 typedef enum _NODEBASETYPE 81 88 { 89 TYPE_UNKNOWN, 90 82 91 DOMNODE_ELEMENT, // node is a DOM ELEMENT 83 92 DOMNODE_ATTRIBUTE, // node is a DOM ATTRIBUTE … … 219 228 NODEBASE NodeBase; 220 229 221 // PXSTRING pstrNodeName; // ptr is NULL if none222 230 PXSTRING pstrNodeValue; // ptr is NULL if none 223 231 … … 270 278 271 279 TREE *AttribDeclBasesTree; 272 // tree with pointers to _CMATTRIBUTEDE DECLBASE nodes280 // tree with pointers to _CMATTRIBUTEDECLBASE nodes 273 281 274 282 } DOMDOCTYPENODE, *PDOMDOCTYPENODE; … … 291 299 } DOMDOCUMENTNODE, *PDOMDOCUMENTNODE; 292 300 293 APIRET xmlCreateNode(PDOMNODE pParentNode, 294 ULONG ulNodeType, 295 PDOMNODE *ppNew); 296 297 ULONG xmlDeleteNode(PDOMNODE pNode); 301 APIRET xmlCreateDomNode(PDOMNODE pParentNode, 302 NODEBASETYPE ulNodeType, 303 const char *pcszNodeName, 304 ULONG ulNodeNameLength, 305 PDOMNODE *ppNew); 306 307 VOID xmlDeleteNode(PNODEBASE pNode); 298 308 299 309 /* ****************************************************************** … … 328 338 typedef struct _CMELEMENTPARTICLE 329 339 { 330 NODEBASE CMNode;// has TREE* as first item in turn331 // NODEBASE.ul CMNodeType may be one of these:340 NODEBASE NodeBase; // has TREE* as first item in turn 341 // NODEBASE.ulNodeType may be one of these: 332 342 // -- ELEMENTPARTICLE_EMPTY: 333 343 // ulRepeater will be XML_CQUANT_NONE, rest is NULL … … 354 364 // -- XML_CQUANT_PLUS 355 365 366 struct _CMELEMENTPARTICLE *pParentParticle; // or NULL if this is in the 367 // CMELEMENTDECLNODE 368 356 369 PLINKLIST pllSubNodes; 357 370 // linked list of sub-CMELEMENTPARTICLE structs … … 378 391 * 379 392 * For the "root" element declaration in the DTD, 380 * Particle.NODEBASE.ul CMNodeType will always be one of the following:393 * Particle.NODEBASE.ulNodeType will always be one of the following: 381 394 * 382 395 * -- ELEMENTPARTICLE_EMPTY: element must be empty. … … 438 451 *@@ CMATTRIBUTEDECL: 439 452 * single attribute declaration within the attribute 440 * declarations tree in _CMATTRIBUTEDE DECLBASE.453 * declarations tree in _CMATTRIBUTEDECLBASE. 441 454 * 442 455 *@@added V0.9.9 (2001-02-16) [umoeller] … … 445 458 typedef struct _CMATTRIBUTEDECL 446 459 { 447 NODEBASE CMNode; // has TREE* as first item in turn 448 // CMNode.strName is attribute name 449 450 // XSTRING strType; 460 NODEBASE NodeBase; // has TREE* as first item in turn 461 // NodeBase.strName is attribute name 451 462 452 463 ATTRIBTYPE ulAttrType; … … 463 474 TREE *ValuesTree; 464 475 // enumeration of allowed values, if CMAT_ENUM; 465 // tree entries are plain NODEBASEs 476 // tree entries are plain NODEBASEs with 477 // ATTRIBUTE_DECLARATION_ENUM type 466 478 467 479 ATTRIBCONSTRAINT ulConstraint; … … 479 491 480 492 /* 481 *@@ CMATTRIBUTEDE DECLBASE:493 *@@ CMATTRIBUTEDECLBASE: 482 494 * representation of an @attribute_declaration. 483 495 * … … 493 505 */ 494 506 495 typedef struct _CMATTRIBUTEDE DECLBASE496 { 497 NODEBASE CMNode; // has TREE* as first item in turn498 // CMNode.strName is element name507 typedef struct _CMATTRIBUTEDECLBASE 508 { 509 NODEBASE NodeBase; // has TREE* as first item in turn 510 // NodeBase.strName is element name 499 511 500 512 TREE *AttribDeclsTree; 501 513 // root of tree with CMATTRIBUTEDECL; 502 514 503 } CMATTRIBUTEDE DECLBASE, *PCMATTRIBUTEDEDECLBASE;515 } CMATTRIBUTEDECLBASE, *PCMATTRIBUTEDECLBASE; 504 516 505 517 /* … … 513 525 typedef struct _CMENTITYDECLNODE 514 526 { 515 NODEBASE CMNode;527 NODEBASE NodeBase; 516 528 } CMENTITYDECLNODE, *PCMENTITYDECLNODE; 517 529 … … 526 538 typedef struct _CMNOTATIONDECLNODE 527 539 { 528 NODEBASE CMNode;540 NODEBASE NodeBase; 529 541 } CMNOTATIONDECLNODE, *PCMNOTATIONDECLNODE; 530 542 … … 568 580 // expat parser instance 569 581 570 LINKLIST ll Stack;582 LINKLIST llElementStack; 571 583 // stack for maintaining the current items; 572 // these point to the NODERECORDs (noauto-free)584 // these point to DOMSTACKITEMs (auto-free) 573 585 574 586 PDOMNODE pLastWasTextNode; 575 587 576 PCMATTRIBUTEDE DECLBASE pAttListDeclCache;588 PCMATTRIBUTEDECLBASE pAttListDeclCache; 577 589 // cache for attribute declarations according 578 590 // to attdecl element name … … 595 607 const XSTRING *pstrElementName); 596 608 597 PCMATTRIBUTEDE DECLBASE xmlFindAttribDeclBase(PXMLDOM pDom,609 PCMATTRIBUTEDECLBASE xmlFindAttribDeclBase(PXMLDOM pDom, 598 610 const XSTRING *pstrElementName); 599 611 600 612 PCMATTRIBUTEDECL xmlFindAttribDecl(PXMLDOM pDom, 601 613 const XSTRING *pstrElementName, 602 const XSTRING *pstrAttribName); 614 const XSTRING *pstrAttribName, 615 PCMATTRIBUTEDECLBASE *ppAttribDeclBase); 603 616 604 617 #endif
Note:
See TracChangeset
for help on using the changeset viewer.