mirror of
https://github.com/S2-/gitlit
synced 2025-08-04 13:10:09 +02:00
add node modules to repo
This commit is contained in:
56
node_modules/xmlbuilder/lib/XMLDTDEntity.js
generated
vendored
Normal file
56
node_modules/xmlbuilder/lib/XMLDTDEntity.js
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
// Generated by CoffeeScript 1.10.0
|
||||
(function() {
|
||||
var XMLDTDEntity, XMLNode, isObject,
|
||||
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
|
||||
hasProp = {}.hasOwnProperty;
|
||||
|
||||
isObject = require('./Utility').isObject;
|
||||
|
||||
XMLNode = require('./XMLNode');
|
||||
|
||||
module.exports = XMLDTDEntity = (function(superClass) {
|
||||
extend(XMLDTDEntity, superClass);
|
||||
|
||||
function XMLDTDEntity(parent, pe, name, value) {
|
||||
XMLDTDEntity.__super__.constructor.call(this, parent);
|
||||
if (name == null) {
|
||||
throw new Error("Missing entity name");
|
||||
}
|
||||
if (value == null) {
|
||||
throw new Error("Missing entity value");
|
||||
}
|
||||
this.pe = !!pe;
|
||||
this.name = this.stringify.eleName(name);
|
||||
if (!isObject(value)) {
|
||||
this.value = this.stringify.dtdEntityValue(value);
|
||||
} else {
|
||||
if (!value.pubID && !value.sysID) {
|
||||
throw new Error("Public and/or system identifiers are required for an external entity");
|
||||
}
|
||||
if (value.pubID && !value.sysID) {
|
||||
throw new Error("System identifier is required for a public external entity");
|
||||
}
|
||||
if (value.pubID != null) {
|
||||
this.pubID = this.stringify.dtdPubID(value.pubID);
|
||||
}
|
||||
if (value.sysID != null) {
|
||||
this.sysID = this.stringify.dtdSysID(value.sysID);
|
||||
}
|
||||
if (value.nData != null) {
|
||||
this.nData = this.stringify.dtdNData(value.nData);
|
||||
}
|
||||
if (this.pe && this.nData) {
|
||||
throw new Error("Notation declaration is not allowed in a parameter entity");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
XMLDTDEntity.prototype.toString = function(options) {
|
||||
return this.options.writer.set(options).dtdEntity(this);
|
||||
};
|
||||
|
||||
return XMLDTDEntity;
|
||||
|
||||
})(XMLNode);
|
||||
|
||||
}).call(this);
|
Reference in New Issue
Block a user