I added a HTML Popup to a map that displays several fields data and one image that's stored in a folder next to the map.mxd file. One of the fields in the table is the filename.jpg for each image. All local.
I have a restriction, I can't use absolute paths. It needs to be relative, like "Images\P01.jpg". The problem is, if I use relative path like that, it gets related to the temporary folder where the XML file is generated and not to my MXD folder:
I see that the xsl templates have tags like
<xsl:value-of select="FieldsDoc/Title" /> that gets properties from my map, but I can't find any documentation about these... Already opened lots of xsl within arcmap templates, but I couldn't figure it out...
How can I make it relative?
Perhaps there's a different approach to solve it without XSL.
I tried simply putting a html tag in the field, none worked:
<img src='\Mapa.img\P1.jpg'>, I get
<img src='.\Mapa.img\P1.jpg'>, I get "file:///C:/Users/demian/AppData/Local/Temp/arcCFE7/Images/".
<img src='..\Mapa.img\P1.jpg>, I get file:///C:/Users/demian/AppData/Local/Temp/Images/
<!-- this can't be absolute... --> <xsl:variable name="docPath" select="'C:\Users\demian\Documents\Mapa\Images\'"/> <xsl:when test="FieldName[starts-with(., 'Imagem')]"> <img alt="Imagem"> <xsl:attribute name="src"> <xsl:value-of select="$docPath"/><xsl:value-of select="FieldValue"/> </xsl:attribute> </img> </xsl:when>