[mapserver-users] xslt transfofmr on getcapabilites of tinyows

Olivier Courtin olivier.courtin at gmail.com
Wed Jul 17 05:02:47 PDT 2013


Andrea,

I use the same Keywords than yours in my config file and it still 'works for me'
I guess you are trying to use WFS 1.0.0 and validating against 1.1.0 schema.

I generated both 1.0.0 and 1.1.0 capabilities with yours keywords,
and validation is fine in both use cases.

O.


On Wed, Jul 17, 2013 at 1:52 PM, aperi2007 <aperi2007 at gmail.com> wrote:
> I send you the info :
>
> TinyOWS version:   1.1.0
> TinyOWS revision:  commit 3851010
> FCGI support:      No
> Config File Path:  /home/...../tinyows-settings/config.xml (TinyOWS XML)
> PostGIS Version:   2.0.3
> PostGIS dsn:       host=..... user=.... password=..... dbname=.....
> port=.....
> Output Encoding:   UTF-8
> Database Encoding: UTF8
> Schema dir: /home/...../tinyows-settings/share/tinyows/schema/
> Log file:          /home/...../tinyows-settings/logs/tinyows2.log
> Log level:         ERROR EVENT QUERY SQL
> Display bbox:      Yes
> Estimated extent:  Yes
> Check schema:      Yes
> Check valid geoms: Yes
> Max features:      20000
> Available layers:
>  - ambiti_amministrativi.v_lista_comuni (3003) -> sita:listacomunirtpoly [R]
>  - ambiti_amministrativi.v_lista_province (3003) -> sita:listaprovincertpoly
> [R]
>  - inquadramenti.f2k_polygon (3003) -> sita:idinq2krtpoly [R]
>  - inquadramenti.e5k_polygon (3003) -> sita:idinq5krtpoly [R]
>  - inquadramenti.s10k_polygon (3003) -> sita:idinq10krtpoly [R]
>  - inquadramenti.f50k_polygon (3003) -> sita:idinq50krtpoly [R]
>  - fotogrammi.v_fotogrammi (25832) -> sita:idfotogrammirtpoly [R]
>  - catasto.v_foglibb_box (3003) -> sita:idcatastofoglibbrtpoly [R]
>  - catasto.v_foglibb_centroide (3003) -> sita:idcatastofoglibbrtpoint [R]
>  - catasto.v_particellebb_box (3003) -> sita:idcatastoparticellebbrtpoly [R]
>  - catasto.v_particellebb_centroide (3003) ->
> sita:idcatastoparticellebbrtpoint [R]
>  - iternet.v_strade_toponimo_ordinato (3003) -> sita:idstradertline [R]
>  - toponimi.toponimi (3003) -> sita:idtoponimirtpoly [R]
>  - idrografia.v_corsi_comune (3003) -> sita:idfiumirtline [R]
>
>
> I remove the keywords from my layers in the config.xml to skip the
> validation problem.
> SO I read them to show as it was before.
> see in attach the zip.
>
> Regards,
>
> Andrea.
>
>
> On 17/07/2013 11:15, Olivier Courtin wrote:
>>
>> Hi Andrea,
>>
>> First i could not reproduce your problem with TinyOWS.
>> I use trunk version (so really close to 1.1.0).
>>
>> Could you provide tinyows -h output ?
>> Could you provide tinyows config file ?
>>
>>
>>
>> Second, i could not reproduce your problem with XPath either ^^
>> as following works for me:
>>
>>
>> xsltproc foo.xsl capa.xml
>>
>> With foo.xsl:
>>
>> <?xml version="1.0"?>
>> <xsl:stylesheet version="1.0"
>> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>>
>> <xsl:template>
>>    <xsl:value-of select="//FeatureTypeList/FeatureType[1]/Name" />
>> </xsl:template>
>>
>> </xsl:stylesheet>
>>
>>
>> HTH,
>>
>> O.
>>
>>
>>
>> On Tue, Jul 16, 2013 at 11:53 PM, Andrea Peri <aperi2007 at gmail.com> wrote:
>>>
>>> I open a ticket for this issue on keyword.
>>>
>>> https://github.com/mapserver/tinyows/issues/61
>>>
>>> Regards.
>>>
>>>
>>> 2013/7/16 Andrea Peri <aperi2007 at gmail.com>
>>>>
>>>> Hi,
>>>>
>>>> I test it with a validate tool,
>>>> Effectively there was an error.
>>>>
>>>>> Element <Keywords> is not allowed under element <FeatureType>.
>>>>
>>>> So I remove the keywords definition from my tiny config.xml,
>>>>
>>>> After this the xml was valid, but always the
>>>>
>>>> <xsl:value-of select="//FeatureTypeList/FeatureType/Name" />
>>>>
>>>> don't return the right value.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 2013/7/16 Olivier Courtin <olivier.courtin at gmail.com>
>>>>>
>>>>> If you have a doubt on a XML provided by a WFS server,
>>>>> there's OGC XSD you could use to validate against.
>>>>> (look in tinyows/schema dir)
>>>>>
>>>>> O.
>>>>>
>>>>> On Tue, Jul 16, 2013 at 5:39 PM, Andrea Peri <aperi2007 at gmail.com>
>>>>> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I'm try.ing to trasform an xml from tinyows.
>>>>>>
>>>>>> But it seem don't work.
>>>>>>
>>>>>> Perhaps there a problem with the xml of tiny ?
>>>>>>
>>>>>> On this call:
>>>>>>
>>>>>>
>>>>>>
>>>>>> http://www502.regione.toscana.it/wfsvector/com.rt.wfs.RTmap/wfs?SERVICE=WFS&REQUEST=GetCapabilities&version=1.1.0
>>>>>>
>>>>>> I'm trying to apply this trasformation:
>>>>>>
>>>>>> <xsl:value-of select="//FeatureTypeList/FeatureType[1]/Name" />
>>>>>>
>>>>>> to retrieve the name of first FeatureType.
>>>>>>
>>>>>> But the xsltproc always return null.
>>>>>>
>>>>>> I'm not sure of my xpath, but it seem ok,
>>>>>>
>>>>>> Any help is welcome.
>>>>>>
>>>>>> --
>>>>>> -----------------
>>>>>> Andrea Peri
>>>>>> . . . . . . . . .
>>>>>> qwerty אטלעש
>>>>>>
>>>>>> -----------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> mapserver-users mailing list
>>>>>> mapserver-users at lists.osgeo.org
>>>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Olivier
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> -----------------
>>>> Andrea Peri
>>>> . . . . . . . . .
>>>> qwerty אטלעש
>>>> -----------------
>>>
>>>
>>>
>>>
>>> --
>>> -----------------
>>> Andrea Peri
>>> . . . . . . . . .
>>> qwerty אטלעש
>>> -----------------
>>
>>
>>
>



-- 
Olivier


More information about the mapserver-users mailing list