I am running a simple transform against XML containing a DTD. The DTD references .mod and .ent files. I provide an XML catalog for the transform processor. When the catalog contains an entry for the DTD, the DTD is resolved. Apparently none of the entities and modules the DTD depends upon are entries in the catalog, so they come back null. Nevertheless, the transform completes. Likewise, if the DTD in the XML is not matched in the catalog, the transform nevertheless completes.

My test:

@Test
    void settingExplicitResolver() throws IOException, TransformerException{
        Source xsl = XslTransform.getXsl("aaas",List.of());

        TransformerFactory factory = new net.sf.saxon.TransformerFactoryImpl();
        factory.setFeature("http://saxon.sf.net/feature/suppressXsltNamespaceCheck",true);

        StringWriter writer = new StringWriter();
        StreamResult streamResult = new StreamResult(writer);
        StreamSource xml = new StreamSource(
                getClass().getClassLoader().getResource("xml/plos_test.xml").getFile()
        );

        CatalogFeatures f =
                CatalogFeatures.builder()
                        .with(CatalogFeatures.Feature.FILES, xmlCatalog)
                        .with(CatalogFeatures.Feature.RESOLVE,"ignore")
                        .build();

        Transformer t = factory.newTransformer(xsl);
        t.setURIResolver(CatalogManager.catalogResolver(f, URI.create(xmlCatalog)));
        
        t.transform(xml, streamResult);

What is actually happening when the RESOLVE property is set to "ignore"? Are the missing resources downloaded off the web somehow? Also, what is the difference with "continue" and "ignore"?

I also have the catalog tied into Oxygen 17.0, and I see things like this running the same XML through the XSL:

Oxygen output upon transforming same XML

0

There are 0 best solutions below