- From: RICAUD-DUSSARGET Matthieu <matthieu.ricaud@igs-cp.fr>
- Date: Mon, 20 Jan 2014 10:22:02 +0100
- To: XProc Dev <xproc-dev@w3.org>
- Message-ID: <CADRkOwHda-kbLXa=MrnWDndCV6jPyQRwtTi8uf9_eSNvr6QCzw@mail.gmail.com>
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 xsl:character-maps 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 characters. 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=" " string="&#160;"/> <!-- THIN SPACE replace by NO-BREAK SPACE --> Using saxon out of xproc this character map rule will replace any thin space " " by a no break space " ", but when trying to replace it with a regex (in xslt, see the process above) I get "&160;" in the output. Of course I could directly write the good entity : <xsl:output-character character=" " string=" "/> and this would work fine. But the goal here is to really implement character-map mechanism. By the way outputing   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 "&160;" and not the desired "&160;" I'll have a look at levex, but any suggest is welcome. Regards, Matthieu -- Matthieu Ricaud-Dussarget IGS-CP - Développeur XML 05 45 37 09 49
Received on Monday, 20 January 2014 09:23:02 UTC