Skip to Content.
Sympa Menu

notify-dpml - r1968 - trunk/main/metro/part/src/main/dpml/lang

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell at BerliOS <mcconnell AT mail.berlios.de>
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: r1968 - trunk/main/metro/part/src/main/dpml/lang
  • Date: Mon, 16 Apr 2007 17:31:05 +0200

Author: mcconnell
Date: 2007-04-16 17:31:05 +0200 (Mon, 16 Apr 2007)
New Revision: 1968

Modified:
trunk/main/metro/part/src/main/dpml/lang/DOM3DocumentBuilder.java
Log:
improve error messages arising from 1.X schema names

Modified: trunk/main/metro/part/src/main/dpml/lang/DOM3DocumentBuilder.java
===================================================================
--- trunk/main/metro/part/src/main/dpml/lang/DOM3DocumentBuilder.java
2007-04-16 15:30:18 UTC (rev 1967)
+++ trunk/main/metro/part/src/main/dpml/lang/DOM3DocumentBuilder.java
2007-04-16 15:31:05 UTC (rev 1968)
@@ -161,8 +161,7 @@
catch( Exception e )
{
final String error =
- "DOM3 error while attempting to parse document."
- + "\nSource: " + url;
+ "Unable to decode document [" + url + "]";
IOException ioe = new IOException( error );
ioe.initCause( e );
throw ioe;
@@ -234,11 +233,32 @@
}
}

- final String error =
- "Unable to resolve a schema for the namespace ["
- + namespace
- + "]";
- throw new LSException( LSException.PARSE_ERR, error );
+ if( "link:xsd:dpml/lang/dpml-module#1.0".equals( namespace ) )
+ {
+ final String error =
+ "Namespace resolution error (migration issue)."
+ + "\n\nThe document namespace
\"link:xsd:dpml/lang/dpml-module#1.0\" has been "
+ + "replaced by the namespace \"dpml:library\". In
addition a number "
+ + "of internal changes have been made to the schema
definition. These changes impact "
+ + "all index files and any imported module and/or project
definition files.";
+ throw new LSException( LSException.PARSE_ERR, error );
+ }
+ else if( "link:xsd:dpml/lang/dpml-part#1.0".equals( namespace ) )
+ {
+ final String error =
+ "Namespace resolution error (migration issue)."
+ + "\n\nThe document namespace
\"link:xsd:dpml/lang/dpml-part#1.0\" has been "
+ + "replaced by the namespace \"dpml:part\".";
+ throw new LSException( LSException.PARSE_ERR, error );
+ }
+ else
+ {
+ final String error =
+ "Unable to resolve a schema for the namespace ["
+ + namespace
+ + "]";
+ throw new LSException( LSException.PARSE_ERR, error );
+ }
}

private LSResourceResolver[] getNamespaceResolvers()




  • r1968 - trunk/main/metro/part/src/main/dpml/lang, mcconnell at BerliOS, 04/16/2007

Archive powered by MHonArc 2.6.24.

Top of Page