so

Parsing Markdown in XSLT

Volume 6, Issue 16; 24 Dec 2022

No, not that way. The easy way.

Recently, I wanted to construct some RSS feeds (@qt4cg, for example) from data that’s only easily available in Markdown. In principle, it would be possible (and fun!) to write a Markdown parser natively in XSLT. But I have puh-lenty of fun projects.

Instead, I took the easy way out and wrapped a Saxon extension function around a Java library that parses CommonMark, my preferred flavor.

That’s the Saxon CommonMark Processor.

Version 1.0 supports the ability to use extensions, as defined by org.commonmark. This lets you parse things like the GitHub markdown for tables and strikethrough.

Share and enjoy.

#XSLT#Markdown

Please provide your name and email address. Your email address will not be displayed and I won’t spam you, I promise. Your name and a link to your web address, if you provide one, will be displayed.

Your name:

Your email:

Homepage:

Do you comprehend the words on this page? (Please demonstrate that you aren't a mindless, screen-scraping robot.)

What is six times two?   (e.g. six plus two is 8)

Enter your comment in the box below. You may style your comment with the CommonMark flavor of Markdown.

All comments are moderated. I don’t promise to preserve all of your formatting and I reserve the right to remove comments for any reason.