Hello Michael, Thank you for your response. If I cannot replace the DTD specified in the DOCTYPE tag, then short of removing the tag all together, does this mean there is no way for me to get XML validation to work (since that does require notifying the parser about my schema XSD file). Or can I get this functionality by returning null from the resolver and then assigning a schema to the parser/validator?
I tried to reduce my "schema" tag definition in my xsd to: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> but I still get the error. I suppose my error is result of the resolver issue rather than the namespace declaration. John > > I have an XML document which has a DOCTYPE tag referencing a DTD. > Instead I want to reference an XSD which specifies this document > structure. I use the XMLCatalogResolver to detect the publicId in the > DOCTYPE and replace it with a URI pointing to the XSD. You can't replace the DTD with a schema. Whatever you return from this call to the resolver needs to be a DTD (in other words must match [1] the extSubset [2] production from the XML 1.0 specification) or null if you want the parser to use its default resolution mechanism. > I think this > part is working, however I get an error during the sax parsing: "The > markup declarations contained or pointed to by the document type > declaration must be well-formed." I believe the XML is well-formed > because if I omit the DOCTYPE tag from the XML document the parsing > occurs without error. The namespace in the XSD is > "http://www.ncbi.nlm.nih.gov" and I don't have any reference to > namespace in the XML document. Is this what the error is refering to? If your schema has a target namespace and your instance document declares no namespaces you need to change one of them in order for your document to be valid. Either add a namespace declaration to the instance document or remove the target namespace from the schema document. <snip/> > TIA, > John > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] Thanks. [1] http://www.w3.org/TR/2006/REC-xml-20060816/#ExtSubset [2] http://www.w3.org/TR/2006/REC-xml-20060816/#NT-extSubset Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]