[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-cvs
Subject: cvs commit: xml-xerces/c/src/parsers DOMParser.cpp
From: abagchi () locus ! apache ! org
Date: 2000-03-24 21:25:29
[Download RAW message or body]
abagchi 00/03/24 13:25:29
Modified: c/src/parsers DOMParser.cpp
Log:
Added getElementById() from patch submitted by Jeff Lewis
Revision Changes Path
1.14 +20 -8 xml-xerces/c/src/parsers/DOMParser.cpp
Index: DOMParser.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/parsers/DOMParser.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- DOMParser.cpp 2000/03/24 01:31:12 1.13
+++ DOMParser.cpp 2000/03/24 21:25:28 1.14
@@ -60,6 +60,9 @@
* are created and added to the DOM tree.
*
* $Log: DOMParser.cpp,v $
+* Revision 1.14 2000/03/24 21:25:28 abagchi
+* Added getElementById() from patch submitted by Jeff Lewis
+*
* Revision 1.13 2000/03/24 01:31:12 chchou
* Fix bug #8 to support ignorable whitespace text nodes
*
@@ -160,8 +163,8 @@
fNodeStack = new ValueStackOf<DOM_Node>(64);
this->reset();
-
-
+
+
}
@@ -272,7 +275,7 @@
fScanner->scanDocument(source, reuseValidator);
fParseInProgress = false;
}
-
+
catch(...)
{
fParseInProgress = false;
@@ -425,7 +428,6 @@
}
-
// ---------------------------------------------------------------------------
// DOMParser: Implementation of XMLEntityHandler interface
// ---------------------------------------------------------------------------
@@ -600,16 +602,26 @@
namespaceURI = DOMString(buf.getRawBuffer());
}
AttrImpl *attr = elemImpl->setAttributeNS(namespaceURI, oneAttrib -> getQName(),
- oneAttrib -> getValue());
+ oneAttrib -> getValue());
+ // Register identifiers
+ if (oneAttrib->getType()==XMLAttDef::ID)
+ {
+ fDocument.putIdentifier(oneAttrib->getValue(), elem);
+ }
attr->setSpecified(oneAttrib->getSpecified());
}
} else { //DOM Level 1
elem = fDocument.createElement(elemDecl.getFullName());
ElementImpl *elemImpl = (ElementImpl *) elem.fImpl;
for (unsigned int index = 0; index < attrCount; ++index) {
- const XMLAttr* oneAttrib = attrList.elementAt(index);
- AttrImpl *attr = elemImpl->setAttribute(oneAttrib->getName(), oneAttrib->getValue());
- attr->setSpecified(oneAttrib->getSpecified());
+ const XMLAttr* oneAttrib = attrList.elementAt(index);
+ AttrImpl *attr = elemImpl->setAttribute(oneAttrib->getName(), oneAttrib->getValue());
+ // Register identifiers
+ if (oneAttrib->getType()==XMLAttDef::ID)
+ {
+ fDocument.putIdentifier(oneAttrib->getValue(), elem);
+ }
+ attr->setSpecified(oneAttrib->getSpecified());
}
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic