Jeff Turner wrote: > > I have some standard JAXP 1.1 code (listed at the end) that works with Xerces > and fails with Crimson. It seems Crimson doesn't like XML namespaces. If I try > to create a DOM by parsing: > > <!DOCTYPE foo [ > <!ELEMENT foo (#PCDATA)> > ]> > <foo xmlns="http://www.foo.com"/> > > I'll get an error claiming 'Attribute "xmlns" is not declared for element "foo".' > > That makes perfect sense from a pre-namespaces perspective, but shouldn't a > namespace-aware parser be able to handle this?
Turning on validation performs DTD validation which does not know anything about namespaces. In your DTD, you specify an element "foo" but no attributes for "foo". Try adding something like the following to you DTD: <!ATTLIST foo xmlns CDATA #IMPLIED> Not sure why it would work using Xerces. Which version? May be a bug. -Edwin --------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]