Recently I downloaded netbeans IDE from http://netbeans.org/ everything seemed to be working fine until I tried to validate my .xsd file in it.
It showed me an error “Cannot find the declaration of element 'xsd:schema'.” even though my xsd file was valid and began with xsd tag
Finally I fixed this by downloading the XSD editor plugin from as follows
1) Open "Plugins" dialog from “Tools” menu
2) Go to "Settings" tab
3) Add an update center:
- Name: NetBeans Dev
4) Wait for catalog to be downloaded
5) Back to "Available plugins" tab
6) Intall plugin called "XML Schema and WSDL"
Finally I could edit XSD files and validate with Source , Schema and Design view.