Hi All

I’m working on an xslt transform where I’m extracting data about images from a 
document and put
that data into result document, It all works fine except for when the same 
image occurs more than once as I then get conflicting uris,

my code looks like this
<xsl:template match="//db:informalfigure[descendant::db:imagedata and 
@role='figure']">



        <xsl:variable name="curImage" 
select="substring-after(.//@fileref,'/')"/>

        <xsl:variable name="id" 
select="$imageMetaData//image[name=string-join(($curISBN,$curImage),'/')]/id"/>
        <xsl:if test="not(doc-available(string-join(('out/',$id,'.xml'),'')))"> 
  <!--This check fails, am I doing it incorrectly or is it the way xslt 
processes document that makes it hard to check if the id have been encountered 
before?-->

            <xsl:result-document method="xml" href="out/{$id}.xml" indent="yes">

Ideally I would like to be able to check if the result document have been 
created or not and after that decide if I want to update it with more 
information or just leave it be.

Would appreciate any help on the subject

Best regards
Erik
_______________________________________________
General mailing list
General@developer.marklogic.com
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to