1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });
- var error_1 = require("../error");
- var validate_1 = require("../validate");
- var XmlDtdElement = (function () {
- function XmlDtdElement(parent, validation, options) {
- this._validation = validation;
- this._parent = parent;
- this.charData = options.charData;
- }
- Object.defineProperty(XmlDtdElement.prototype, "charData", {
-
- get: function () {
- return this._charData;
- },
-
- set: function (charData) {
- if (this._validation && !(0, validate_1.validateChar)(charData)) {
- throw new Error((0, error_1.getContext)(this.up()) + ": element declaration"
- + (" \"" + charData + "\" should not contain characters")
- + " not allowed in XML");
- }
- this._charData = charData;
- },
- enumerable: false,
- configurable: true
- });
-
- XmlDtdElement.prototype.toString = function () {
- return "<!ELEMENT " + this._charData + ">";
- };
-
- XmlDtdElement.prototype.up = function () {
- return this._parent;
- };
- return XmlDtdElement;
- }());
- exports.default = XmlDtdElement;
|