Skip to content

Commit

Permalink
Fix for bug 334806 (Update to Expat 2.0.0). r=mrbkap, sr=jst.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterv%propagandism.org committed Jul 13, 2006
1 parent 2b9ca38 commit 0f61303
Show file tree
Hide file tree
Showing 11 changed files with 222 additions and 182 deletions.
12 changes: 6 additions & 6 deletions dom/locales/en-US/chrome/layout/xmlparser.properties
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
14 = reference to invalid character number
15 = reference to binary entity
16 = reference to external entity in attribute
17 = xml declaration not at start of external entity
17 = XML or text declaration not at start of entity
18 = unknown encoding
19 = encoding specified in XML declaration is incorrect
20 = unclosed CDATA section
Expand All @@ -65,15 +65,15 @@
30 = XML declaration not well-formed
31 = text declaration not well-formed
32 = illegal character(s) in public id
38 = reserved prefix (xml) must not be undeclared or bound to another namespace URI
38 = reserved prefix (xml) must not be undeclared or bound to another namespace name
39 = reserved prefix (xmlns) must not be declared or undeclared
40 = prefix must not be bound to one of the reserved namespace URIs
40 = prefix must not be bound to one of the reserved namespace names

# %1$S is replaced by the Expat error string, may be followed by Expected (see below)
# %2$S is replaced by URL
# %3$d is replaced by line number
# %4$d is replaced by column number
XMLParsingError = XML Parsing Error: %1$S\nLocation: %2$S\nLine Number %3$d, Column %4$d:
# %3$u is replaced by line number
# %4$u is replaced by column number
XMLParsingError = XML Parsing Error: %1$S\nLocation: %2$S\nLine Number %3$u, Column %4$u:

# %S is replaced by a tag name.
# This gets appended to the error string if the error is mismatched tag.
Expand Down
2 changes: 1 addition & 1 deletion parser/expat/COPYING
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
and Clark Cooper
Copyright (c) 2001, 2002, 2003 Expat maintainers.
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
32 changes: 18 additions & 14 deletions parser/expat/lib/expat.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
See the file COPYING for copying permission.
*/

#ifndef XmlParse_INCLUDED
#define XmlParse_INCLUDED 1
#ifndef Expat_INCLUDED
#define Expat_INCLUDED 1

#ifdef __VMS
/* 0 1 2 3 0 1 2 3
Expand All @@ -17,6 +17,10 @@
#include <stdlib.h>
#include "expat_external.h"

#ifdef __cplusplus
extern "C" {
#endif

struct XML_ParserStruct;
typedef struct XML_ParserStruct *XML_Parser;

Expand Down Expand Up @@ -88,11 +92,10 @@ enum XML_Error {
XML_ERROR_ABORTED,
XML_ERROR_FINISHED,
XML_ERROR_SUSPEND_PE,
/* BEGIN MOZILLA CHANGE (backport of bug fix from Expat trunk) */
/* Added in 2.0. */
XML_ERROR_RESERVED_PREFIX_XML,
XML_ERROR_RESERVED_PREFIX_XMLNS,
XML_ERROR_RESERVED_NAMESPACE_URI
/* END MOZILLA CHANGE */
};

enum XML_Content_Type {
Expand Down Expand Up @@ -210,8 +213,8 @@ XML_ParserCreate(const XML_Char *encoding);
URI, the namespace separator character, and the local part of the
name. If the namespace separator is '\0' then the namespace URI
and the local part will be concatenated without any separator.
When a namespace is not declared, the name and prefix will be
passed through without expansion.
It is a programming error to use the separator '\0' with namespace
triplets (see XML_SetReturnNSTriplet).
*/
XMLPARSEAPI(XML_Parser)
XML_ParserCreateNS(const XML_Char *encoding, XML_Char namespaceSeparator);
Expand Down Expand Up @@ -902,9 +905,9 @@ XML_GetErrorCode(XML_Parser parser);
was detected; otherwise the location is the location of the last
parse event, as described above.
*/
XMLPARSEAPI(int) XML_GetCurrentLineNumber(XML_Parser parser);
XMLPARSEAPI(int) XML_GetCurrentColumnNumber(XML_Parser parser);
XMLPARSEAPI(long) XML_GetCurrentByteIndex(XML_Parser parser);
XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);
XMLPARSEAPI(XML_Size) XML_GetCurrentColumnNumber(XML_Parser parser);
XMLPARSEAPI(XML_Index) XML_GetCurrentByteIndex(XML_Parser parser);

/* Return the number of bytes in the current event.
Returns 0 if the event is in an internal entity.
Expand Down Expand Up @@ -979,7 +982,8 @@ enum XML_FeatureEnum {
XML_FEATURE_CONTEXT_BYTES,
XML_FEATURE_MIN_SIZE,
XML_FEATURE_SIZEOF_XML_CHAR,
XML_FEATURE_SIZEOF_XML_LCHAR
XML_FEATURE_SIZEOF_XML_LCHAR,
XML_FEATURE_NS
/* Additional features must be added to the end of this enum. */
};

Expand All @@ -998,9 +1002,9 @@ XML_GetFeatureList(void);
releases. Micro is bumped with each release, and set to 0 with each
change to major or minor version.
*/
#define XML_MAJOR_VERSION 1
#define XML_MINOR_VERSION 95
#define XML_MICRO_VERSION 8
#define XML_MAJOR_VERSION 2
#define XML_MINOR_VERSION 0
#define XML_MICRO_VERSION 0

/* BEGIN MOZILLA CHANGE (Report opening tag of mismatched closing tag) */
XMLPARSEAPI(const XML_Char*)
Expand All @@ -1011,4 +1015,4 @@ MOZ_XML_GetMismatchedTag(XML_Parser parser);
}
#endif

#endif /* not XmlParse_INCLUDED */
#endif /* not Expat_INCLUDED */
23 changes: 23 additions & 0 deletions parser/expat/lib/expat_external.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
See the file COPYING for copying permission.
*/

#ifndef Expat_External_INCLUDED
#define Expat_External_INCLUDED 1

/* External API definitions */

#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
Expand Down Expand Up @@ -62,6 +65,7 @@
#endif
#endif /* not defined XML_STATIC */


/* If we didn't define it above, define it away: */
#ifndef XMLIMPORT
#define XMLIMPORT
Expand Down Expand Up @@ -96,3 +100,22 @@ typedef char XML_LChar;

#endif
/* END MOZILLA CHANGE */

#ifdef XML_LARGE_SIZE /* Use large integers for file/stream positions. */
#if defined(XML_USE_MSC_EXTENSIONS) && _MSC_VER < 1400
typedef __int64 XML_Index;
typedef unsigned __int64 XML_Size;
#else
typedef long long XML_Index;
typedef unsigned long long XML_Size;
#endif
#else
typedef long XML_Index;
typedef unsigned long XML_Size;
#endif /* XML_LARGE_SIZE */

#ifdef __cplusplus
}
#endif

#endif /* not Expat_External_INCLUDED */
Loading

0 comments on commit 0f61303

Please sign in to comment.