XML Prague
@ University of Economics, Prague
2024-06-07
Senior Engineer @Evolved Binary
Web Developer (Since 2008)
XML & XQuery (Since 2015)
Engineer @Evolved Binary
Masters in Computer Vision
Developer
React / TypeScript / Node.js
Java
Contributor to eXist-db since 2022
Documentation
Documentation
< ??? />
OASIS Standard
is expressive
too complex
has over 600 elements
Lightweight DITA
(LwDITA)
OASIS Standard
is expressive
simple
has 50 elements
XDITA
HDITA
MDITA
JDITA
<xml />
<html5 />
# Markdown
{ JSON }
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD LIGHTWEIGHT DITA Topic//EN" "lw-topic.dtd">
<topic id="example">
<title>Title</title>
<body>
<section>
<p>A paragraph.</p>
</section>
</body>
</topic>
{
"nodeName": "document",
"children": [
{
"nodeName": "topic",
"attributes": {
"id": "example"
},
"children": [
{
"nodeName": "title",
"attributes": {}
}
...
]
}
]
}
Title
A paragraph
...is a JSON Representation of an LwDITA document
...makes it easy to use LwDITA with JavaScript
We can use JDITA to create an in-browser editor for LwDITA
Documentation
< XDITA />
Toolkit for building rich text WYSIWYG editors
Can be extended with custom schema
Written in TypeScript
{ JavaScript Object}
{ JavaScript Object}
Blocks
Marks
{
"type": "doc",
"attrs": {},
"content": [
{
"type": "topic",
"attrs": {
"id": "example",
"parent": "doc"
},
"content": [
{
"type": "title",
"attrs": {
"parent": "topic"
},
...
<p>, <title>,...
<i>, <b>, <sup>,...
Proven tool
Customisable
Open Source
Supportive community
Speeds up our development
lwdita library
lwdita library
prosemirror-lwdita
prosemirror-lwdita
prosemirror-lwdita
prosemirror-lwdita
prosemirror-lwdita
lwdita-xdita
lwdita-ast
lwdita library
lwdita library
prosemirror-jdita
prosemirror-jdita
prosemirror-lwdita
lwdita library
lwdita library
prosemirror-lwdita
prosemirror-lwdita
Parse
Serialize
Generate
Read
(AST object)
Open an XDITA document
See an HTML rendered representation of the document
Edit the text
Insert new elements
Transform content
Save the updated XDITA document
TypeScript!
Legacy code
Outdated TypeScript, libraries & dependencies
Deprecated TypeScript functions and concepts
e.g. Declaration Merging
Learn TypeScript
Extract lwdita library into 2 components
Update libraries & dependencies
Replace deprecated TypeScript functions
Implemented roundtrip of upload and download of XDITA
Two lwdita library packages
TSDoc Documentation
Increased test coverage
Published lwdita libraries as npm packages
Implemented a roundtrip from uploading XDITA, editing it, and downloading the updated document back
GitHub integration
Code editor view to edit the XDITA sourcefile
Collaborative editing
lwdita repo:
https://github.com/evolvedbinary/lwdita
prosemirror-lwdita repo: https://github.com/evolvedbinary/prosemirror-lwdita
LwDITA 1.0 specifications:
http://docs.oasis-open.org/dita/LwDITA/v1.0/cnprd02/LwDITA-v1.0-cnprd02.html