Olá,
Esse erro de validação acontece porque o código que faz a validação não foi
estendido
para ter esse elemento em conta. Ou seja independentemente desse erro de
validação,
o estilo (parece) estar coreto e vai ser corretamente interpretado pelo código
que vai
desenhar o mapa.
Eu fiz um teste com este estilo, que também falha a validação, e o mapa
produzido
estava de acordo com as expetativas:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
xmlns="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<Name>polygon</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<Name>rule</Name>
<PolygonSymbolizer>
<Fill>
<GraphicFill>
<Graphic>
<ExternalGraphic>
*<OnlineResource xlink:type="simple" xlink:href="grass_fill.png" />*
<Format>image/png</Format>
</ExternalGraphic>
</Graphic>
</GraphicFill>
</Fill>
*<VendorOption name="graphic-margin">10</VendorOption>*
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Note-se que a imagem referenciada têm que estar disponível no /class-path,/
e.g. dentro da
pastas /styles/,//ou deve fornecer o caminho completo para a imagem.
Pode criar um ticket para o problema de validação:
http://geoserver.org/issues/
Cumprimentos,
Nuno Oliveira//
On 03/22/2018 06:10 PM, Aline Maria Kieras wrote:
Olá!!
Estou usando a versão 2.12.1 do geoserver e o tópico da documentação 'Adding space around graphic
fills' permite o uso do <VendorOption name="*graphic-margin*">10</VendorOption> para espaçar os
símbolos usados para estilizar com o *'graphic
fills'.*/(http://docs.geoserver.org/2.12.1/user/styling/sld/extensions/margins.html)/
Mas quando insiro a informação no sld, o erro abaixo é exibido (ver print).
Foi detectado um conteúdo inválido começando com o elemento 'VendorOption'. Era esperado um dos
'{"http://www.opengis.net/sld":Stroke}'.
*O que pode estar errado?*
/Segue dois exemplos de .sld com problema./
------------------------------------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<sld:StyledLayerDescriptor version="1.0.0" xmlns:sld="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld ./Sld/StyledLayerDescriptor.xsd">
<sld:NamedLayer>
<sld:Name>Default</sld:Name>
<sld:UserStyle>
<sld:Name>Default</sld:Name>
<sld:Title>Default</sld:Title>
<sld:FeatureTypeStyle>
<sld:Rule>
<sld:Name>Polygon</sld:Name>
<sld:Title>Polygon</sld:Title>
<sld:PolygonSymbolizer>
<sld:Fill>
<sld:GraphicFill>
<sld:Graphic>
<sld:ExternalGraphic>
<sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:href="./rockFillSymbol.png"/>
<sld:Format>image/png</sld:Format>
</sld:ExternalGraphic>
</sld:Graphic>
</sld:GraphicFill>
</sld:Fill>
<VendorOption name="graphic-margin">10</VendorOption>
</sld:PolygonSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
------------------------------------
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<sld:StyledLayerDescriptor version="1.0.0" xmlns:sld="http://www.opengis.net/sld"
xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld ./Sld/StyledLayerDescriptor.xsd">
<sld:NamedLayer>
<sld:Name>Default</sld:Name>
<sld:UserStyle>
<sld:Name>Default</sld:Name>
<sld:Title>Default</sld:Title>
<sld:FeatureTypeStyle>
<sld:Rule>
<sld:Name>Polygon</sld:Name>
<sld:Title>Polygon</sld:Title>
<sld:PolygonSymbolizer>
<sld:Fill>
<sld:CssParameter name="fill">#AACBAF</sld:CssParameter>
</sld:Fill>
<sld:Stroke>
<sld:CssParameter name="stroke">#91A995</sld:CssParameter>
</sld:Stroke>
</sld:PolygonSymbolizer>
<sld:PolygonSymbolizer>
<sld:Fill>
<sld:GraphicFill>
<sld:Graphic>
<sld:ExternalGraphic>
<sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple"
xlink:href="ICONES/Cemiterio_0.png"/>
<sld:Format>image/png</sld:Format>
</sld:ExternalGraphic>
<sld:Size>15</sld:Size>
</sld:Graphic>
</sld:GraphicFill>
</sld:Fill>
<VendorOption name="graphic-margin">10</VendorOption>
</sld:PolygonSymbolizer>
</sld:Rule>
</sld:FeatureTypeStyle>
</sld:UserStyle>
</sld:NamedLayer>
</sld:StyledLayerDescriptor>
Att.
**
*Aline Kieras*
*Qualificação da Informação*
(31) 3263 1122
aline.kie...@digicade.com.br <mailto:aline.kie...@digicade.com.br>
www.digicade.com.br <http://www.digicade.com.br/>
Digicade
------------------------------------------------------------------------------
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
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Regards,
Nuno Oliveira
==
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
fax: +39 0584 1660272
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
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users