[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-development
Subject:    [JBoss-dev] Changes to JBossXB SchemaBindingResolver
From:       "Scott M Stark" <scott.stark () jboss ! com>
Date:       2005-07-22 21:12:40
Message-ID: C2CDEFBECFC9A14892BCCFB4C95F4868880893 () EX-201 ! mail ! navisite ! com
[Download RAW message or body]

The current SchemaBindingResolver does not provide any access to the
schemaLocation hint information which essentially requires the context
parsing a document to be aware of all schema locations. To address this
I have prototyped a change to the SchemaBindingResolver which provides
this information:

   /**
    * Returns an instance of SchemaBinding corresponding to the
namespace URI.
    *
    * @param nsUri - namespace URI of the element with the schema
reference
    * @param localName - the local name of the element
    * @param baseURI - an optional baseURI for resolving the
schemaLocation.
    * @param schemaLocation - the option schema location uri that
matches
    *    nsUri if one exists
    * @return an instance of SchemaBinding correspnding to the namespace
URI
    * or null if the namespace URI is not recognized (though, in this
case it
    * could also throw an exception)
    */
   SchemaBinding resolve(String nsUri, String localName,
      String baseURI, String schemaLocation);

The baseURI is either the root xsd uri, or information that the context
parsing the schema provides. The schemaLocation is the uri from the
element schemaLocation attribute that matches the element namespace.

The JBossEntityResolver is also not being used for resolution of schemas
as a default implementation, so that is something else I want to create.

More generally, I looked at using the xml catalog resolver from xerces.
I did get it working somewhat, but found it very picky about matching
and its configuration. One way or another we need to generalize the
JBossEntityResolver and externalize its resolution configuration so that
schemas uris and entities can be added without having to rebuild the
system module jars. It probably needs to integrate with deployments as
well so that deployment level schemas can be resolved in addition to
jboss and standard schemas.

Is there any code using the xml catalog successfully currently?

xxxxxxxxxxxxxxxxxxxxxxxx
Scott Stark
Chief Technology Officer
JBoss Inc.
xxxxxxxxxxxxxxxxxxxxxxxx 
 


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&opĚk
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic