users@jaxb.java.net

Does xjc support default namespace?

From: Sam Cheung <sylcheung_at_hotmail.com>
Date: Thu, 12 Feb 2004 23:04:25 +0000

I try to use xjc to generate java classes from my schema.

My schema has default namespace like this,
<schema
xmlns="http://www.w3.org/2001/XMLSchema">
    <attribute name="end" type="string"/>
<schema>

But xjc gives me these errors:
[xjc] [ERROR] The prefix "xml" cannot be bound to any namespace other than
its usual namespace; neither can the namespace for "xml" be bound to any
prefix other than "xml".

But if I change my schema to use a name space "xs", things work.
So is there a way to config xjc to support default name space? I would
prefer not to change the schmea manually. And I validate my original schema
http://www.w3.org/2001/03/webdata/xsv, it has no error.

<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:attribute name="end" type="xs:string"/>
</xs:schema>

Thank you for any help.
Sam

_________________________________________________________________
Find great local high-speed Internet access value at the MSN High-Speed
Marketplace. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net