[Geoserver-users] XSLT for WFS output module

Dear Friends,

I am new to GeoServer. For one of my project i am trying to create
customized output for WFS getFeature, for this we have followed the link
http://docs.geoserver.org/stable/en/user/community/xslt/index.html. but i am
unable to get the results.

Below is the steps which we have followed:

1) We have created XML and XSLT file in /geoserver/data/wfs/transform

:moored.xml:

<transform>
  <sourceFormat>text/xml; subtype=gml/2.1.2</sourceFormat>
  <outputFormat>HTML</outputFormat>
  <outputMimeType>text/html</outputMimeType>
  <fileExtension>html</fileExtension>
  <xslt>moored.xslt</xslt>
</transform>

:moored.xslt:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:wfs="http://www.opengis.net/wfs&quot;
  xmlns:tiger="http://www.census.gov" xmlns:gml="http://www.opengis.net/gml&quot;
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform&quot;&gt;
  <xsl:template match="/">
    <html>
      <body>
      <xsl:for-each select="wfs:FeatureCollection/gml:featureMember/*">
        
<xsl:value-of select="@fid"/>

              Attribute
              Value
          
            <xsl:for-each select="./*[not(*)]">
            
                <xsl:value-of select="name()" />
              
                <xsl:value-of select="." />
              
            </xsl:for-each>
        
     </xsl:for-each>
     </body>
   </html>
  </xsl:template>
</xsl:stylesheet>

2) in http

http://localhost:8080/geoserver/odis/wfs?service=wfs&version=1.1.0&request=GetFeature&typeName=odis:moored&viewparams=startdate:05-12-2012;enddate:21-12-2012&outputformat=gml2

we are getting output as :

This XML file does not appear to have any style information associated with
it. The document tree is shown below.

<wfs:FeatureCollection xsi:schemaLocation="odis
http://localhost:8080/geoserver/odis/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=odis%3Amoored
http://www.opengis.net/wfs
http://localhost:8080/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd&quot;&gt;
<gml:boundedBy><gml:null>unknown</gml:null></gml:boundedBy><gml:featureMember><odis:moored
fid="moored.fid--42084a61_13bbbd1ce09_-7fb8"><odis:location><gml:Point
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326&quot;&gt;&lt;gml:coordinates
decimal="." cs="," ts="
">8.511,73.009</gml:coordinates></gml:Point></odis:location><odis:BUOY_ID>AD04</odis:BUOY_ID><odis:LONGITUDE>73.009</odis:LONGITUDE><odis:LATITUDE>8.511</odis:LATITUDE><odis:START_DATE>05-12-2012</odis:START_DATE><odis:END_DATE>21-12-2012</odis:END_DATE></odis:moored></gml:featureMember>
:::::::::::::::::
</wfs:FeatureCollection>

How to solve this problem?

with regards
Venkat

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/XSLT-for-WFS-output-module-tp5024227.html
Sent from the GeoServer - User mailing list archive at Nabble.com.