Did it in a separate xslt before loading it into Indesign.
Could you post the code just in case? Some of us may encounter this problem some day — it would be good to know the solution.
Kasyan, I agree with you!
So this is what i did in xslt.
First I added the following namespace to the stylesheet.
This is not supported by indesign, you have to do this with a parser. I used saxon to parse the xml.
And this is the part for the existing file lookup.
If the file exists the image is placed as a href, if it doesn't exist i put the name of the image between brackets. In this case we can see in which image doesn't exist.
<xsl:choose> <xsl:when test="file:exists(file:new(string($imagefile)))"> <xsl:element name="Articleimage"> <xsl:attribute name="href">file://../images/<xsl:value-of select="Properties/Property[@field = 9]"/></xsl:attribute> </xsl:element> </xsl:when> <xsl:otherwise> <xsl:text>[</xsl:text><xsl:value-of select="Properties/Property[@field = 9]"/><xsl:text>]</xsl:text> </xsl:otherwise> </xsl:choose>
I hope it helps for others.
Thank you, Glen.
XSL transformations are difficult for me to understand so far, and such examples of practical usage of it in InDesign help me a lot.
Could it be done with a script, during import?