The DTD says the contents of <rootelement>
can be one of two forms; your actual document contains both of them. Pick one, or change the DTD.
I suspect Netbeans is simply not validating, and hence is not noticing the problem.
By the way, DTDs are VERY poorly suited to working with namespaced documents -- and I certainly hope you've bound the c:
prefix to a namespace! -- so I'd strongly recommend switching to XML Schemas, which are a more powerful replacement for DTDs.