0

It generates the following error:

línea 17: cvc-complex-type.2.4.a: Se ha encontrado contenido no válido a partir del elemento 'PropertyIsEqualTo'. Se esperaba uno de '{"http://www.opengis.net/ogc":spatialOps", http://www.opengis.net/ogc":comparisonOps ", http://www.opengis.net/ogc ": logicOps", http://www.opengis.net/ogc":FeatureId} '.

My code:

<?xml version="1.0" encoding="ISO-8859-1"?>
<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>asia_cap_por</Name>
    <UserStyle>
      <Title>asia_cap_por</Title>
      <FeatureTypeStyle>
        <Rule>
          <Name>Baja</Name>
          <Title>Baja: 1.00 - 2.00 Kg/cm2</Title>
          <ogc:Filter>
            <PropertyIsEqualTo>
              <ogc:PropertyName>valor</ogc:PropertyName>
              <ogc:Literal>baja</ogc:Literal>
            </PropertyIsEqualTo>
          </ogc:Filter>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#FFAA00</CssParameter>
            </Fill>
          </PolygonSymbolizer>
        </Rule>

        <Rule>
          <Name>Media: 2.00 - 3.00 Kg/cm2</Name>
          <Title>Media: 2.00 - 3.00 Kg/cm2</Title>
          <ogc:Filter> 
              <PropertyIsEqualTo>
                <ogc:PropertyName>valor</ogc:PropertyName>
                <ogc:Literal>media</ogc:Literal>
              </PropertyIsEqualTo>

          </ogc:Filter>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#FFFF73</CssParameter>
                         </Fill>
          </PolygonSymbolizer>
        </Rule>

        <Rule>
          <Name>Alta</Name>
          <Title>Alta: > 3.00 Kg/cm2</Title>
          <ogc:Filter>
            <PropertyIsEqualTo>
              <ogc:PropertyName>valor</ogc:PropertyName>
              <ogc:Literal>alta</ogc:Literal>
            </PropertyIsEqualTo>
          </ogc:Filter>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#4CE600</CssParameter>
            </Fill>
          </PolygonSymbolizer>
        </Rule>        

        <Rule>
          <TextSymbolizer>
         <Label>
           <ogc:PropertyName>descrip</ogc:PropertyName>
         </Label>
         <Font>
           <CssParameter name="font-family">Arial</CssParameter>
           <CssParameter name="font-size">10</CssParameter>
           <CssParameter name="font-style">normal</CssParameter>
           <CssParameter name="font-weight">bold</CssParameter>
         </Font>
         <Halo>
           <Radius>3</Radius>
           <Fill>
             <CssParameter name="fill">#FFFFFF</CssParameter>
           </Fill>
         </Halo>
       </TextSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>
  • 1
    Welcome the GIS StackExchange. Please check out the "How to ask a question" guide in the Help section: gis.stackexchange.com/help/how-to-ask For this question, we need a bit more specificity. What is the "it" that creates the error? – HeikkiVesanto Nov 22 '18 at 15:35
3

Everything in your Filter block must be in the ogc: namespace, so:

      <ogc:Filter>
        <ogc:PropertyIsEqualTo>
          <ogc:PropertyName>valor</ogc:PropertyName>
          <ogc:Literal>baja</ogc:Literal>
        </ogc:PropertyIsEqualTo>
      </ogc:Filter>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.