[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Wildcards and JBossXb Builder

adrian@jboss.org do-not-reply at jboss.com
Wed Mar 5 07:34:20 EST 2008


"alesj" wrote : "adrian at jboss.org" wrote : 
  |   | The fix is for you to learn xsd, XSD 1.0.1 :-) 
  |   | 
  | Looks like not that I'll only learn, I'll have to make a whole degree out of it.
  | I though JBossXB Builder was here to relieve the xsd pain, but it's turning to be the other way around ... :-)
  | 

No. The port to JBossXBBuilder has just caught the fact that you didn't do
the original work correctly ;-)

It's like what I found when I really tested the javabean constructor stuff 
from the container project (see other thread with the jira issue :-)

"adrian at jboss.org" wrote : 
  | i.e. we create an mc-commons.xsd and you xsd:redefine that into your namespace.
  | You can then use all the mc xsd types in your namespace and the user
  | doesn't have to write all those xmlns directives. ;-)
  | 
And how does this affect jaxb usage?

I don't understand the question. Did you even read the thread I had with
Kabir? You're a fast reader if you did, it was a long thread.

Here's a different summary.

The idea is to make the value type and group (and other xsd artificats from the
mc) part of your schema/namespace.

1) It will make your life simpler since you can just reuse the already defined parsing

e.g. this will automagically create a value element/type in your
namespace with the MC's value group defined in your namespace

  | @XmlElement(name="value")
  | public void setValue(ValueMetaData value)
  | 
and it will be maintained going forwards as it evolves.

The same goes for the schema definition via mc-commons.xsd

2) It will make the user's life simpler since they don't have to type xmlns
all over the place (or think about which namespace it belongs in)


  | <policy xmlns="urn:jboss:policy:1.0">
  |    <binding name="somename">
  |       <!-- no need for namespace for known/native value type -->
  |       <value class="java.lang.Integer">42</value>
  |    </binding>
  | </policy>
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134204#4134204

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134204



More information about the jboss-dev-forums mailing list