Actions
Bug #5336
closedHow to load/compile XSD 1.1 schema for XSLT 3 with SaxonCS 11.1?
Start date:
2022-02-17
Due date:
% Done:
100%
Estimated time:
Legacy ID:
Applies to branch:
11, trunk
Fix Committed on Branch:
11, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java
Description
With SaxonJ EE 11.1 I can run
Processor processor = new Processor(true);
processor.getSchemaManager().load(new StreamSource("https://www.w3.org/TR/xslt-30/schema-for-xslt30.xsd"));
without problems and it takes a such a short amount of time that I am sure the schema is loaded with the XmlResolver and from its XmlResolverData.
With SaxonCS 11.1, however, the similar code
Processor processor = new Processor(true);
processor.SchemaManager.Compile(new Uri("https://www.w3.org/TR/xslt-30/schema-for-xslt30.xsd"));
gives
Saxon.Api.SaxonApiException
HResult=0x80131500
Message=: Unable to retrieve URI https://www.w3.org/TR/xslt-30/schema-for-xslt30.xsd
Source=SaxonCS
StackTrace:
at Saxon.Eej.ee.s9api.SchemaManagerImpl.load(Source source)
at Saxon.Api.SchemaManager.Compile(Uri uri)
at SaxonCSCompileXSLT3SchemaTest.Program.Main(String[] args) in C:\SomeDir\SaxonCSCompileXSLT3SchemaTest\Program.cs:line 14
and takes a lot of time to give that error so I assume it might try to download the file from the W3C server.
Even when trying to set
Processor processor = new Processor(true);
(processor.Implementation.getConfigurationProperty(FeatureKeys.RESOURCE_RESOLVER) as CatalogResourceResolver).setFeature(ResolverFeature.URI_FOR_SYSTEM, true);
processor.SchemaManager.Compile(new Uri("https://www.w3.org/TR/xslt-30/schema-for-xslt30.xsd"));
it takes a lot of time and gives the same error:
Saxon.Api.SaxonApiException
HResult=0x80131500
Message=: Unable to retrieve URI https://www.w3.org/TR/xslt-30/schema-for-xslt30.xsd
Source=SaxonCS
StackTrace:
at Saxon.Eej.ee.s9api.SchemaManagerImpl.load(Source source)
at Saxon.Api.SchemaManager.Compile(Uri uri)
at SaxonCSCompileXSLT3SchemaTest.Program.Main(String[] args) in C:\SomeDir\SaxonCSCompileXSLT3SchemaTest\Program.cs:line 16
So how do I get SaxonCS 11.1 to load/compile the schema for XSLT 3.0 and hopefully have it load the XSD using the catalog and its data dll?
Please register to edit this issue
Actions