diff --git a/lib/saxes.js b/lib/saxes.js index 5a8d7b1e..45b68ab4 100644 --- a/lib/saxes.js +++ b/lib/saxes.js @@ -1,20 +1,8 @@ "use strict"; -const { - XML_1_0: { - ED5: { - isS, isChar, isNameStartChar, isNameChar, - lists: { - S, - }, - }, - }, - XMLNS_1_0: { - ED3: { - isNCNameStartChar, isNCNameChar, - }, - }, -} = require("xmlchars"); +const { isS, isChar, isNameStartChar, isNameChar, S_LIST } = + require("xmlchars/xml/1.0/ed5"); +const { isNCNameStartChar, isNCNameChar } = require("xmlchars/xmlns/1.0/ed3"); const XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"; const XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"; @@ -119,8 +107,8 @@ const QUOTES = [DQUOTE, SQUOTE]; const TEXT_TERMINATOR = [LESS, AMP]; const DOCTYPE_TERMINATOR = [...QUOTES, OPEN_BRACKET, GREATER]; const DOCTYPE_DTD_TERMINATOR = [...QUOTES, CLOSE_BRACKET]; -const XML_DECL_NAME_TERMINATOR = [EQUAL, QUESTION, ...S]; -const ATTRIB_VALUE_UNQUOTED_TERMINATOR = [...S, GREATER, AMP, LESS]; +const XML_DECL_NAME_TERMINATOR = [EQUAL, QUESTION, ...S_LIST]; +const ATTRIB_VALUE_UNQUOTED_TERMINATOR = [...S_LIST, GREATER, AMP, LESS]; function nsMappingCheck(parser, mapping) { const { xml, xmlns } = mapping; diff --git a/package-lock.json b/package-lock.json index 6bd64319..0b60e8a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3767,9 +3767,9 @@ } }, "xmlchars": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.2.0.tgz", - "integrity": "sha512-J9gyyXkeuZGZVqfM3sEZQGIvUP2CoCQCa02aPy+EEQScK6wcoFBj6E1pw/AVi+ZVztIKgMr/DoV9RWhiDsNA+w==" + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz", + "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==" }, "yallist": { "version": "2.1.2", diff --git a/package.json b/package.json index cb8a9156..4d7cd6fc 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,6 @@ "xml-conformance-suite": "^1.0.0" }, "dependencies": { - "xmlchars": "^1.2.0" + "xmlchars": "^1.3.1" } }