a tiny update to improve XML support

git-svn-id: svn://10.0.0.236/trunk@14303 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1998-11-09 21:51:18 +00:00
parent 109f33438b
commit 0dad7246be
2 changed files with 10 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ static NS_DEFINE_IID(kClassIID, NS_INAVHTML_DTD_IID);
static const char* kNullToken = "Error: Null token given";
static const char* kInvalidTagStackPos = "Error: invalid tag stack position";
static const char* kHTMLTextContentType = "text/html";
static const char* kXMLTextContentType = "text/xml";
static char* kVerificationDir = "c:/temp";
static nsAutoString gEmpty;
@@ -442,6 +443,8 @@ PRBool CNavDTD::Verify(nsString& aURLRef){
*/
PRBool CNavDTD::CanParse(nsString& aContentType, PRInt32 aVersion){
PRBool result=aContentType.Equals(kHTMLTextContentType);
if(!result)
result=aContentType.Equals(kXMLTextContentType);
return result;
}
@@ -455,6 +458,8 @@ eAutoDetectResult CNavDTD::AutoDetectContentType(nsString& aBuffer,nsString& aTy
eAutoDetectResult result=eUnknownDetect;
if(PR_TRUE==aType.Equals(kHTMLTextContentType))
result=eValidDetect;
if(PR_TRUE==aType.Equals(kXMLTextContentType))
result=eValidDetect;
return result;
}