![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Computron is a Node.js library to apply XSLT stylesheets to XML documents.
Computron is a Node.js library to apply XSLT stylesheets to XML documents. It's a C++ addon for Node.js that uses libxml2 and libxslt.
This library is only intended to be used on Linux.
You must have libxml2 and libxslt1 installed on your system.
sudo apt install libxml2-dev libxslt1-dev
You should already have a C++ compiler installed on your system, if it's not the case install g++.
sudo apt install g++
Computron uses node-gyp as a build system so you need to install it to be able to compile Computron
npm install -g node-gyp
Basic example:
const Computron = require('computron');
const computron = new Computron();
// A stylesheet needs to be loaded on the current instance before doing anything
try {
computron.loadStylesheet('/path/to/stylesheet');
} catch (err) {
console.error(err);
process.exit(1);
}
// Apply the previously loaded stylesheet on the provided XML file
let xmlResult;
try {
xmlResult = computron.apply('/path/to/xml');
} catch (err) {
console.error(err);
process.exit(1);
}
console.info(xmlResult);
Using a stylesheet that takes parameters:
const Computron = require('computron');
const computron = new Computron();
// A stylesheet needs to be loaded on the current instance before doing anything
try {
computron.loadStylesheet('/path/to/stylesheet/with/params');
} catch (err) {
console.error(err);
process.exit(1);
}
// Apply the previously loaded stylesheet on the provided XML file
let xmlResult;
try {
// Parameters can be passed to the stylesheet
const params = {
param1Name: 'value1',
param2Name: 'value2',
};
xmlResult = computron.apply('/path/to/xml', params);
} catch (err) {
console.error(err);
process.exit(1);
}
console.info(xmlResult);
To build and run the tests in release mode run:
npm test
You can debug the C++ code with in VSCode, to do so run:
npm run build:config
This will build the VSCode debugger configuration, you can then simply press F5
or go to the "Run and Debug" tab and click on "Debug".
FAQs
Computron is a Node.js library to apply XSLT stylesheets to XML documents.
The npm package computron receives a total of 17 weekly downloads. As such, computron popularity was classified as not popular.
We found that computron demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.