View Javadoc
1   /*
2    * SPDX-FileCopyrightText: Copyright (c) 2012-2025 Yegor Bugayenko
3    * SPDX-License-Identifier: MIT
4    */
5   package com.jcabi.xml;
6   
7   import javax.xml.transform.URIResolver;
8   
9   /**
10   * Sources for XSLT.
11   *
12   * @since 0.9
13   * @checkstyle InterfaceIsType (500 lines)
14   */
15  public interface Sources extends URIResolver {
16  
17      /**
18       * Dummy sources.
19       */
20      @SuppressWarnings("PMD.ConstantsInInterface")
21      Sources DUMMY = (href, base) -> {
22          throw new UnsupportedOperationException(
23              String.format(
24                  "Sources.DUMMY#resolve(\"%s\", \"%s\"): URI resolving is not configured in XSLDocument, use #with(URIResolver) method",
25                  href, base
26              )
27          );
28      };
29  
30  }