Hi,
Forgive me if there was duplicate bug report before.
A defect was introduced in IncludeUnmarshaller.java since cvs version
1.14. It will make SourceGenerator broken if there are two includes
which points to the same xsd but with different URIs. For example, if in
two different xsd files (at .. and . respectively) contains
<xsd:include schemaLocation=".\1.xsd"/>
and
<xsd:include schemaLocation="..\1.xsd"/>
respectively, the code will treat them as two different includes but in
fact they are the same.
Here is the diff.
diff -r1.13 -r1.14
43c43
< * $Id: IncludeUnmarshaller.java,v 1.13 2001/06/12 17:30:42 blandin
Exp $
---
> * $Id: IncludeUnmarshaller.java,v 1.14 2001/07/26 15:30:21 afawcett
Exp $
73a74
> //-- Get schemaLocation
77,80c78,91
< //if the path is relative Xerces append the "user.Dir"
< //we need to keep the base directory of the document
< // note: URI not supported (just system path)
< if (!new java.io.File(include).isAbsolute()) {
---
>
> //-- Has this schema locaiton been processed?
> if (state.processed(include))
> return;
> state.markAsProcessed(include, schema);
>
> // note: URI not supported (just system path), so remove any
file:///
> String absolute = include;
> if (include.startsWith("file:///"))
> absolute = include.substring(8);
>
> // if the path is relative Xerces append the "user.Dir"
> // we need to keep the base directory of the document
> if (!new java.io.File(absolute).isAbsolute()) {
96,98d106
<
< if (schema.includeProcessed(include))
< return;
The following statement should be moved to after converting "include" to
full path.
> //-- Has this schema locaiton been processed?
> if (state.processed(include))
> return;
> state.markAsProcessed(include, schema);
Regards,
-Wenjie
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev