emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Christian Moe <mail@christianmoe.com>
To: emacs-orgmode@gnu.org
Subject: Re: Developing Moodle resources/sites with Org Mode
Date: Thu, 18 Jan 2024 15:53:05 +0100	[thread overview]
Message-ID: <87y1cmpub2.fsf@christianmoe.com> (raw)
In-Reply-To: <PH0PR12MB8799671709A1215A71982551BB722@PH0PR12MB8799.namprd12.prod.outlook.com>


Hi, Edward

Edward Doolittle writes:

> 2) Development of Moodle glossaries. Glossaries can be uploaded to a
> Moodle site using an appropriate XML file.  Glossaries could be
> developed in Org mode, including JSXgraph diagrams and graphs, PNG
> images, and so on, and then Org mode converted to XML and the XML
> transformed to Moodle Glossary XML using XSLT.  (I don't really know
> those tools at all, so I don't know if that would be a good way to go
> about the process; exporting directly to Moodle Glossary was my first
> thought, but it is not a general export that is necessary or
> appropriate, rather an export of a specifically designed Org file.
> XSLT seems old fashioned but there are tools around, and there is a
> project for exporting Org mode to XML.)

I'm a Moodle noob and rusty on the tools, but this is interesting to
think about.

You may not need any additional library for the XML export bit. The
builtin Org HTML exporter does XHTML export by default, and XHTML is an
XML, so one could just apply XSLT to that. There may be advantages to
using a library like om-to-xml (cleaner, more semantic XML; access to
more properties than what gets exported). But it looks like Moodle only
uses XML to wrap the glossary entries and their properties; any markup
inside the glossary definitions appears to be in HTML (with the html
tags entity-escaped), not defined by the Moodle glossary XML format. So
if you're going to have some markup in the definitions, you may be
better off leaving the (X)HTML part to Org instead of reimplementing it
in XSLT.

Another option might be to dispense with XSLT entirely and just write
elisp code to map the entries of an Org glossary and generate Moodle XML
from that.

How would you format the glossary on the Org side? Would you use Org
entries (** term) or Org description lists (- term :: definition)?

On the Moodle side, do you want keywords and attachments?

Yours,
Christian


  parent reply	other threads:[~2024-01-18 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17  4:17 Developing Moodle resources/sites with Org Mode Edward Doolittle
2024-01-17 12:18 ` Fraga, Eric
2024-01-17 19:23 ` Leo Butler
2024-01-17 20:32   ` Denis Bitouzé
2024-01-18  3:35   ` Edward Doolittle
2024-01-18 18:03     ` Leo Butler
2024-01-18 14:53 ` Christian Moe [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-18  1:25 Doolittle, Edward
2024-01-19 14:45 ` Devin Prater
2024-01-18 16:57 Brett Presnell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1cmpub2.fsf@christianmoe.com \
    --to=mail@christianmoe.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).