From: Henning Hraban Ramm <texml@fiee.net>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Custom XML Export
Date: Sat, 12 Sep 2015 18:28:42 +0600 [thread overview]
Message-ID: <ECDF38E3-B0D8-416E-BE29-7242633242E4@fiee.net> (raw)
In-Reply-To: <CAG5iGsCaY=3uV8fbhsu0SaEn8AZjMxJCckS_GYWRnJkBBYjrQA@mail.gmail.com>
Am 2015-09-12 um 18:14 schrieb luigi scarso <luigi.scarso@gmail.com>:
>> Do you know a good XSLT processor except Saxon? Its free version is just too limited.
>
> xsltproc for xslt 1.0, but you are looking for xslt 2.0 , right ?
More like 3.0, I guess ;)
No, the only extension from commercial Saxon that I would need are global variables.
I didn’t yet dive into xsltproc’s (libxml2’s) documentation to see what might be possible.
E.g. if I don’t markup all my paragraphs (because it clutters the source too much and is tedious), I get <break />s between the original paragraphs. I could convert these to HTML <p>s like:
<xsl:variable name="within-paragraph">0</xsl:variable >
<xsl:template match="break">
<xsl:if test="within-paragraph = 0">
<xsl:text disable-output-escaping="yes"><![CDATA[</p><p>]]></xsl:text>
</xsl:if>
<xsl:if test="within-paragraph > 0">
<br />
</xsl:if>
</xsl:template>
<xsl:template match="paragraph">
<xsl:variable name="within-paragraph">1</xsl:variable >
<p><xsl:apply-templates/></p>
<xsl:variable name="within-paragraph">0</xsl:variable >
</xsl:template>
Maybe there’s another solution, but I’m not comfortable enough in XSL to see it.
Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2015-09-12 12:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 14:21 Toby Miller
2015-09-12 9:53 ` Hans Hagen
2015-09-12 11:37 ` Toby Miller
2015-09-12 12:00 ` Hans Hagen
2015-09-12 12:22 ` Toby Miller
2015-09-12 12:04 ` Henning Hraban Ramm
2015-09-12 12:14 ` Hans Hagen
2015-09-12 12:21 ` Toby Miller
2015-09-12 12:14 ` luigi scarso
2015-09-12 12:28 ` Henning Hraban Ramm [this message]
2015-09-14 9:12 ` luigi scarso
2015-09-14 18:09 ` Jan Tosovsky
[not found] ` <00cd01d0ef18$6f13da50$4d3b8ef0$@tosovsky@email.cz>
2015-09-15 4:11 ` Henning Hraban Ramm
2015-09-12 14:25 ` Hans Hagen
2015-09-12 20:53 ` Aditya Mahajan
2015-09-14 9:57 ` Henning Hraban Ramm
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ECDF38E3-B0D8-416E-BE29-7242633242E4@fiee.net \
--to=texml@fiee.net \
--cc=ntg-context@ntg.nl \
/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.
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 NNTP newsgroup(s).