Hi,
I actually thought the attribute checks was not there on complex features,
but looking at
the code, it seems it never got excluded.

Rationale: only a certain subset of attributes can really be checked for
existence against
the schema, e.g., what do you do when a xpath is crossing a polymorphic
type, maybe
the SLD has a filter ensuring that the features are of the right type with
the right attribute,
but one cannot predict that until the actual rendering is done.

If my understanding is correct, it would be maybe best not to perform the
attribute
existence checks against complex features, or implement a version that's
smart enough
to ignore xpaths crossing polymorphic types.

Cheers
Andrea


On Tue, Apr 11, 2017 at 12:54 PM, Nuno Oliveira <
nuno.olive...@geo-solutions.it> wrote:

> Hi,
>
> You don't need to explicitly set the geometry attribute, removing:
>
> *<Geometry>*
>
> *  <ogc:PropertyName>net:geometry</ogc:PropertyName>*
> *</Geometry>*
>
> should get you what you expect.
>
> In any case, when referencing a complex feature attribute (i.e. when using
> app-schema) a XPath expression needs to be used:
> http://docs.geoserver.org/latest/en/user/data/app-
> schema/wms-support.html#getmap
>
> The WFS NULL namespaces issue should have been fixed some time ago:
> https://osgeo-org.atlassian.net/browse/GEOS-8017
>
> If you are using a version that got the fix (2.10.3
> <https://osgeo-org.atlassian.net/issues/?jql=project+%3D+GEOS+AND+fixVersion+%3D+2.10.3>,
> 2.12-beta
> <https://osgeo-org.atlassian.net/issues/?jql=project+%3D+GEOS+AND+fixVersion+%3D+2.12-beta>,
> 2.11.1
> <https://osgeo-org.atlassian.net/issues/?jql=project+%3D+GEOS+AND+fixVersion+%3D+2.11.1>)
> please open a ticket for it.
>
> Regards,
>
> Nuno Oliveira
>
>
> On 04/11/2017 09:41 AM, Kirk, Victor (GB) wrote:
>
> I’m trying to get WMS working for an appschema I’ve set up, but I get the
> error :
>
>
>
>   *“The requested Style can not be used with this layer.  The style
> specifies an attribute of net:geometry and the layer is:
> tn-ra:inspire_stations”.*
>
>
>
> I’ve stepped through the look up in the debugger and I can see the Name
> instance used to look up the attribute descriptor does not have a namespace
> entry so a match is not found.  I tried setting the default namespace in
> the sld but get the same error.  I’ve also tried accessing the service with
> and without the workspace namespace, I tried this as the WFS comes out with
> null namespaces when you use the workspace namespace.
>
>
>
> Can anyone tell me if I’m missing something obvious?
>
>
>
> SLD:
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <sld:StyledLayerDescriptor xmlns:sld="http://www.opengis.net/sld";
> <http://www.opengis.net/sld>
>
>                            xmlns:ogc="http://www.opengis.net/ogc";
> <http://www.opengis.net/ogc>
>
>                        xmlns:xsi="http://www.w3.org/2001/
> XMLSchema-instance" <http://www.w3.org/2001/XMLSchema-instance>
> version="1.1.0"
>
>                        xmlns:gml="http://www.opengis.net/gml";
> <http://www.opengis.net/gml>
>
>                        xmlns:se="http://www.opengis.net/se";
> <http://www.opengis.net/se>
>
>                        xmlns:net="http://inspire.ec.
> europa.eu/schemas/net/4.0" <http://inspire.ec.europa.eu/schemas/net/4.0>
>
>                        xsi:schemaLocation="http://www.opengis.net/sld
> http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd";
> <http://www.opengis.net/sldhttp://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd>
> >
>
>   <sld:NamedLayer>
>
>     <se:Name>TN.CommonTransportElements.TransportNode</se:Name>
>
>     <sld:UserStyle>
>
>       <se:Name>TN.CommonTransportElements.TransportNode</se:Name>
>
>       <sld:IsDefault>1</sld:IsDefault>
>
>       <se:FeatureTypeStyle version="1.1.0">
>
>         <se:Description>
>
>           <se:Title>Transport Node</se:Title>
>
>           <se:Abstract></se:Abstract>
>
>         </se:Description>
>
>         <se:Rule>
>
>           <se:PointSymbolizer>
>
> *<Geometry>*
>
> *  <ogc:PropertyName>net:geometry</ogc:PropertyName>*
>
> *</Geometry>*
>
>             <se:Graphic>
>
>               <se:Mark>
>
>                 <se:WellKnownName>circle</se:WellKnownName>
>
>                 <se:Fill>
>
>                   <se:SvgParameter name="fill">#FF0000</se:SvgParameter>
>
>                 </se:Fill>
>
>                 <se:Stroke>
>
>                   <se:SvgParameter name="stroke">#000000</se:SvgParameter>
>
>                   <se:SvgParameter name="stroke-width">1</se:SvgParameter>
>
>                 </se:Stroke>
>
>               </se:Mark>
>
>               <se:Size>3</se:Size>
>
>             </se:Graphic>
>
>           </se:PointSymbolizer>
>
>         </se:Rule>
>
>       </se:FeatureTypeStyle>
>
>     </sld:UserStyle>
>
>   </sld:NamedLayer>
>
> </sld:StyledLayerDescriptor>
>
>
>
> An example feature:
>
>
>
> <wfs:member>
>
>   <tn-ra:RailwayStationNode gml:id=" stations.1">
>
>     <gml:name>A name recently</gml:name>
>
>     <net:beginLifespanVersion xsi:nil="true" nilReason="http://
> inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated"
> <http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated>/>
>
>     <net:inNetwork xsi:nil="true" nilReason="http://inspire.ec.
> europa.eu/codelist/VoidReasonValue/Unpopulated"
> <http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated>/>
>
> *    <net:geometry>*
>
> *
> <gml:Point gml:id="stations-geom.1" srsDimension="2" 
> srsName="http://www.opengis.net/gml/srs/epsg.xml#27700";
> <http://www.opengis.net/gml/srs/epsg.xml#27700>>*
>
> *        <gml:pos>`12345.678 12345.678 </gml:pos>*
>
> *      </gml:Point>*
>
> *    </net:geometry>*
>
>     <tn:validFrom xsi:nil="true" nilReason="http://inspire.ec.
> europa.eu/codelist/VoidReasonValue/Unpopulated"
> <http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated>/>
>
>     <tn-ra:formOfNode xlink:href="http://inspire.ec.europa.eu/codelist/
> FormOfRailwayNodeValue/railwayStop"
> <http://inspire.ec.europa.eu/codelist/FormOfRailwayNodeValue/railwayStop>
> />
>
>     <tn-ra:numberOfPlatforms xsi:nil="true" nilReason="http://
> inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated"
> <http://inspire.ec.europa.eu/codelist/VoidReasonValue/Unpopulated>/>
>
>   </tn-ra:RailwayStationNode>
>
> </wfs:member>
>
>
>
> Kind Regards, Vic
>
>
>
>
>
>
>
> [image: Cubic Transportation Systems] <http://cts.cubic.com/>
>
> *Victor Kirk*
>
> Senior Software Engineer
>
> Cubic Transportation Systems Ltd
>
> +44 (1642) 636894
>
> cubic.com/transportation
>
> [image: NextCity]
> <http://www.youtube.com/watch?v=qhd6XYP2DBE&feature=related>
>
> [image: RSS] <http://cts.cubic.com/Publications/CubicBlog.aspx>
>
> [image: Facebook] <https://www.facebook.com/CubicTransportationSystems>
>
> [image: Twitter] <https://twitter.com/CubicTS>
>
> [image: LinkedIn] <http://www.linkedin.com/company/cubic>
>
> [image: YouTube] <http://www.youtube.com/user/CubicTS>
>
>
>
> *Co-Winner, London Award for Innovation, London contactless bankcard
> payment system*
>
> *London First Awards 2017*
>
> *Co-Winner, Best Product/Innovation of the Year, NextAgent Virtual
> Ticketing*
>
> *Global AirRail Alliance Awards (2017)*
>
> <http://www.cubic.com/Transportation/About-CTS/Awards>
> http://www.cubic.com/Transportation/About-CTS/Awards
>
>
>
> ------------------------------
>
> This document is intended for, and should only be read by, those persons
> to whom it is addressed. Its contents are confidential and if you have
> received this message in error, please delete it. Any form of reproduction,
> dissemination, copying, disclosure, modification, distribution and / or
> publication of this message without our prior written consent is strictly
> prohibited.
>
> Any views expressed in this message are those of the individual sender,
> and do not necessarily represent the position of Cubic Transportation
> Systems (ITMS) Limited (‘CTS’). Furthermore CTS does not authorise or use
> e-mail for official contractual correspondence. Nothing received in e-mail
> has any contractual validity.
>
> CTSL and each legal entity in Cubic Corporation reserve the right to
> monitor all e-mail communications through its networks.
>
> Registered Office:
> Cubic Transportation Systems Ltd
> AFC House
> Honeycrock Lane
> Salfords
> Surrey
> RH1 5LA
> United Kingdom
>
> Registered in England under number 8498086
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Geoserver-users mailing 
> listGeoserver-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> --
> ==
> GeoServer Professional Services from the experts!
> Visit http://goo.gl/it488V for more information.
> ==
> Nuno Miguel Carvalho Oliveira
> @nmcoliveira
> Software Engineer
>
> GeoSolutions S.A.S.
> Via di Montramito 3/A
> 55054  Massarosa (LU)
> Italy
>
> phone: +39 0584 962313 <+39%200584%20962313>
> fax:   +39 0584 1660272 <+39%200584%20166%200272>
> mob:   +39  333 8128928 <+39%20333%20812%208928>
> http://www.geo-solutions.ithttp://twitter.com/geosolutions_it
>
> -------------------------------------------------------
>
> AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
> Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i 
> file/s allegato/i sono
> da considerarsi strettamente riservate. Il loro utilizzo è consentito 
> esclusivamente al destinatario del messaggio, per le finalità indicate
> nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il 
> destinatario, Vi preghiamo cortesemente di darcene notizia via e
> -mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal 
> Vostro sistema. Conservare il messaggio stesso, divulgarlo
> anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per 
> finalità diverse, costituisce comportamento contrario ai
> principi dettati dal D.Lgs. 196/2003.
>
> The information in this message and/or attachments, is intended solely for 
> the attention and use of
> the named addressee(s) and may be confidential or proprietary in nature or 
> covered by the provisions of privacy act (Legislative Decree
> June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in 
> accord with its purpose, any disclosure, reproduction, copying,
> distribution, or either dissemination, either whole or partial, is strictly 
> forbidden except previous formal approval of the named
> addressee(s). If you are not the intended recipient, please contact 
> immediately the sender by telephone, fax or e-mail and delete the
> information in this message that has been received in error. The sender does 
> not give any warranty or accept liability as the content,
> accuracy or completeness of sent messages and accepts no responsibility  for 
> changes made after they were sent or for other risks which
> arise as a result of e-mail transmission, viruses, etc.
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>


-- 
==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via di Montramito 3/A
55054  Massarosa (LU)
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

*AVVERTENZE AI SENSI DEL D.Lgs. 196/2003*

Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il
loro utilizzo è consentito esclusivamente al destinatario del messaggio,
per le finalità indicate nel messaggio stesso. Qualora riceviate questo
messaggio senza esserne il destinatario, Vi preghiamo cortesemente di
darcene notizia via e-mail e di procedere alla distruzione del messaggio
stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso,
divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od
utilizzarlo per finalità diverse, costituisce comportamento contrario ai
principi dettati dal D.Lgs. 196/2003.



The information in this message and/or attachments, is intended solely for
the attention and use of the named addressee(s) and may be confidential or
proprietary in nature or covered by the provisions of privacy act
(Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection
Code).Any use not in accord with its purpose, any disclosure, reproduction,
copying, distribution, or either dissemination, either whole or partial, is
strictly forbidden except previous formal approval of the named
addressee(s). If you are not the intended recipient, please contact
immediately the sender by telephone, fax or e-mail and delete the
information in this message that has been received in error. The sender
does not give any warranty or accept liability as the content, accuracy or
completeness of sent messages and accepts no responsibility  for changes
made after they were sent or for other risks which arise as a result of
e-mail transmission, viruses, etc.

-------------------------------------------------------
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to