I think that adding "soft" validation for different services is going to be
out of the scope of what I can do for this iteration. The goal here is not
specifically to ensure that capabilities documents are valid but to make
sure that the links in the REST API are correct/consistent.  With this goal
in mind I think an appropriate fix would be to validate by testing that the
name url-encodes to itself rather than requiring it to be a valid XML
element name.  This should make the coverages with numeric prefixes valid
again and resolve the issue that Andrea brings up.

Jukka, the problem you cited with the Wicket form validating the *old*
value does sound like it needs attention; I will try to correct that also.

On Thu, Jan 22, 2015 at 9:35 AM, Rahkonen Jukka (MML) <
jukka.rahko...@maanmittauslaitos.fi> wrote:

>  Hi,
>
>
>
> I made a short test with 2.7-beta and found that validation does not
> actually work just as planned from the UI.
>
> -          I changed coverage name “Img_Sample” into “Img Sample” from
> the UI. Observe that it is possible.
>
> -          Checked how the layer/coverage name is advertised in some
> services:
>
>
>
> WMS 1.3.0 <Name>nurc:Img Sample</Name>
>
> WCS 1.1.1 <wcs:Identifier>Img Sample</wcs:Identifier>
>
> WCS 2.0.1 <wcs:CoverageId>nurc__Img Sample</wcs:CoverageId>
>
>
>
> -          The others are OK but I suppose that WCS 2.0.1 is not because
> the spec mandates that coverageID is NCName and space is not allowed if I
> understand NCName right. Name would be wrong also as WFS FeatureType name
> for all versions.
>
> -          Tried to change “Img Sample” back to something acceptable but
> it is not possible from UI. Error is:
>
> “Validation failed with 1 errors. First error message is: Name 'Img
> Sample' is not legal XML'”.
>
>
>
> Validation seems to happen in a bit wrong place. First change into invalid
> name was OK because the original name was acceptable. Second edit fails
> because the existing name, which is wrong in this state, is checked. I had
> to edit XML files in data_dir manually before UI could cope with this layer
> again.
>
>
>
> We have a trouble because the default layer name or the edited name from
> the Basic Resource Info is automatically used in all services. WCS 2.0.1
> makes a difference because it tries to build a valid NCName by removing
> colon and nurc: is changes into nurc__. However, it does not analyze the
> base name of the layer and not-allowed space is accepted.
>
>
>
> Automatic validation and denial is probably too strong operation, but as a
> user I would appreciate some kind of warnings:
>
>
>
> WARNING: '137105_CSKS3_DGM_B_HR_01_VV_RA_FF_20141017035343_20141017035413'
> is not legal name for the following services:
>
> WFS (all versions)
>
>
>
>  WARNING: 'Img Sample' is not legal name for the following services:
>
> WFS (all versions)
>
> WCS 2.x
>
> WARNING: ‘Img Sample’ name contains characters which can lead to failure
> with some client programss:
>
> White space,[list other characters].
>
>
>
> Perhaps we will need a lookup table that allows fine grained control of
> advertised layer names in different services and versions.
>
>
>
> -Jukka Rahkonen-
>
>
>
>
>
>
>
>
>
> -Jukka Rahkonen-
>
>
>
>
>
>
>
> *Lähettäjä:* Andrea Aime [mailto:andrea.a...@geo-solutions.it
> <andrea.a...@geo-solutions.it>]
> *Lähetetty:* 22. tammikuuta 2015 15:41
> *Vastaanottaja:* Geoserver-devel
> *Aihe:* Re: [Geoserver-devel] Regression in 2.7.x, valid coverage names
> are rejected because not valid xml names
>
>
>
> Ah hem, errata corrige, the commit in question was also silently
> backported to 2.6.x,
>
> so we have the same regression on the stable series...
>
>
>
> Cheers
>
> Andrea
>
>
>
> On Thu, Jan 22, 2015 at 12:44 PM, Andrea Aime <
> andrea.a...@geo-solutions.it> wrote:
>
> On Thu, Jan 22, 2015 at 12:37 PM, Andrea Aime <
> andrea.a...@geo-solutions.it> wrote:
>
> On Thu, Jan 22, 2015 at 12:30 PM, Andrea Aime <
> andrea.a...@geo-solutions.it> wrote:
>
> For the record, found the pull, not the discussion:
>
> https://github.com/geoserver/geoserver/pull/786
>
>
>
> Found the discussion too:
>
> http://osgeo-org.1560.x6.nabble.com/Layer-and-store-names-td5167890.html
>
>
>
> I did agree back then... and I was wrong, probably was thinking just of
>
> invalid feature type names.
>
>
>
> Reading though the discussion, we all agreed about some sort of
> validation, but it did not have
>
> xml safe one.
>
> What about using the xml safe pattern for feature types, and something
> more relaxed for
>
> everything else, like no spaces, and/or valid file name, or something of
> the sort?
>
>
>
> Cheers
>
> Andrea
>
>
>
>
>
> --
>
> ==
>
> GeoServer Professional Services from the experts! Visit
>
> http://goo.gl/NWWaa2 for more information.
>
> ==
>
>
>
> Ing. Andrea Aime
>
> @geowolf
>
> Technical Lead
>
>
>
> GeoSolutions S.A.S.
>
> Via Poggio alle Viti 1187
>
> 55054  Massarosa (LU)
>
> Italy
>
> 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.
>
>
>
> -------------------------------------------------------
>
>
>
>
>
> --
>
> ==
>
> GeoServer Professional Services from the experts! Visit
>
> http://goo.gl/NWWaa2 for more information.
>
> ==
>
>
>
> Ing. Andrea Aime
>
> @geowolf
>
> Technical Lead
>
>
>
> GeoSolutions S.A.S.
>
> Via Poggio alle Viti 1187
>
> 55054  Massarosa (LU)
>
> Italy
>
> 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.
>
>
>
> -------------------------------------------------------
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> Geoserver-devel mailing list
> Geoserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>


-- 
David Winslow
Software Engineer | Boundless <http://boundlessgeo.com/>
dwins...@boundlessgeo.com
917-388-9085
@boundlessgeo <http://twitter.com/boundlessgeo/>
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to