W3C home > Mailing lists > Public > xproc-dev@w3.org > January 2014

p:store serialization "character-map like"

From: RICAUD-DUSSARGET Matthieu <matthieu.ricaud@igs-cp.fr>
Date: Mon, 20 Jan 2014 10:22:02 +0100
Message-ID: <CADRkOwHda-kbLXa=MrnWDndCV6jPyQRwtTi8uf9_eSNvr6QCzw@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
Hi all,

Character-map is not allowed as an option of p:store (
http://www.w3.org/TR/2010/REC-xproc-20100511/#serialization-options), I
don't really understand why and we really need this in our process, so I'm
trying to define a declare-step that does the trick (for
xsl:result-document at least) :

1. tranform a bit the xslt by :
    - adding the @format to the @href of any xsl:result-document (I will
then be able to get the @format from p:base-uri())
    - adding an identity template that output the xsl:output and

2. Reading this secondary output so I can pass dynamicly the serialization
options (xsl:ouptut) to the p:store

3. Adding an xslt step that read the corresponding xsl:character-maps in
the secondary output to operate a regex replacement of the matchings

Well this is a try, any suggests on this is welcome.

For the moment the only thing I'm not abale to do is to deal with this kind
of character map :

<xsl:output-character character="&#8201;" string="&amp;#160;"/> <!-- THIN
SPACE replace by NO-BREAK SPACE -->

Using saxon out of xproc this character map rule will replace any thin
space "&#8201;" by a no break space "&#160;", but when trying to replace it
with a regex (in xslt, see the process above) I get "&amp;160;" in the

Of course I could directly write the good entity :
<xsl:output-character character="&#8201;" string="&#160;"/>
and this would work fine.
But the goal here is to really implement character-map mechanism.
By the way outputing &#160; can make it easier to read the output file and
see no break spaces.

I think this is not possible "construct" dynamicly an entity with xslt or
maybe by using specials saxon function ? but I don't manage to, for
instance :
with xproc/calabash, <saxon:entity-ref name="160"
xsl:extension-element-prefixes="saxon"/> also output "&amp;160;" and not
the desired "&160;"

I'll have a look at levex, but any suggest is welcome.


Matthieu Ricaud-Dussarget
IGS-CP - Développeur XML
05 45 37 09 49
Received on Monday, 20 January 2014 09:23:02 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:16 UTC