[jboss-svn-commits] JBoss Common SVN: r3217 - jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jun 4 05:19:15 EDT 2009
Author: alex.loubyansky at jboss.com
Date: 2009-06-04 05:19:15 -0400 (Thu, 04 Jun 2009)
New Revision: 3217
Modified:
jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java
Log:
JBXB-205
Modified: jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java
===================================================================
--- jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java 2009-06-04 09:07:19 UTC (rev 3216)
+++ jbossxb/trunk/src/main/java/org/jboss/xb/binding/sunday/unmarshalling/SundayContentHandler.java 2009-06-04 09:19:15 UTC (rev 3217)
@@ -264,13 +264,16 @@
{
String schemaLocation = atts == null ? null : Util.getSchemaLocation(atts, namespaceURI);
// Use the dtd info if it exists and there is no schemaLocation
- if(sawDTD && (schemaLocation == null || schemaLocation.length() == 0))
+ if(schemaLocation == null || schemaLocation.length() == 0)
{
- schemaLocation = dtdSystemId;
+ if(sawDTD)
+ schemaLocation = dtdSystemId;
+ // If there is still no schemaLocation and no namespaceURI, pass in the root local name
+ // if the namespace is not null then schemaLocation should be left null and resolved by EntityResolver
+ if(schemaLocation == null && (namespaceURI == null || namespaceURI.length() == 0))
+ schemaLocation = localName;
}
- // If there is still no schemaLocation, pass in the root local name
- if(schemaLocation == null)
- schemaLocation = localName;
+
schemaBinding = schemaResolver.resolve(namespaceURI, null, schemaLocation);
if(schemaBinding != null)
{
More information about the jboss-svn-commits
mailing list