[jboss-dev-forums] [Design of JBossXB] - Re: JBossXB does not assign schema defined attribute default
thomas.diesler@jboss.com
do-not-reply at jboss.com
Wed Jul 1 05:35:50 EDT 2009
I think I provide this information here
http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/trunk/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/parser/SchemaResolverParser.java
| static class BlueprintSchemaResolver extends DefaultSchemaResolver
| {
| private LogService log;
|
| public BlueprintSchemaResolver(BlueprintContext context)
| {
| this.log = context.getLog();
|
| try
| {
| addSchemaLocation(XMLNS_BLUEPRINT, "blueprint.xsd");
| addClassBinding(BlueprintContext.XMLNS_BLUEPRINT, TBlueprint.class);
| }
| catch (RuntimeException rte)
| {
| throw rte;
| }
| catch (Exception ex)
| {
| log.log(LogService.LOG_ERROR, "Cannot create schema resolver", ex);
| }
| }
| }
|
The DefaultSchemaResolver sais
| /**
| * Uses the JBossEntityResolver.resolveEntity by:
| *
| * 1. Using the nsUri as the systemID
| * 2. Using the schemaLocation as the systemID
| * 3. If that fails, the baseURI is not null, the xsd is located using URL(baseURL, schemaLocation)
| * 4. If the baseURI is null, the xsd is located using URL(schemaLocation)
| */
| public SchemaBinding resolve(String nsURI, String baseURI, String schemaLocation)
|
but (in my case) it actually generates the schema from a binding class
| schema = JBossXBBuilder.build(bindingClass);
|
AFAICS, it generates the schema rather than use the one that I provide.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4241103#4241103
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4241103
More information about the jboss-dev-forums
mailing list