Offer http://example.com/policy:1010
An offer made by abc.
- Written to the profile http://example.com/odrl:profile:01.
PROSE: Prose Rendering for ODRL Semantic Representation. ds-prose-rs reads an ODRL JSON-LD policy and writes it as plain-language sentences that say who may, must not or must do what, and under which conditions. It is a Rust library with a Yew component, a WebAssembly bridge, and an Angular component. It does not decide whether an action is allowed, and it ships no stylesheet for the rendered sentences.
The policy below is a fixture of the repository. The sentences under it are the renderer's output for that policy, stored in site/content/examples/offer.html. A Rust test renders the policy again on every cargo test and fails if the stored output is stale. The page styles them with the example stylesheet from the CSS hooks pages.
{
"@context": "http://www.w3.org/ns/odrl.jsonld",
"@type": "Offer",
"uid": "http://example.com/policy:1010",
"profile": "http://example.com/odrl:profile:01",
"assigner": "http://example.com/org:abc",
"permission": [{
"target": "http://example.com/asset:9898.movie",
"action": "display",
"constraint": [{
"leftOperand": "dateTime",
"operator": "lt",
"rightOperand": { "@value": "2026-12-31", "@type": "xsd:date" }
}],
"duty": [{
"action": "attribute",
"target": "http://example.com/asset:9898.movie"
}]
}]
}
An offer made by abc.
cargo add prose-yew
npm install @ds-labs/prose-angular
| Package | Version | What it exposes |
|---|---|---|
prose-yew (crate) | 0.5.1 | OdrlProse, OdrlProseView, ProseGlossary, ProseProblems, the editor hooks and BASE_CSS. |
@ds-labs/prose-wasm (npm) | 0.5.1 | ProseHandle for the read-only renderer, ProseValidator, validate, rules, and the ds-prose-validate command. No editor. |
@ds-labs/prose-angular (npm) | 0.5.1 | The ds-odrl-prose component and ProseValidatorService. Read-only, client-side only. |