In my WMS layer I have a URL pointing to an image. Does anyone have an example of how to manipulate the HTML template to display the image?

closed as off-topic by PolyGeo Jul 27 '16 at 20:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking help to debug/write/improve code must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself. Providing a clear problem statement and evidence of a code attempt will help others to help you. See: How to create a Minimal, Complete, and Verifiable example." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.


I think it would look something like:

[standard template]
<xsl:variable name="quote">"</xsl:variable>
[standard template]

<xsl:for-each select="esri_wms:FeatureInfo">
    <xsl:if test="(position() + 1) mod 2">
        <xsl:attribute name="bgcolor">#eeeeee</xsl:attribute>
    <xsl:for-each select="esri_wms:Field">
            <xsl:when test="some test for your attribute with the url...">
                  <xsl:value-of select="concat(&lt;,'img src=',$quote,esri_wms:FieldValue,$quote,'/',&gt;)" />
                  <xsl:value-of select="esri_wms:FieldValue"/>
  • If the url is the value of a field called "Fotografie" and the value always begins with https...is there an elegant way to define the test- ie <xsl:when test="some test for your attribute with the url..."> – Robert Buckley Jul 27 '16 at 20:06
  • Try text()[starts-with(.,'https')] as the test – nmtoken Jul 28 '16 at 9:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.