From 64a2fee91c98c8bbab435b76861e549104f31bb5 Mon Sep 17 00:00:00 2001 From: "nisheeth@netscape.com" Date: Sat, 27 Feb 1999 08:02:15 +0000 Subject: [PATCH] - Add expat to the windows build only... - Changed nsXMLDocument such that expat gets used for XML parsing if EXPAT is #define'd --- content/xml/document/src/makefile.win | 3 ++- content/xml/document/src/nsXMLDocument.cpp | 5 +++++ layout/xml/document/src/makefile.win | 3 ++- layout/xml/document/src/nsXMLDocument.cpp | 5 +++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/content/xml/document/src/makefile.win b/content/xml/document/src/makefile.win index aff70f39bec8..ea7d571b2a89 100644 --- a/content/xml/document/src/makefile.win +++ b/content/xml/document/src/makefile.win @@ -40,7 +40,8 @@ LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\js \ -I..\..\..\html\style\src -I..\..\..\html\base\src -I$(PUBLIC)\dom \ -I..\..\..\html\content\src -I..\..\..\html\document\src \ -I..\..\..\xul\content\src \ - -I$(PUBLIC)\netlib -I..\..\..\base\src -I$(PUBLIC)\pref + -I$(PUBLIC)\netlib -I..\..\..\base\src -I$(PUBLIC)\pref \ + -I$(PUBLIC)\expat LCFLAGS = \ $(LCFLAGS) \ diff --git a/content/xml/document/src/nsXMLDocument.cpp b/content/xml/document/src/nsXMLDocument.cpp index b4fe4ff0ba10..79cddf2edb7b 100644 --- a/content/xml/document/src/nsXMLDocument.cpp +++ b/content/xml/document/src/nsXMLDocument.cpp @@ -38,6 +38,7 @@ #include "nsIDOMComment.h" #include "nsIDOMElement.h" #include "nsIDOMText.h" +#include "nsExpatDTD.h" // XXX The XML world depends on the html atoms #include "nsHTMLAtoms.h" @@ -299,7 +300,11 @@ nsXMLDocument::StartDocumentLoad(nsIURL *aUrl, nsIDTD* theDTD=0; // XXX For now, we'll use the HTML DTD +#ifndef EXPAT NS_NewWellFormed_DTD(&theDTD); +#else + NS_New_Expat_DTD(&theDTD); +#endif mParser->RegisterDTD(theDTD); mParser->SetCommand(aCommand); mParser->SetContentSink(sink); diff --git a/layout/xml/document/src/makefile.win b/layout/xml/document/src/makefile.win index aff70f39bec8..ea7d571b2a89 100644 --- a/layout/xml/document/src/makefile.win +++ b/layout/xml/document/src/makefile.win @@ -40,7 +40,8 @@ LINCS=-I$(PUBLIC)\xpcom -I$(PUBLIC)\raptor -I$(PUBLIC)\js \ -I..\..\..\html\style\src -I..\..\..\html\base\src -I$(PUBLIC)\dom \ -I..\..\..\html\content\src -I..\..\..\html\document\src \ -I..\..\..\xul\content\src \ - -I$(PUBLIC)\netlib -I..\..\..\base\src -I$(PUBLIC)\pref + -I$(PUBLIC)\netlib -I..\..\..\base\src -I$(PUBLIC)\pref \ + -I$(PUBLIC)\expat LCFLAGS = \ $(LCFLAGS) \ diff --git a/layout/xml/document/src/nsXMLDocument.cpp b/layout/xml/document/src/nsXMLDocument.cpp index b4fe4ff0ba10..79cddf2edb7b 100644 --- a/layout/xml/document/src/nsXMLDocument.cpp +++ b/layout/xml/document/src/nsXMLDocument.cpp @@ -38,6 +38,7 @@ #include "nsIDOMComment.h" #include "nsIDOMElement.h" #include "nsIDOMText.h" +#include "nsExpatDTD.h" // XXX The XML world depends on the html atoms #include "nsHTMLAtoms.h" @@ -299,7 +300,11 @@ nsXMLDocument::StartDocumentLoad(nsIURL *aUrl, nsIDTD* theDTD=0; // XXX For now, we'll use the HTML DTD +#ifndef EXPAT NS_NewWellFormed_DTD(&theDTD); +#else + NS_New_Expat_DTD(&theDTD); +#endif mParser->RegisterDTD(theDTD); mParser->SetCommand(aCommand); mParser->SetContentSink(sink);