<?xml-stylesheet href="../../../style/xml-full.css" type="text/css"?>
<?xml-stylesheet href="css3-modsel-36.css" type="text/css"?>
<test xmlns:xlink="http://www.w3.org/1999/xlink">
 <title>:only-child pseudo-class</title>
 <author>Daniel Glazman</author>
 <metadata>
  <item> <name>CSS 3 Module</name> <data>W3C Selectors</data> </item>
  <item> <name>Next</name> <data xlink:type="simple" xlink:href="css3-modsel-37.xml">:only-of-type pseudo-class</data> </item>
  <item> <name>Previous</name> <data xlink:type="simple" xlink:href="css3-modsel-35.xml">:last-of-type pseudo-class</data> </item>
  <item> <name>Test #</name> <data>41 of 271 of the static tests category</data> </item>
  <item> <name>Testing</name> <data>:only-child pseudo-class</data> </item>
  <item> <name>ID</name> <data>36</data> </item>
  <item> <name>Date</name> <data>2001-07-11</data> </item>
  <item> <name>Revision</name> <data>1.0</data> </item>
 </metadata>
  <content>
<p xmlns="http://www.w3.org/1999/xhtml">This paragraph should have normal background</p>
<div xmlns="http://www.w3.org/1999/xhtml">This div contains only one paragraph
    <p class="red">This paragraph should have green background</p>
</div>
</content>
  <source>
   <css>.red { background-color : red }
p:only-child { background-color : lime }
div.testText &gt; div &gt; p { margin-left : 1em }
</css>
   <xml>
&lt;p xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;This paragraph should have normal background&lt;/p&gt;
&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;This div contains only one paragraph
    &lt;p class=&quot;red&quot;&gt;This paragraph should have green background&lt;/p&gt;
&lt;/div&gt;
</xml>
  </source>
</test>