Why it fails is because of the following lines in the XHTML DTD: <!ELEMENT html (head, body)> <!ATTLIST html %i18n; id ID #IMPLIED xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml' >
This will add a default namespace to your XML, so your XML in reality looks like: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Title</title> <style> body{ background: blue; } </style> </head> <body> <div id="main"> HI! </div> </body> </html> Note to XML designers, please avoid using fixed 'xmlns' attributes in your DTDs. To fix this, you will have to map your namespace-URI to a prefix and then use this prefix in your XPath searches. Please have a look at previous mails to this list to find out how to do this. For some more background information: http://www.edankert.com/defaultnamespaces.html Regards, Edwin -- http://www.edankert.com/ N�HY隊X���'���u���[������� ަ�k��!���W�~�鮆�zk��C� [EMAIL PROTECTED],����a{���,�H��4�m���i�(��ܢo�v'