From 57fff0ae5ec4542fd89da41787b9ff308e9813df Mon Sep 17 00:00:00 2001 From: Alexey Gaidukov Date: Wed, 3 Dec 2025 15:10:30 +0300 Subject: [PATCH] fix errors: 1) path with backslash in schemaLocation of is valid path. 2) xsd wich was imported should be compiled with the same value of options as main xsd --- .../java/org/apache/xmlbeans/impl/schema/StscImporter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/apache/xmlbeans/impl/schema/StscImporter.java b/src/main/java/org/apache/xmlbeans/impl/schema/StscImporter.java index f0f6de7c6..0a15bc13c 100644 --- a/src/main/java/org/apache/xmlbeans/impl/schema/StscImporter.java +++ b/src/main/java/org/apache/xmlbeans/impl/schema/StscImporter.java @@ -225,7 +225,7 @@ private static URI parseURI(String s) { //workaround for Sun bug # 4723726 public static URI resolve(URI base, String child) throws URISyntaxException { - URI childUri = new URI(child); + URI childUri = new URI(child.replace('\\', '/')); URI ruri = base.resolve(childUri); // if the child fragment is relative (which we'll assume is the case @@ -502,6 +502,9 @@ static XmlObject downloadDocument(SchemaTypeLoader loader, String namespace, Str XmlOptions options = new XmlOptions(); options.setLoadLineNumbers(); options.setDocumentSourceName(absoluteURL); + options.setCompileNoAnnotations(state.noAnn()); + options.setCompileNoPvrRule(state.noPvr()); + options.setCompileNoPvrRule(state.noUpa()); return loader.parse(reader, null, options); }