woltlab-compiler
Version:
A compiler for WoltLab-Package Archives and WoltLab-Package Components
35 lines • 1.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const EJSFileCompiler_1 = require("./EJSFileCompiler");
/**
* Provides the functionality to compile components to `xml`-files optimized for woltlab.
*/
class WoltLabXMLCompiler extends EJSFileCompiler_1.EJSFileCompiler {
/**
* Initializes a new instance of the `WoltLabXMLCompiler<T>` class.
*
* @param item
* The item to compile.
*/
constructor(item) {
super(item);
}
/**
* @inheritdoc
*/
get TagName() {
return "data";
}
/**
* @inheritdoc
*/
CreateDocument() {
let document = super.CreateDocument();
document.documentElement.setAttribute("xmlns", "http://www.woltlab.com");
document.documentElement.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instace");
document.documentElement.setAttribute("xsi:schemaLocation", `http://www.woltlab.com ${this.SchemaLocation}`);
return document;
}
}
exports.WoltLabXMLCompiler = WoltLabXMLCompiler;
//# sourceMappingURL=WoltLabXMLCompiler.js.map