Processing and Publishing Content Math with JOMDoc and JOBAD

14
Processing and Publishing Content Math with JOMDoc and JOBAD Content Math Training Camp 2010 Christoph Lange Jacobs University, Bremen, Germany KWARC – Knowledge Adaptation and Reasoning for Content July 07, 2010 Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBAD July 07, 2010 1/14

description

Content Math Training Camp 2010

Transcript of Processing and Publishing Content Math with JOMDoc and JOBAD

Page 1: Processing and Publishing Content Math with JOMDoc and JOBAD

Processing and Publishing Content Math withJOMDoc and JOBAD

Content Math Training Camp 2010

Christoph Lange

Jacobs University, Bremen, GermanyKWARC – Knowledge Adaptation and Reasoning for Content

July 07, 2010

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 1/14

Page 2: Processing and Publishing Content Math with JOMDoc and JOBAD

JOMDoc – Java API (not only) for OMDoc

http://jomdoc.omdoc.org (maintainer: Vyacheslav Zholudev) – alibrary of 300+ Java classes featuring . . .

Java object model (one class per XML element) for OMDoc (andMathML and OpenMath for formulæ), plus many other services:Schema validationRenderer: OpenMath/Content MathML→ Presentation MathML(pattern-matching XML notation definitions), context-sensitiveRest of OMDoc→ XHTML+RDFa (XSLT)Document restructuring: e. g. flattening/modularizingdocuments

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 2/14

Page 3: Processing and Publishing Content Math with JOMDoc and JOBAD

How to use JOMDoc

Download or check out from http://jomdoc.omdoc.org

Binary distributionJAR file ready for inclusion into Java projectsexecutable shell script for validation, rendering, documentrestructuringGUI frontend for rendering

Source code (Eclipse-ready)Contribute: Trac project management site, mailing list

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 3/14

Page 4: Processing and Publishing Content Math with JOMDoc and JOBAD

JOMDoc’s Notation Definitions

<notation>

<prototype> <!-- the content markup pattern -->

<om:OMA>

<om:OMS cd="arith1" name="divide"/>

<expr name="arg1"/>

<expr name="arg2"/>

</om:OMA>

</prototype>

<rendering> <!-- the presentation markup fragment -->

<m:mfrac>

<render name="arg1"/>

<render name="arg2"/>

</m:mfrac>

</rendering>

</notation>

render(divide(a, b)); render(a)render(b)

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 4/14

Page 5: Processing and Publishing Content Math with JOMDoc and JOBAD

Applications using JOMDoc

TNTBase (→ other talk): versioned XML database with specialservices for OMDocSWiM (semantic wiki powering http://wiki.openmath.org)Urs Holzer’s Gemse (MathML editor): Content MathML→Presentation MathML preview

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 5/14

Page 6: Processing and Publishing Content Math with JOMDoc and JOBAD

JOBAD – Interactive Documents

Now we can render OMDoc documents – let’s make theminteractive!

On-demand adaptation to the user’s presentation preferences(e. g. brackets, notation)On-demand information lookup without leaving the document

JOBAD, the JavaScript API for OMDoc-based Interactive Documentshttp://jomdoc.omdoc.org/wiki/JOBAD (maintainer: ChristophLange)

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 6/14

Page 7: Processing and Publishing Content Math with JOMDoc and JOBAD

JOBAD Architecture

external services or data

XHTML+MathML+OpenMath, JavaScript

GUI

menu

mouse

actionobjects Services

folding/visibility

layers

keybddefinitionlookup

computation/rewriting

ontology/definitions

notationcollection

renderer

initially generates

Document

ClientModules

WebServices

proxy

Wolfram|Alpha

… others …

integrated backend(MMT: logics; TNTBase: lecture notes; …)

other CAS

unit converter

linked data

(dashed lines denote old services being ported or new services being developed)

ext. repositories

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 7/14

Page 8: Processing and Publishing Content Math with JOMDoc and JOBAD

JOBAD – Customizing Display

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 8/14

Page 9: Processing and Publishing Content Math with JOMDoc and JOBAD

JOBAD – Looking up Information (1)

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 9/14

Page 10: Processing and Publishing Content Math with JOMDoc and JOBAD

JOBAD – Looking up Information (2)

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 10/14

Page 11: Processing and Publishing Content Math with JOMDoc and JOBAD

JOBAD – Rewriting the Document (UnitConversion)

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 11/14

Page 12: Processing and Publishing Content Math with JOMDoc and JOBAD

JOBAD – Local Discussion Forums

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 12/14

Page 13: Processing and Publishing Content Math with JOMDoc and JOBAD

TNTBase + JOMDoc + JOBAD Integrated

(JOMDoc rendering XHTML+MathML+RDFa, JOBAD providingdefinition lookup and semantic navigation)

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 13/14

Page 14: Processing and Publishing Content Math with JOMDoc and JOBAD

Conclusion

JOMDoc: Java API and command line for validating, rendering,transforming, etc. OMDoc and other Content Math –http://jomdoc.omdoc.org

JOBAD: JavaScript-based architecture for integrating servicesinto interactive documents –http://jomdoc.omdoc.org/wiki/JOBAD

Lange (Jacobs) Processing and Publishing Content Math with JOMDoc and JOBADJuly 07, 2010 14/14