Select to view content in your preferred language

XSL for GetFeatureInfo

2509
0
03-21-2016 09:53 AM
OscarDiago_Alonso
Occasional Contributor


Hi

I'm building a XSL template to customize the GetFeatureInfo of a WMS service.

I have to adapt the XSL developed for the HTMLPopup of ArcMAP . In that file I have the following:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:msxsl="urn:schemas-microsoft-com:xslt">

  <xsl:template match="/">

       <html> 

            <head> 

                 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8"/> 

            </head> 

            <body>

                 <xsl:variable name="myField" select="FieldsDoc/Fields/Field"/>

                 <xsl:variable name="myColumn" select="$myField[FieldName='test']/FieldValue"/>

             </body> 

       </html>

  </xsl:template>

</xsl:stylesheet>

I have "translated" it into:

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:esri_wms="http://www.esri.com/wms" xmlns="http://www.esri.com/wms>

  <xsl:template match="/">

       <html> 

            <head> 

                 <META HTTP-EQUIV="Content-Type" CONTENT="text/html;charset=UTF-8"/> 

            </head> 

            <body>

                 <xsl:variable name="myField" select="esri_wms:FeatureInfo[1]/esri_wms:Field"/>

                 <xsl:variable name="myColumn" select="$myField[esri_wms:FieldName='test']/esri_wms:FieldValue"/>

             </body> 

       </html>

  </xsl:template>

</xsl:stylesheet>

Is this correct?

Thanks!!

Tags (2)
0 Kudos
0 Replies