1998-11-11 22:06:16 +00:00
|
|
|
/* -*- 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.0 (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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef nsXMLDocument_h___
|
|
|
|
#define nsXMLDocument_h___
|
|
|
|
|
|
|
|
#include "nsMarkupDocument.h"
|
|
|
|
#include "nsIXMLDocument.h"
|
1998-11-12 07:54:12 +00:00
|
|
|
#include "nsIHTMLContentContainer.h"
|
1998-11-11 22:06:16 +00:00
|
|
|
|
|
|
|
class nsIParser;
|
1999-01-19 23:07:33 +00:00
|
|
|
class nsIDOMNode;
|
|
|
|
|
1998-11-11 22:06:16 +00:00
|
|
|
|
|
|
|
class nsXMLDocument : public nsMarkupDocument,
|
1998-11-12 07:54:12 +00:00
|
|
|
public nsIXMLDocument,
|
|
|
|
public nsIHTMLContentContainer
|
1998-11-11 22:06:16 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
nsXMLDocument();
|
|
|
|
virtual ~nsXMLDocument();
|
|
|
|
|
|
|
|
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
|
|
|
|
|
|
|
|
NS_IMETHOD_(nsrefcnt) AddRef(void);
|
|
|
|
NS_IMETHOD_(nsrefcnt) Release(void);
|
|
|
|
|
1999-05-11 20:22:35 +00:00
|
|
|
NS_IMETHOD GetContentType(nsString& aContentType) const;
|
|
|
|
|
1998-11-11 22:06:16 +00:00
|
|
|
NS_IMETHOD StartDocumentLoad(nsIURL *aUrl,
|
|
|
|
nsIContentViewerContainer* aContainer,
|
|
|
|
nsIStreamListener **aDocListener,
|
1998-11-12 07:54:12 +00:00
|
|
|
const char* aCommand);
|
1998-11-11 22:06:16 +00:00
|
|
|
|
|
|
|
NS_IMETHOD EndLoad();
|
|
|
|
|
|
|
|
// nsIDOMDocument interface
|
|
|
|
NS_IMETHOD GetDoctype(nsIDOMDocumentType** aDocumentType);
|
|
|
|
NS_IMETHOD CreateCDATASection(const nsString& aData, nsIDOMCDATASection** aReturn);
|
|
|
|
NS_IMETHOD CreateEntityReference(const nsString& aName, nsIDOMEntityReference** aReturn);
|
|
|
|
NS_IMETHOD CreateProcessingInstruction(const nsString& aTarget, const nsString& aData, nsIDOMProcessingInstruction** aReturn);
|
|
|
|
NS_IMETHOD CreateElement(const nsString& aTagName,
|
|
|
|
nsIDOMElement** aReturn);
|
1999-03-10 01:17:49 +00:00
|
|
|
NS_IMETHOD CreateElementWithNameSpace(const nsString& aTagName,
|
|
|
|
const nsString& aNameSpace,
|
|
|
|
nsIDOMElement** aReturn);
|
1998-11-11 22:06:16 +00:00
|
|
|
|
|
|
|
// nsIXMLDocument interface
|
1999-03-20 01:51:00 +00:00
|
|
|
NS_IMETHOD GetContentById(const nsString& aName, nsIContent** aContent);
|
|
|
|
|
1998-11-12 07:54:12 +00:00
|
|
|
// nsIHTMLContentContainer
|
1998-11-11 22:06:16 +00:00
|
|
|
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aResult);
|
1998-12-02 00:39:10 +00:00
|
|
|
NS_IMETHOD GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aResult);
|
1998-11-11 22:06:16 +00:00
|
|
|
|
|
|
|
protected:
|
1999-01-23 07:09:06 +00:00
|
|
|
virtual void InternalAddStyleSheet(nsIStyleSheet* aSheet); // subclass hook for sheet ordering
|
1999-01-06 00:32:41 +00:00
|
|
|
virtual nsresult Reset(nsIURL* aUrl);
|
1998-12-02 00:39:10 +00:00
|
|
|
|
1998-11-11 22:06:16 +00:00
|
|
|
// For HTML elements in our content model
|
|
|
|
nsIHTMLStyleSheet* mAttrStyleSheet;
|
1998-12-02 00:39:10 +00:00
|
|
|
nsIHTMLCSSStyleSheet* mInlineStyleSheet;
|
1998-11-11 22:06:16 +00:00
|
|
|
|
|
|
|
nsIParser *mParser;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // nsXMLDocument_h___
|