Skip to content
AParise1217Public

About

Extensible XML-based Content and Information Transformation Engine

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

77 Commits

Folders and files

Repository files navigation

EXCITE

Maven Central GitHub license

Extensible XML-based Content and Information Transformation Engine

XML Transformations made groovy!


Dependency

<dependency>
    <groupId>com.parisesoftware</groupId>
    <artifactId>excite-core</artifactId>
    <version>1.0.2</version>
</dependency>

Built-in Implementations

Interface Implementation Behavior
ITransformationAlgorithm RenameChildNodeTransformation Renames all child nodes matching a given name
ITransformationAlgorithm DeleteChildNodeByNameTransformation Deletes all child nodes matching a given name
IValidationAlgorithm AcceptAllValidation Passes all non-null nodes
IValidationAlgorithm ChildNodeHasValueValidation Passes nodes where a named child matches a value
IOutputCommand OverwriteFileOutputCommand Atomically overwrites the source file with transformed content
IOutputCommand ConsoleOutputCommand Prints transformed content to stdout

Usage

import com.parisesoftware.excite.core.Excite
import com.parisesoftware.excite.core.internal.transformer.RenameChildNodeTransformation
import com.parisesoftware.excite.core.internal.validation.ChildNodeHasValueValidation
import com.parisesoftware.excite.core.internal.output.OverwriteFileOutputCommand

Excite.run(
    '/path/to/xml/directory',
    new RenameChildNodeTransformation('description', 'description_html'),
    new ChildNodeHasValueValidation('content-type', '/component/article'),
    new OverwriteFileOutputCommand()
)

This will recursively scan the directory for XML files, pass each one through the validation algorithm, apply the transformation to those that pass, and write the result back using the output command.

Note on XML namespaces: Groovy's XmlSlurper strips namespace prefixes by default. Validation and transformation operate on local element names only; namespace-qualified files are supported but namespace URIs are not accessible via the standard implementations.


Releasing to Maven Central

Performing a Release Deployment

Note: This must occur prior to the Release Deployment!

Make sure the "release-sign-artifacts" and "ossrh" Maven profiles are active.

  1. mvn clean
  2. mvn release:prepare -Possrh,release-sign-artifacts
  3. mvn release:perform -Possrh,release-sign-artifacts
  • await the release process to finish *
  1. git push --tags
  2. git push origin master

Updating the Release Version

  1. mvn versions:set -DnewVersion=1.2.3

About

Extensible XML-based Content and Information Transformation Engine

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages