Bonjour à tous,

Pour rendre mon document conforme à une DTD client, je dois transformer la structure d'un tableau en Cals.
Lorsqu'on balise le contenu d'un tableau, InDesign balise automatiquement ce tableau à sa manière et dans ce cas l'exportation au format Cals ne peut plus se faire.

Sur internet, j'ai trouvé plusieurs scripts transformant le Cals en InDesign mais pas l'inverse.
Par exemple, voici un tableau simple au format Indesign :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<Tableau aid:table="table" aid:trows="6" aid:tcols="2" xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/">
	<Cellule aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775">gauche</Cellule>
	<Cellule aid:table="cell" aid:theader="" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775">centrer</Cellule>
	<Cellule aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775"/>
	<Cellule aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775"/>
	<Cellule aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775">millieux</Cellule>
	<Cellule aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775">justifier</Cellule>
	<Cellule aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775"/>
	<Cellule aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775"/>
	<Cellule aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775"/>
	<Cellule aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775"/>
	<Cellule aid:table="cell" aid:tfooter="" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775">droite</Cellule>
	<Cellule aid:table="cell" aid:tfooter="" aid:crows="1" aid:ccols="1" aid:ccolwidth="130.56889763775">bas</Cellule>
</Tableau>
Et le même en Cals :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<table frame="all">
	<tgroup cols="2">
		<colspec colname="c1" colwidth="130.56889763775pt"/>
		<colspec colname="c2" colwidth="130.56889763775pt"/>
		<thead>
			<row>
				<entry align="right" valign="top">gauche</entry>
				<entry align="center" valign="top">centrer</entry>
			</row>
		</thead>
		<tfoot>
			<row>
				<entry align="left" valign="top">droite</entry>
				<entry align="left" valign="bottom">bas</entry>
			</row>
		</tfoot>
		<tbody>
			<row>
				<entry align="left" valign="top"/>
				<entry align="left" valign="top"/>
			</row>
			<row>
				<entry align="left" valign="middle">millieux</entry>
				<entry align="justify" valign="top">justifier</entry>
			</row>
			<row>
				<entry align="left" valign="top"/>
				<entry align="left" valign="top"/>
			</row>
			<row>
				<entry align="left" valign="top"/>
				<entry align="left" valign="top"/>
			</row>
		</tbody>
	</tgroup>
</table>
Ce tableau est simple, la transformation avec xslt ne devrait pas poser trop de problème à mon avis. Par contre certain sont bien plus compliqué, c'est pour ça que je cherche un script déjà éprouvé pour cette transformation, car je ne dois pas être le seul avec ce problème. Savez-vous où je peux trouver ce genre de chose ?
Autre problème et pas des moindres, vous remarquerez que les attributs d'alignement ne sont pas présent dans la structure InDesign. La seul solution qui me vient à l'esprit, c'est d'inclure ces attributs manuellement dans le fichier InDesign mais cela est très contraignant et source d'erreur. Voyez-vous une autre solution ? Merci.