Actions
Bug #6050
closedSchema fails to compile under Saxon 11 - an imported type is held as an unresolved SimpleTypeDefinition
Status:
Resolved
Priority:
Normal
Assignee:
Category:
Schema-Aware processing
Sprint/Milestone:
-
Start date:
2023-05-25
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
11, 12, trunk
Fix Committed on Branch:
11, 12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java
Description
Email from client:
We faced this problem which we think it may be a bug in saxon. we first load person.xsd then simple.xsd then we evaluate the common.xq. and get this exception:
Exception in thread "main" java.lang.ClassCastException: class com.saxonica.ee.schema.sdoc.SimpleTypeDefinition cannot be cast to class net.sf.saxon.type.AtomicType (com.saxonica.ee.schema.sdoc.SimpleTypeDefinition and net.sf.saxon.type.AtomicType are in unnamed module of loader 'app') as work around i did this but my team want to have feedback from saxon team:
Iterable<SchemaType> allTypes = config.getSuperSchema().getAllTypes();
allTypes.forEach(type -> {
if(type instanceof SimpleTypeDefinition t){
UserSimpleType workingType = t.getWorkingType();
workingType.setRedefinitionLevel(1);
config.getSuperSchema().addType(workingType);
}
});
it looks like the redefinitionlevel make difference in the new version.
Please register to edit this issue
Actions