Sandbox:Temp

From Wikibase
Revision as of 09:19, 30 August 2026 by SeedBot (talk | contribs) (Sandbox demo: semantic content model demonstration (entities, dynamic rendering, citations, embeds, sitelink) (via update-page on MediaWiki MCP Server))
Jump to navigation Jump to search

Languages: English · français · Esperanto

This is a scratch page. You can do whatever to it below this line

Freedom begins under this line

This page is a demonstration of ronzz-wikibase's semantic content model: items (persons, sources, quotations, mathematical expressions, code), dynamic rendering of their statements, citations, embeds, and the page ↔ item sitelink. Everything shown below is live data: edit an item and this page updates by itself — no page editing required.

The page is sitelinked to Charles Babbage, so the short parser-function forms in the Dynamic rendering section resolve to that item automatically.

1. The items behind this page

Kind Item Live data rendered from statements
Person Charles Babbage instance of: person · born 26 December 1791 · died 18 October 1871
Collective (publisher) Longman instance of: private company
Book (citable source) Passages from the Life of a Philosopher instance of: book · author: Charles Babbage · publisher: Longman · year: 1864
Mathematical expression Euler's identity instance of: mathematical expression (property by label) · LaTeX: e^{i\pi}+1=0
Code snippet Finite differences in Python instance of: code snippet · language: Python
Quotation Pray, Mr. Babbage, … instance of: quotation content · attributed to: Charles Babbage · source: Passages from the Life of a Philosopher

2. Embedded content

Item content renders standalone at its embed URL — the same fragment the Copy embed code button on each item page points to. On this wiki the Sanitizer keeps raw iframe tags out of pages (the iframe snippet is meant for third-party sites), so the reliable on-wiki surface is the bare embed URL — which also feeds the citation auto-collect:

The content itself is rendered inline below, straight from the items' statements:

Quotation

On two occasions I have been asked, 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question.

Mathematical expression

e^{i\pi}+1=0 — rendered with KaTeX at the embed URL above.

Code snippet

def diff(xs): return [b - a for a, b in zip(xs, xs[1:])]; squares = [n**2 for n in range(1, 7)]; print(diff(diff(squares)))

3. Dynamic rendering

The values in the table above come from the #statements parser function. Because this page is sitelinked to Item:Q1080, the short form — no from= — resolves to that item:

  • person — instance of (short form, via the sitelink)
  • Born 26 December 1791 · died 18 October 1871 (short form, via the sitelink)
  • Charles Babbage wrote Passages from the Life of a Philosopher (explicit from= form)

4. Citations

The citable source Item:Q1082 is cited inline with the custom citation mechanism and collected in the bibliography below:[1]

Babbage recounts the reactions his Difference Engine provoked in his autobiography, and the quotation embedded above comes from the same work.[1]

Bibliography

  1. ↑ ↑ Babbage, C. (1864). Passages from the Life of a Philosopher. In Passages from the Life of a Philosopher. Longman.

Sources collected automatically

The {{#citations:}} collector gathers the same book here automatically — deduplicated across the footnote citations above and the embed URLs in § 2:

  1. Babbage, C. (1864). Passages from the Life of a Philosopher. In Passages from the Life of a Philosopher. Longman.

5. Try it yourself