Package org.forgerock.doc.maven.utils
Class XmlTransformer
java.lang.Object
org.apache.commons.io.DirectoryWalker<File>
org.forgerock.doc.maven.utils.XmlTransformer
- Direct Known Subclasses:
ImageDataTransformer
,KeepTogetherTransformer
,TheadRowTransformer
Apply and XSL transformation to DocBook XML files.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.io.DirectoryWalker
org.apache.commons.io.DirectoryWalker.CancelException
-
Constructor Summary
ConstructorsConstructorDescriptionXmlTransformer
(FileFilter filterToMatch, String xslResource) Construct an updater to match DocBook XML files.XmlTransformer
(String xsl, FileFilter filterToMatch) Construct an updater to match DocBook XML files. -
Method Summary
Modifier and TypeMethodDescriptionprotected final void
handleFile
(File file, int depth, Collection<File> results) Update files that match, adding them to the results.Update files that match the filter.Methods inherited from class org.apache.commons.io.DirectoryWalker
checkIfCancelled, filterDirectoryContents, handleCancelled, handleDirectory, handleDirectoryEnd, handleDirectoryStart, handleEnd, handleIsCancelled, handleRestricted, handleStart, walk
-
Constructor Details
-
XmlTransformer
Construct an updater to match DocBook XML files.The files are updated in place.
The XSL resource must be on the classpath, and so you probably want to extend this with your own transformer class.
- Parameters:
filterToMatch
- Filter to match XML files.xslResource
- Path to XSL resource.
-
XmlTransformer
Construct an updater to match DocBook XML files.The files are updated in place.
- Parameters:
filterToMatch
- Filter to match XML files.xsl
- XSL as string.
-
-
Method Details
-
update
Update files that match the filter.- Parameters:
startDirectory
- Base directory under which to update files, recursively- Returns:
- List of updated files
- Throws:
IOException
- Something went wrong changing a file's content.
-
handleFile
Update files that match, adding them to the results.- Overrides:
handleFile
in classorg.apache.commons.io.DirectoryWalker<File>
- Parameters:
file
- File to updatedepth
- Not usedresults
- List of files updated- Throws:
IOException
- Something went wrong changing a file's content.
-