<commit_before><?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-core-rendering-parent</artifactId>
    <version>2.0-SNAPSHOT</version>
  </parent>
  <artifactId>xwiki-core-rendering-api</artifactId>
  <name>XWiki Platform - Core - Rendering - Api</name>
  <packaging>jar</packaging>
  <description>XWiki Platform - Core - Rendering - Api</description>
  <dependencies>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-xml</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-properties</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-observation</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>org.wikimodel</groupId>
      <artifactId>org.wikimodel.wem</artifactId>
    </dependency>
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
    </dependency>
    
    <!-- We need the Xerces dependency at runtime since we have an optimization for the Xerces
         parser (to tell it to cache DTD grammars). If it's not there then there's no DTD
         caching. -->
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.9.1</version>
      <scope>runtime</scope>
    </dependency>
      
    <!-- Testing dependencies -->
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-shared-tests</artifactId>
      <version>${pom.version}</version>
      <scope>test</scope>
      <!-- Exclude some deps drawn transitively and that we don't use.
           We do this to prevent the Enforcer plugin configuration for
           this module from failing. -->
      <exclusions>
        <exclusion>
          <groupId>org.xwiki.platform</groupId>
          <artifactId>xwiki-core-bridge</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.xwiki.platform</groupId>
          <artifactId>xwiki-core-configuration-default</artifactId>
        </exclusion>
      </exclusions>      
    </dependency>
    <dependency>
      <groupId>jmock</groupId>
      <artifactId>jmock</artifactId>
      <version>1.1.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>test-jar</id>
            <goals>
              <goal>test-jar</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/scaffolding/**.class</include>
                <!-- Required since we're using test components in the integration test module  -->
                <include>**/Test*Macro.class</include>
                <include>**/Test*Macro$*.class</include>
                <include>**/components.txt</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Apply the Checkstyle configurations defined in the top level pom.xml file -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <includes>
            **/rendering/block/*.java,
            **/rendering/configuration/*.java,
            **/rendering/internal/configuration/*.java,
            **/rendering/internal/parser/*.java,
            **/rendering/listener/*.java,
            **/rendering/listener/chaining/AbstractChainingListener.java,
            **/rendering/listener/chaining/ChainingListener.java,
            **/rendering/listener/chaining/StackableChainingListener.java,
            **/rendering/listener/xml/*.java,
            **/rendering/macro/**/*.java,
            **/rendering/renderer/*.java,
            **/rendering/renderer/chaining/*.java,
            **/rendering/renderer/printer/DefaultWikiPrinter.java,
            **/rendering/renderer/printer/WikiPrinter.java,
            **/rendering/renderer/xhtml/*.java,
            **/rendering/transformation/*.java,
            **/rendering/util/*.java
          </includes>
          <excludes>
            **/rendering/internal/parser/XMLBlockConverterHandler.java,
          </excludes>
        </configuration>
      </plugin>
      <!-- Ensure that some modules are not added as dependencies. We don't want them since we want this API
           module to be usable outside of XWiki in a standalone manner.  -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-banned-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes>
                    <exclude>org.xwiki.platform:xwiki-core-bridge</exclude>
                    <exclude>org.xwiki.platform:xwiki-core-configuration-default</exclude>
                  </excludes>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>clirr-check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>test</phase>
            <configuration>
              <comparisonVersion>2.0-milestone-2</comparisonVersion>
              <excludes>
                <exclude>**/internal/**</exclude>
                <exclude>org/xwiki/rendering/listener/chaining/AbstractChainingListener</exclude>
                <exclude>org/xwiki/rendering/renderer/EventsRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/PlainTextRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/TexRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/XHTMLRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/XWikiSyntaxRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/PrintRendererFactory</exclude>
                <exclude>org/xwiki/rendering/renderer/PrintRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/chaining/AbstractChainingPrintRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/xhtml/DefaultXHTMLImageRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/xhtml/DefaultXHTMLLinkRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/xhtml/XHTMLRendererFactory</exclude>
                <exclude>org/xwiki/rendering/util/RenderersUtils</exclude>
                <exclude>org/xwiki/rendering/parser/SyntaxFactory</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
<commit_msg>XWIKI-4127: Improve Rendering API<commit_after><?xml version="1.0" encoding="UTF-8"?>

<!--
 *
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * This is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 2.1 of
 * the License, or (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this software; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 *
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-core-rendering-parent</artifactId>
    <version>2.0-SNAPSHOT</version>
  </parent>
  <artifactId>xwiki-core-rendering-api</artifactId>
  <name>XWiki Platform - Core - Rendering - Api</name>
  <packaging>jar</packaging>
  <description>XWiki Platform - Core - Rendering - Api</description>
  <dependencies>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-xml</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-properties</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-observation</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>org.wikimodel</groupId>
      <artifactId>org.wikimodel.wem</artifactId>
    </dependency>
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <version>1.6.1</version>
    </dependency>
    
    <!-- We need the Xerces dependency at runtime since we have an optimization for the Xerces
         parser (to tell it to cache DTD grammars). If it's not there then there's no DTD
         caching. -->
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.9.1</version>
      <scope>runtime</scope>
    </dependency>
      
    <!-- Testing dependencies -->
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-core-shared-tests</artifactId>
      <version>${pom.version}</version>
      <scope>test</scope>
      <!-- Exclude some deps drawn transitively and that we don't use.
           We do this to prevent the Enforcer plugin configuration for
           this module from failing. -->
      <exclusions>
        <exclusion>
          <groupId>org.xwiki.platform</groupId>
          <artifactId>xwiki-core-bridge</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.xwiki.platform</groupId>
          <artifactId>xwiki-core-configuration-default</artifactId>
        </exclusion>
      </exclusions>      
    </dependency>
    <dependency>
      <groupId>jmock</groupId>
      <artifactId>jmock</artifactId>
      <version>1.1.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <id>test-jar</id>
            <goals>
              <goal>test-jar</goal>
            </goals>
            <configuration>
              <includes>
                <include>**/scaffolding/**.class</include>
                <!-- Required since we're using test components in the integration test module  -->
                <include>**/Test*Macro.class</include>
                <include>**/Test*Macro$*.class</include>
                <include>**/components.txt</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- Apply the Checkstyle configurations defined in the top level pom.xml file -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <includes>
            **/rendering/block/*.java,
            **/rendering/configuration/*.java,
            **/rendering/internal/configuration/*.java,
            **/rendering/internal/parser/*.java,
            **/rendering/listener/*.java,
            **/rendering/listener/chaining/AbstractChainingListener.java,
            **/rendering/listener/chaining/ChainingListener.java,
            **/rendering/listener/chaining/StackableChainingListener.java,
            **/rendering/listener/xml/*.java,
            **/rendering/macro/**/*.java,
            **/rendering/renderer/*.java,
            **/rendering/renderer/chaining/*.java,
            **/rendering/renderer/printer/DefaultWikiPrinter.java,
            **/rendering/renderer/printer/WikiPrinter.java,
            **/rendering/renderer/xhtml/*.java,
            **/rendering/transformation/*.java,
            **/rendering/util/*.java
          </includes>
          <excludes>
            **/rendering/internal/parser/XMLBlockConverterHandler.java,
          </excludes>
        </configuration>
      </plugin>
      <!-- Ensure that some modules are not added as dependencies. We don't want them since we want this API
           module to be usable outside of XWiki in a standalone manner.  -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-banned-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <excludes>
                    <exclude>org.xwiki.platform:xwiki-core-bridge</exclude>
                    <exclude>org.xwiki.platform:xwiki-core-configuration-default</exclude>
                  </excludes>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>clirr-check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>test</phase>
            <configuration>
              <comparisonVersion>2.0-milestone-2</comparisonVersion>
              <excludes>
                <exclude>**/internal/**</exclude>
                <!-- The excludes below need to be removed when 2.0M3 is released -->
                <exclude>org/xwiki/rendering/listener/chaining/AbstractChainingListener</exclude>
                <exclude>org/xwiki/rendering/renderer/EventsRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/PlainTextRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/TexRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/XHTMLRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/XWikiSyntaxRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/PrintRendererFactory</exclude>
                <exclude>org/xwiki/rendering/renderer/PrintRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/chaining/AbstractChainingPrintRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/xhtml/DefaultXHTMLImageRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/xhtml/DefaultXHTMLLinkRenderer</exclude>
                <exclude>org/xwiki/rendering/renderer/xhtml/XHTMLRendererFactory</exclude>
                <exclude>org/xwiki/rendering/util/RenderersUtils</exclude>
                <exclude>org/xwiki/rendering/parser/SyntaxFactory</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

{'fraction_non_alphanumeric': 0.1281110219061819, 'fraction_numerical': 0.00602133272164239, 'mean_word_length': 2.2517247809062093, 'pattern_counts': {'":': 0, '<': 492, '<?xml version=': 2, '>': 492, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 12}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7579158', 'n_tokens_mistral': 5294, 'n_tokens_neox': 4844, 'n_words': 886}