73trust / 100

Xslt Transform

by format.halowerk.com in Documents & files

x402 APIPassing, checked 3 h ago

Transform a small XML document with XSLT 3.0 using the installed Saxon-HE processor in an isolated OS process, returning a bounded UTF-8 principal result. Runs the existing SaxonJ-HE 12.9 inside a fresh unprivileged, read-only OS rootfs on AX42. Only the runtime, processor and trusted harness are mounted; no application state or credentials. Host networking, external resource resolution, extension calls and secondary output documents are disabled.

POST
https://format.halowerk.com/v1/xslt-transform
Price
$0.005
per call in USDC
Uptime
81.8%
last 30 days
Response time
45 ms
198 ms slowest 5%
Last check
Passed
3 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://format.halowerk.com/v1/xslt-transform

Each call costs $0.005 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://format.halowerk.com/v1/xslt-transform
content-type: application/json

{
  "parameters": {
    "label": "Sum"
  },
  "stylesheet": "<xsl:stylesheet version=\"3.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:output method=\"text\"/><xsl:param name=\"label\" select=\"'Total'\"/><xsl:template match=\"/\"><xsl:value-of select=\"$label\"/><xsl:text>: </xsl:text><xsl:value-of select=\"sum(items/item/@price)\"/></xsl:template></xsl:stylesheet>",
  "xml": "<items><item price=\"12\"/><item price=\"8\"/><item price=\"5\"/></items>"
}

Parameters

ParameterTypeRequiredDescription
parametersobjectNo
stylesheetstringYes
xmlstringYes

Example response

The provider's example. We can't check it without paying.

Example response, 28 lines
{
  "limitations": [
    "Self-contained XSLT with Saxon-HE 12.9 features; no schema-aware validation, streaming or licensed PE/EE features. One XML source and one stylesheet, no includes/imports/packages or other external resources. No secondary result documents, Java extensions or network access.",
    "XML <=65536 UTF-8 bytes, stylesheet <=32768 UTF-8 bytes; combined serialized input <=150000 bytes. Rejects literal DOCTYPE/ENTITY declarations (including those tokens in comments) and non-UTF-8 XML encoding declarations. XInclude disabled. XML strings are stored as UTF-8 inside a fresh private tmpfs.",
    "Optional <=16 unqualified ASCII parameter names, <=64 characters each, values plain strings <=4096 UTF-8 bytes. No XPath expression/document parameters or namespaced parameters. Values travel as separate fixed-structure argv items inside the sandbox, never as host shell commands.",
    "Returns the principal serialized output only, forcibly UTF-8, <=65536 bytes; method and formatting otherwise come from the stylesheet. Output is untrusted caller-produced text, not sanitized HTML. Errors are generic and never include raw processor diagnostics, XML, stylesheet or parameter values.",
    "One worker per Formatwerk process; busy503. Fresh DynamicUser/rootfs/network namespace, 512MiB OS memory/no swap, 128MiB Java heap, one CPU, 48tasks, 6s worker lifetime and bounded tmpfs. No persistent state; transformation/resource failures occur before settlement."
  ],
  "result": {
    "bytes": 7,
    "encoding": "UTF-8",
    "engine": "SaxonJ-HE 12.9 / OpenJDK 21",
    "external_resources": false,
    "limits": {
      "principal_output_bytes": 65536,
      "process_memory_bytes": 536870912,
      "stylesheet_bytes": 32768,
      "worker_lifetime_ms": 6000,
      "xml_bytes": 65536
    },
    "output": "Sum: 25",
    "secondary_outputs": false,
    "sha256": "ac933120a2bfd6e9f168237318bf6ff84dce0879bc3e975d1ce928ded700b3ef",
    "wall_time_ms": 590
  },
  "service": "xslt-transform",
  "status": "success"
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.005.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://format.halowerk.com/v1/xslt-transform' \
  -H 'content-type: application/json' \
  --data-raw '{"parameters":{"label":"Sum"},"stylesheet":"<xsl:stylesheet version=\"3.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:output method=\"text\"/><xsl:param name=\"label\" select=\"'\''Total'\''\"/><xsl:template match=\"/\"><xsl:value-of select=\"$label\"/><xsl:text>: <\/xsl:text><xsl:value-of select=\"sum(items/item/@price)\"/><\/xsl:template><\/xsl:stylesheet>","xml":"<items><item price=\"12\"/><item price=\"8\"/><item price=\"5\"/><\/items>"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://format.halowerk.com/v1/xslt-transform' \
  -H 'content-type: application/json' \
  --data-raw '{"parameters":{"label":"Sum"},"stylesheet":"<xsl:stylesheet version=\"3.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:output method=\"text\"/><xsl:param name=\"label\" select=\"'\''Total'\''\"/><xsl:template match=\"/\"><xsl:value-of select=\"$label\"/><xsl:text>: <\/xsl:text><xsl:value-of select=\"sum(items/item/@price)\"/><\/xsl:template><\/xsl:stylesheet>","xml":"<items><item price=\"12\"/><item price=\"8\"/><item price=\"5\"/><\/items>"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.005 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.005" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.005 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fformat.halowerk.com%2Fv1%2Fxslt-transform&method=POST
const res = await pay("https://format.halowerk.com/v1/xslt-transform", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "parameters": {
      "label": "Sum"
    },
    "stylesheet": "<xsl:stylesheet version=\"3.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:output method=\"text\"/><xsl:param name=\"label\" select=\"'Total'\"/><xsl:template match=\"/\"><xsl:value-of select=\"$label\"/><xsl:text>: <\/xsl:text><xsl:value-of select=\"sum(items/item/@price)\"/><\/xsl:template><\/xsl:stylesheet>",
    "xml": "<items><item price=\"12\"/><item price=\"8\"/><item price=\"5\"/><\/items>"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.005 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.005"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://format.halowerk.com/v1/xslt-transform",
        json={
            "parameters": {
                "label": "Sum",
            },
            "stylesheet": "<xsl:stylesheet version=\"3.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"><xsl:output method=\"text\"/><xsl:param name=\"label\" select=\"'Total'\"/><xsl:template match=\"/\"><xsl:value-of select=\"$label\"/><xsl:text>: </xsl:text><xsl:value-of select=\"sum(items/item/@price)\"/></xsl:template></xsl:stylesheet>",
            "xml": "<items><item price=\"12\"/><item price=\"8\"/><item price=\"5\"/></items>",
        },
    )
    print(res.status_code, res.text)

Security scan

No findings

We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed40242 ms$0.005
20 h agoTimed out---
3 days agoTimed out---
4 days agoPassed40245 ms$0.005
4 days agoPassed40246 ms$0.005
Show 6 older checks
5 days agoPassed402138 ms$0.005
5 days agoPassed40242 ms$0.005
6 days agoPassed402121 ms$0.005
6 days agoPassed40237 ms$0.005
6 days agoPassed40240 ms$0.005
7 days agoPassed402198 ms$0.005