gareth      2002/11/21 06:19:36

  Modified:    c/src/xercesc/dom DOMAttr.hpp
               c/src/xercesc/dom/impl DOMAttrImpl.cpp DOMAttrImpl.hpp
  Log:
  Implemented isId from DOM level 3 core. Patch by myself and Jennifer "Georgina" 
Schachter.
  
  Revision  Changes    Path
  1.6       +16 -1     xml-xerces/c/src/xercesc/dom/DOMAttr.hpp
  
  Index: DOMAttr.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/DOMAttr.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DOMAttr.hpp       4 Nov 2002 15:09:24 -0000       1.5
  +++ DOMAttr.hpp       21 Nov 2002 14:19:36 -0000      1.6
  @@ -176,6 +176,21 @@
       virtual DOMElement     *getOwnerElement() const = 0;
       //@}
   
  +    /** @name Functions introduced in DOM Level 3. */
  +    //@{
  +    /**
  +     * Returns whether this attribute is known to be of type ID or not. 
  +     * When it is and its value is unique, the ownerElement of this attribute 
  +     * can be retrieved using getElementById on Document.
  +     *
  +     * <p><b>"Experimental - subject to change"</b></p>
  +     *
  +     * @return <code>bool</code> stating if this <code>DOMAttr</code> is an ID
  +     * @since DOM level 3
  +     */
  +    virtual bool            isId() const = 0;
  +    //@}
  +
   };
   
   XERCES_CPP_NAMESPACE_END
  
  
  
  1.14      +5 -0      xml-xerces/c/src/xercesc/dom/impl/DOMAttrImpl.cpp
  
  Index: DOMAttrImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMAttrImpl.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DOMAttrImpl.cpp   21 Nov 2002 14:17:55 -0000      1.13
  +++ DOMAttrImpl.cpp   21 Nov 2002 14:19:36 -0000      1.14
  @@ -273,6 +273,11 @@
   }
   
   
  +bool DOMAttrImpl::isId() const {
  +    return fNode.isIdAttr();
  +}
  +
  +
   DOMNode* DOMAttrImpl::rename(const XMLCh* namespaceURI, const XMLCh* name)
   {
       DOMElement* el = getOwnerElement();
  
  
  
  1.7       +1 -0      xml-xerces/c/src/xercesc/dom/impl/DOMAttrImpl.hpp
  
  Index: DOMAttrImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMAttrImpl.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DOMAttrImpl.hpp   21 Nov 2002 14:17:55 -0000      1.6
  +++ DOMAttrImpl.hpp   21 Nov 2002 14:19:36 -0000      1.7
  @@ -103,6 +103,7 @@
       virtual const XMLCh * getValue() const;
       virtual void setSpecified(bool arg);
       virtual void setValue(const XMLCh * value);
  +    virtual bool isId() const;
   
       //Introduced in DOM Level 2
       DOMElement *getOwnerElement() const;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to