[jdom-interest] Default Namespace vs No-Namespace.

Elliotte Rusty Harold elharo at metalab.unc.edu
Fri Jul 4 04:53:22 PDT 2003


At 11:02 AM -0700 7/3/03, John Jefferson wrote:

>The xml I have coming in looks like:
>
><root xmlns="http://notmynamespace"
>xmlns:custom="http://www.custom.com/CUSTOM"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xsi:schemaLocation="http://notmynamespace
>notmyname.xsd    http://www.custom.com/CUSTOM
>custom.xsd">
>
><child1/>
><child2/>
>
></root>
>
>Now I want to validate this document against the
>default namespace of xmlns="http://mynamespace" and a
>different set of schemas.
>
>How do I do this without changing the namespace?

You don't. You can validate against a different set of schemas 
without changing the namespace. The location of the schema is 
independent of the namespace URI.
-- 

   Elliotte Rusty Harold
   elharo at metalab.unc.edu
   Processing XML with Java (Addison-Wesley, 2002)
   http://www.cafeconleche.org/books/xmljava
   http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA



More information about the jdom-interest mailing list