Luzgan
Luzgan

Reputation: 106

Change conref during processing by xsl-fo

I read somewhere, that conditional importing is not possible in xsl-fo. Although I have small hope, that this is something else, and can be resolved.

My problem is that I have something like that in one of my dita file:

<row>
    <entry align="right">Intended Purpose</entry>
    <entry ><p conref="intendedpurpose.dita#intendedpurpose/statement" ></p></entry>
 </row>

My question is, can I somehow change the conref in xsl-fo, and add variable to the dita file i want to upload? I mean something like that

intendedpurpose{version}.dita

I am just curious if it can be somehow done.

Upvotes: 0

Views: 56

Answers (2)

JulioV
JulioV

Reputation: 516

It would be far better to use conkeyref and target a key defined in a topicref. Doing so late-binds the target so that the resolution occurs during processing and not authoring. That changes your paragraph element to

<p conkeyref="purpose/intendedpurpose"/>

In the map, you would then have a topicref that points to the topic that contains the paragraph target. It would look something like:

<topicref keys="purpose" href="intendedpurpose_v3.dita">

The topic referenced contains the paragraph with the @id intendedpurpose.

Upvotes: 0

Tony Graham
Tony Graham

Reputation: 8068

You need to transform your DITA XML into the FO vocabulary for your FO processor to be able to use it.

You could pre-process your DITA XML to add the version number in intendedpurpose.dita and similar filenames before running your regular DITA processing or you may be able to customise the DITA-to-FO processing to do the conref lookup on the right file, but it's definitely something that you'd do before you have an FO file to feed to the FO processor.

Upvotes: 1

Related Questions