Steve Loughran wrote:

<snip/>

It turns out that all J2EE 1.4 XSDs belong to same namespace [2].

yeah, that is just silly. Take it up with javaee-spec-feedback at sun.com. The more people who complain about this, the more likely someone will come to their senses.
Umm, Ok. I see where this is going.. :)

Further J2EE specifies that the XML instance documents specify the schemaLocation hint using xsi:schemaLocation attribute

A silly hack around a broken design decision.


Something like :
for web.xml : <web-app xmlns="http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"; version="2.4">

For ejb-jar.xml : <ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd";>

Observe how the xmlns value for both XML instance documents is same.

the whole J[2]EE schema naming thing is silly. What can I do to fix it?

How would one use the <schema namespace=/> thingie in these cases to locate web_2_.4.xsd / ejb-jar_2.1.xsd locally ?

You have to use different <schemavalidates> mapping the xmlns to the relevant doc. You probably always need a local copy because for a long time, the public webapp xsd didn't allow + in a mime type, like application/soap+xml.
I am not sure i understand what you mean. Can you kindly explain with an example.

Thanks for you time,
- Prashant


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to