With Rule based SLDs, you need to set up a rule for each case. You cannot nest rules.
In the following example, I want to use attribute based rendering for scale<25000. In this case if the height is deeper than -10, I want a red marker, otherwise I want a green marker.
For map scale>250000, I want a small blue marker.
Thus there need to be 3 rules.
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.opengis.net/sld" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>GPS_points</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<Name>GPS_points</Name>
<Title>GPS_points</Title>
<ogc:Filter>
<ogc:PropertyIsLessThan>
<ogc:PropertyName>height</ogc:PropertyName>
<ogc:Literal>-10</ogc:Literal>
</ogc:PropertyIsLessThan>
</ogc:Filter>
<MinScaleDenominator>100</MinScaleDenominator>
<MaxScaleDenominator>250000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#cc0123</CssParameter>
<CssParameter name="fill-opacity">1.0</CssParameter>
</Fill>
</Mark>
<Size>3</Size>
<Rotation>0</Rotation>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<Name>GPS_points</Name>
<Title>GPS_points</Title>
<ogc:Filter>
<ogc:PropertyIsGreaterThanOrEqualTo>
<ogc:PropertyName>height</ogc:PropertyName>
<ogc:Literal>-10</ogc:Literal>
</ogc:PropertyIsGreaterThanOrEqualTo>
</ogc:Filter>
<MinScaleDenominator>100</MinScaleDenominator>
<MaxScaleDenominator>250000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#11cc99</CssParameter>
<CssParameter name="fill-opacity">1.0</CssParameter>
</Fill>
</Mark>
<Size>3</Size>
<Rotation>0</Rotation>
</Graphic>
</PointSymbolizer>
</Rule>
<Rule>
<Name>GPS_points</Name>
<Title>GPS_points</Title>
<MinScaleDenominator>250000</MinScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#110cd3</CssParameter>
<CssParameter name="fill-opacity">1.0</CssParameter>
</Fill>
</Mark>
<Size>1</Size>
<Rotation>0</Rotation>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>