Hi Thomas,
With the current code you could probably do this by changing the two URI definitions at the start of org.jibx.compile.def.BindingBuilder, since I think that's the only place where the names are referenced. It may or may not be possible to do this in the future with beta 4 - certainly all this code is changing.
I don't see any reason to start using a namespace for the binding definitions as a standard for JiBX, especially since the use of namespaces can be confusing and adds nothing in terms of functionality or usability when you're working with homogeneous documents. Namespaces are really only useful when you're mixing different types of data together.
The real solution is to get Oracle to fix JDeveloper. If it won't work with noNamespaceSchemas, it's broken. End of story. I don't know of any other tools that have this problem. For my own work with XML documents using schemas I generally just use jEdit with the XML plugin, since it's fast and convenient.
- Dennis
Thomas Jones-Low wrote:
I finally loaded the JiBX beta 3c and am in the process of testing it. I'm using Oracle's JDeveloper release 10g, and some of the nice features it comes with. I'm posting this as a matter of discussion rather than as bugs, but I'll post the bugs if needed.
In order to get JDev to accept the binding.xsd as a proper schema, I needed to give it a namespace, so I changed the schema tag to the following:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://jibx.sourceforge.net" xmlns="http://jibx.sourceforge.net">
I'm aware that the namespaces are not required, but JDev is hyper-strict in this regard. And does it hurt anything?
JDev, when given a schema will validate an xml file against the schema. Very helpful for finding problems. But I need provide the namespace in the top element of the xml file so JDev knows which schema to validate against. In this case the binding tag needs a xmlns="http://jibx.sourceforge.net"
When I run the binding compiler against this I get the following error:
[java] org.jibx.runtime.JiBXException: Expected "binding" start tag, found "{http://jibx.sourceforge.net}binding" start tag (line 2, col 46, in AstroBind.xml)
[java] at org.jibx.runtime.impl.UnmarshallingContext.throwStartTagNameError(UnmarshallingContext.java:292)
[java] at org.jibx.runtime.impl.UnmarshallingContext.parseToStartTag(UnmarshallingContext.java:765)
[java] at org.jibx.binding.def.BindingBuilder.unmarshalBindingDefinition(BindingBuilder.java:1565)
So is there any way to provide the namespace (so I can validate my binding files against the binding.xsd) and still have the binding compiler run properly?
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users
