Edit content
Edit XHTML documents in-place and annotate text with RDFa
XHTML content blocks in LinkedDataHub are living documents: authenticated users with write access can click directly into the content to edit it, apply rich-text formatting, and annotate any span of text with RDFa — linking words and phrases to terms in the Knowledge Graph without leaving the page.
Entering edit mode
Click anywhere inside an XHTML block to enter edit mode. The block gains a focus outline and the editor toolbar appears above the action bar. Clicking outside the block (including the surrounding column margins) returns the block to read mode.
Edit mode is only available to authenticated users who have write access to the document. The block remains read-only for all other visitors.
Editor toolbar
The toolbar appears at the top of the page when an XHTML block is active. It provides standard rich-text controls grouped by function:
- Block type
- Paragraph, Heading 1–4, Blockquote, Code block, Preformatted
- Inline formatting
- Bold, Italic, Inline code, Link
- Lists
- Bullet list, Numbered list
- Inserts
- Image, Table
- Table operations
- Add/remove row or column (active only when the caret is inside a table cell)
- View
- Show/hide RDFa annotations, Search within the document, View source XHTML
Toolbar buttons reflect the current caret position: the block-type selector and toggle buttons (Bold, Italic etc.) update as you move the cursor.
RDFa annotations
RDFa annotations embed machine-readable RDF statements directly in the XHTML markup. A single annotation expresses a statement of the form subject — property — object, where subject and object are IRIs or typed literals drawn from your Knowledge Graph.
Adding an annotation
- Enter edit mode by clicking inside the XHTML block.
- Select the text you want to annotate.
- Right-click (or use the context menu) and choose Annotate.
- In the annotation dialog:
- Property — start typing to search ontology terms; select one from the typeahead dropdown.
- Value — pre-filled with the selected text; change it to emit a different machine-readable value (e.g. a canonical form).
- Expand Type, subject & object for advanced fields:
- Type (typeof) — assign an
rdf:typeto the annotated span. - Subject (about) — override the in-scope subject IRI.
- Object (resource) — make the object a resource IRI instead of a literal.
- Datatype — type the literal (e.g.
xsd:date). - Language — tag the literal with a BCP 47 language code.
- Type (typeof) — assign an
- Click Annotate. The selected text is wrapped in a
spancarrying the appropriate RDFa attributes.
Editing an existing annotation
Right-click an already-annotated span to reopen the dialog pre-populated with the current values. Change any field and click Annotate to update, or click Remove to delete the annotation while keeping the text.
Toggling annotation visibility
The Show annotations button in the toolbar toggles a visual highlight on all annotated spans so you can see at a glance which text carries machine-readable meaning.
Saving changes
Changes are saved automatically when focus leaves the editor — clicking outside the
block or tabbing away serialises the current XHTML content as an XMLLiteral and sends a SPARQL Update PATCH request that replaces the stored value. There is no separate Save button.
Moving focus to the editor's own controls (the toolbar, the breadcrumb or the find bar) does not trigger a save; only leaving the editor region does.
Viewing the XHTML source
Click the Source button in the toolbar to open a read-only view of the serialised XHTML markup, including all RDFa attributes. This is useful for verifying the exact markup that will be stored or for copying fragments into other documents.