Mozilla/mozilla/layout/xml/content/src/nsGenericXMLElement.h
jst%netscape.com 2b2767bff4 Updating the DOM Node interface to match the DOM Level 2 interface, only stub implemetations so far.
git-svn-id: svn://10.0.0.236/trunk@64881 18797224-902f-48f8-a5cc-f745e15eee43
2000-04-01 13:31:23 +00:00

99 lines
3.4 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is Mozilla Communicator client code.
*
* The Initial Developer of the Original Code is Netscape Communications
* Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#ifndef nsGenericXMLElement_h___
#define nsGenericXMLElement_h___
#include "nsGenericElement.h"
#include "nsIDOMHTMLElement.h"
#include "nsIContent.h"
#include "nsVoidArray.h"
#include "nsIJSScriptObject.h"
#include "nsINameSpaceManager.h" // for kNameSpaceID_HTML
#include "nsINameSpace.h"
class nsGenericXMLElement : public nsGenericContainerElement {
public:
nsGenericXMLElement();
~nsGenericXMLElement();
nsresult CopyInnerTo(nsIContent* aSrcContent,
nsGenericXMLElement* aDest,
PRBool aDeep);
nsresult GetNamespaceURI(nsString& aNamespaceURI);
nsresult GetPrefix(nsString& aPrefix);
nsresult SetPrefix(const nsString& aPrefix);
nsresult GetLocalName(nsString& aLocalName);
nsresult Supports(const nsString& aFeature, const nsString& aVersion,
PRBool* aReturn);
// Implementation for nsIDOMElement
nsresult GetAttribute(const nsString& aName, nsString& aReturn)
{
return nsGenericContainerElement::GetAttribute(aName, aReturn);
}
nsresult SetAttribute(const nsString& aName, const nsString& aValue)
{
return nsGenericContainerElement::SetAttribute(aName, aValue);
}
// nsIContent
nsresult SetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsString& aValue,
PRBool aNotify)
{
return nsGenericContainerElement::SetAttribute(aNameSpaceID, aName,
aValue, aNotify);
}
nsresult GetAttribute(PRInt32 aNameSpaceID, nsIAtom* aName,
nsString& aResult) const
{
return nsGenericContainerElement::GetAttribute(aNameSpaceID, aName,
aResult);
}
nsresult ParseAttributeString(const nsString& aStr,
nsIAtom*& aName,
PRInt32& aNameSpaceID);
nsresult GetNameSpacePrefixFromId(PRInt32 aNameSpaceID,
nsIAtom*& aPrefix);
// nsIXMLContent
nsresult SetContainingNameSpace(nsINameSpace* aNameSpace);
nsresult GetContainingNameSpace(nsINameSpace*& aNameSpace) const;
nsresult SetNameSpacePrefix(nsIAtom* aNameSpace);
nsresult GetNameSpacePrefix(nsIAtom*& aNameSpace) const;
nsresult SetNameSpaceID(PRInt32 aNameSpaceId);
nsresult GetNameSpaceID(PRInt32& aNameSpaceID) const;
// nsIScriptObjectOwner
nsresult GetScriptObject(nsIScriptContext* aContext,
void** aScriptObject);
nsINameSpace* mNameSpace;
nsIAtom* mNameSpacePrefix;
PRInt32 mNameSpaceID;
};
#endif /* nsGenericXMLElement_h__ */