Name

Data::Edit::Xml::To::Dita - Convert multiple Xml documents in parallel to Dita.

Synopsis

A framework for converting multiple Xml documents in parallel to Dita:

use Data::Edit::Xml::To::Dita;

sub convertDocument($$)
 {my ($project, $x) = @_;                   # use sumAbsRel to get default home

  $x->by(sub
   {my ($c) = @_;
    if ($c->at_conbody)
     {$c->putFirst($c->new(<<END));
<p>Hello world!</p>
END
     }
   });
 }

Data::Edit::Xml::To::Dita::createSampleInputFiles;
Data::Edit::Xml::To::Dita::convertXmlToDita;

Evaluate the results of the conversion by reading the summary file in the reports/ folder:

use Data::Table::Text qw(fpe readFile);

if (lint) # Lint report if available
 {my $s = readFile(&summaryFile);
  $s =~ s(\s+on.*) ()ig;
  my $S = <<END;

Summary of passing and failing projects

100 % success. Projects: 0+1=1.  Files: 0+1=1. Errors: 0,0

CompressedErrorMessagesByCount (at the end of this file):        0

FailingFiles   :         0
PassingFiles   :         1

FailingProjects:         0
PassingProjects:         1


FailingProjects:         0
   #  Percent   Pass  Fail  Total  Project
                                             # use sumAbsRel to get default home


PassingProjects:         1
   #   Files  Project
   1       1  1


DocumentTypes: 1

Document  Count
concept       1


100 % success. Projects: 0+1=1.  Files: 0+1=1. Errors: 0,0

END

  ok $s eq $S;
 }

See the converted files in the out/ folder:

if (1) # Converted file
 {my $s = nwsc(readFile(fpe(&out, qw(hello_world dita))));
  my $S = nwsc(<<END);

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd" []>
<concept id="c1">
  <title id="title">Hello World</title>
  <conbody>
    <p>Hello world!</p>
  </conbody>
</concept>
END

  ok $S eq $s;
 }

Description

Convert multiple Xml documents in parallel to Dita.

Version 20190620.

The following sections describe the methods in each functional area of this module. For an alphabetic listing of all methods by name see Index.

Convert Xml to the Dita standard.

Convert Xml to the Dita standard.

setAtHits()

Set hit tracking

analyzeHits()

Analyze the hits to find "at" calls that always fail so we can consider them for removal

Methods

Methods defined in this package.

ddd(@)

Log development messages

   Parameter  Description
1  @m         Messages

eee(@)

Log error messages

   Parameter  Description
1  @m         Messages

copyToAws()

Copy to aws

getFromAws()

Get results from Aws

mifToXml($)

Convert Mif to Xml

   Parameter   Description
1  $inputFile  File containing mif

convertImageToSvg($)

Convert a graphics file to svg

   Parameter  Description
1  $file      File to convert

spelling($$)

Fix spelling in source string

   Parameter  Description
1  $s         Source string
2  $file      File being processed

Example:

sub 𝘀𝗽𝗲𝗹𝗹𝗶𝗻𝗴($$)
 {my ($s, $file) = @_;                                                          # Source string, file being processed
  $s
 }

You can provide you own implementation of this method in your calling package via:

sub spelling {...}

if you wish to override the default processing supplied by this method.

spellingOut($)

Fix spelling in output string

   Parameter  Description
1  $s         Output string

Example:

sub 𝘀𝗽𝗲𝗹𝗹𝗶𝗻𝗴𝗢𝘂𝘁($)
 {my ($s) = @_;                                                                 # Output string
  $s
 }

You can provide you own implementation of this method in your calling package via:

sub spellingOut {...}

if you wish to override the default processing supplied by this method.

chooseIDGroup($)

Return the id group for a project - files with the same id group share the same set of id attributes.

   Parameter  Description
1  $project   Project

Example:

sub 𝗰𝗵𝗼𝗼𝘀𝗲𝗜𝗗𝗚𝗿𝗼𝘂𝗽($)
 {my ($project) = @_;                                                           # Project
  q(all);
 }

You can provide you own implementation of this method in your calling package via:

sub chooseIDGroup {...}

if you wish to override the default processing supplied by this method.

selectFileForProcessing($$)

Select an input file for processing

   Parameter  Description
1  $file      Full file name
2  $number    Project number

Example:

sub 𝘀𝗲𝗹𝗲𝗰𝘁𝗙𝗶𝗹𝗲𝗙𝗼𝗿𝗣𝗿𝗼𝗰𝗲𝘀𝘀𝗶𝗻𝗴($$)
 {my ($file, $number) = @_;                                                     # Full file name, project number
  $file
 }

You can provide you own implementation of this method in your calling package via:

sub selectFileForProcessing {...}

if you wish to override the default processing supplied by this method.

formatXml($)

Format xml

   Parameter  Description
1  $x         Parse tree

Example:

sub 𝗳𝗼𝗿𝗺𝗮𝘁𝗫𝗺𝗹($)
 {my ($x) = @_;                                                                 # Parse tree
  $x->prettyStringDitaHeaders;
 }

You can provide you own implementation of this method in your calling package via:

sub formatXml {...}

if you wish to override the default processing supplied by this method.

cleanUpCutOutTopic($$)

Clean up a topic once it has been cut out and its output file has been assigned

   Parameter  Description
1  $project   Project
2  $x         Parse

Example:

sub 𝗰𝗹𝗲𝗮𝗻𝗨𝗽𝗖𝘂𝘁𝗢𝘂𝘁𝗧𝗼𝗽𝗶𝗰($$)
 {my ($project, $x) = @_;                                                       # Project, parse
 }

You can provide you own implementation of this method in your calling package via:

sub cleanUpCutOutTopic {...}

if you wish to override the default processing supplied by this method.

cleanUpBookMap($$)

Clean up a book map once all its topics have been cut out and its output file has been assigned

   Parameter  Description
1  $project   Project
2  $x         Parse

Example:

sub 𝗰𝗹𝗲𝗮𝗻𝗨𝗽𝗕𝗼𝗼𝗸𝗠𝗮𝗽($$)
 {my ($project, $x) = @_;                                                       # Project, parse
 }

You can provide you own implementation of this method in your calling package via:

sub cleanUpBookMap {...}

if you wish to override the default processing supplied by this method.

standardDitaCleanUp($$)

Clean up some items that always need to be done in Dita topics

   Parameter  Description
1  $project   Project
2  $x         Parse

Example:

sub 𝘀𝘁𝗮𝗻𝗱𝗮𝗿𝗱𝗗𝗶𝘁𝗮𝗖𝗹𝗲𝗮𝗻𝗨𝗽($$)
 {my ($project, $x) = @_;                                                       # Project, parse
  standardDitaCleanUpDefault($project, $x);                                     # Default standard clean up
 } # 𝘀𝘁𝗮𝗻𝗱𝗮𝗿𝗱𝗗𝗶𝘁𝗮𝗖𝗹𝗲𝗮𝗻𝗨𝗽

You can provide you own implementation of this method in your calling package via:

sub standardDitaCleanUp {...}

if you wish to override the default processing supplied by this method.

isAMap($)

Return true if this node is a map

   Parameter  Description
1  $node      Node to test

convertDocument($$)

Convert one document.

   Parameter  Description
1  $project   Project == document to convert
2  $x         Parse tree.

Example:

sub 𝗰𝗼𝗻𝘃𝗲𝗿𝘁𝗗𝗼𝗰𝘂𝗺𝗲𝗻𝘁($$)
 {my ($project, $x) = @_;                                                       # Project == document to convert, parse tree.
  lll "𝗰𝗼𝗻𝘃𝗲𝗿𝘁𝗗𝗼𝗰𝘂𝗺𝗲𝗻𝘁: ", $project->source;
  $x->wrapDown_conbody_concept unless couldBeCutOuut($x) or isAMap($x);         # Turn it into a concept if not already a recognizable type
  $x->ditaObviousChanges;
  $x                                                                            # Return parse tree
 }

You can provide you own implementation of this method in your calling package via:

sub convertDocument {...}

if you wish to override the default processing supplied by this method.

lintResults()

Lint results held in folder outand write reports to folder reports.

Example:

sub 𝗹𝗶𝗻𝘁𝗥𝗲𝘀𝘂𝗹𝘁𝘀
 {lintResultsDefault;                                                           # Only if lint requested
 }

You can provide you own implementation of this method in your calling package via:

sub lintResults {...}

if you wish to override the default processing supplied by this method.

beforeUploadToS3()

Copy additional files into position before upload to s3

Example:

sub 𝗯𝗲𝗳𝗼𝗿𝗲𝗨𝗽𝗹𝗼𝗮𝗱𝗧𝗼𝗦𝟯
 {
 }

You can provide you own implementation of this method in your calling package via:

sub beforeUploadToS3 {...}

if you wish to override the default processing supplied by this method.

beforeConvertProjects()

Run just before project conversion starts

Example:

sub 𝗯𝗲𝗳𝗼𝗿𝗲𝗖𝗼𝗻𝘃𝗲𝗿𝘁𝗣𝗿𝗼𝗷𝗲𝗰𝘁𝘀
 {
 }

You can provide you own implementation of this method in your calling package via:

sub beforeConvertProjects {...}

if you wish to override the default processing supplied by this method.

afterConvertProjects()

Run just after project conversion starts

Example:

sub 𝗮𝗳𝘁𝗲𝗿𝗖𝗼𝗻𝘃𝗲𝗿𝘁𝗣𝗿𝗼𝗷𝗲𝗰𝘁𝘀
 {
 }

You can provide you own implementation of this method in your calling package via:

sub afterConvertProjects {...}

if you wish to override the default processing supplied by this method.

restructureOutputFiles()

Restructure output folders based on results from Lint and Xref

Example:

sub 𝗿𝗲𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲𝗢𝘂𝘁𝗽𝘂𝘁𝗙𝗶𝗹𝗲𝘀
 {
 }

You can provide you own implementation of this method in your calling package via:

sub restructureOutputFiles {...}

if you wish to override the default processing supplied by this method.

restructureOneDocument($$$)

Restructure one document

   Parameter  Description
1  $phase     Phase
2  $lint      Lint results
3  $x         Parse tree

Example:

sub 𝗿𝗲𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲𝗢𝗻𝗲𝗗𝗼𝗰𝘂𝗺𝗲𝗻𝘁($$$)
 {my ($phase, $lint, $x) = @_;                                                  # Phase, lint results, parse tree
 }

You can provide you own implementation of this method in your calling package via:

sub restructureOneDocument {...}

if you wish to override the default processing supplied by this method.

restructureCleanUp($@)

Cleanup after each restructuring phase

   Parameter  Description
1  $phase     Phase
2  @cleanUps  Cleanup requests

Example:

sub 𝗿𝗲𝘀𝘁𝗿𝘂𝗰𝘁𝘂𝗿𝗲𝗖𝗹𝗲𝗮𝗻𝗨𝗽($@)
 {my ($phase, @cleanUps) = @_;                                                  # Phase, cleanup requests
 }

You can provide you own implementation of this method in your calling package via:

sub restructureCleanUp {...}

if you wish to override the default processing supplied by this method.

saveCode()

Save code if developing

Example:

sub 𝘀𝗮𝘃𝗲𝗖𝗼𝗱𝗲
 {if (develop)
   {saveCodeToS3(1200, &perl, client, q(ryffine/code/perl/),
           q(--only-show-errors --profile fmc --region eu-west-1));
   }
 }

You can provide you own implementation of this method in your calling package via:

sub saveCode {...}

if you wish to override the default processing supplied by this method.

Project Definition

Project definition

Output fields

idGroup - Projects with the same id group share id attributes.

name - Name of project

number - Number of project

parseFailed - Parse of source file failed

source - Input file

targets - Where the items cut out of this topic wind up

test - Test projects write their results unlinted to testResults

Attributes

The following is a list of all the attributes in this package. A method coded with the same name in your package will over ride the method of the same name in this package and thus provide your value for the attribute in place of the default value supplied for this attribute by this package.

Replaceable Attribute List

catalog clearCount client conversion convert debug deguidize develop ditaBin ditaXrefs docSet download downloads endTime errorLogFile exchange exchangeHome exchangeItems extendedNames fails fixBadRefs fixDitaRefs fixFailingFiles fixXrefsByTitle gathered hits hitsFolder home imageCache in inputExt lint maximumFileFromStringLength maximumNumberOfFilesToClear maximumNumberOfProcesses mimajen notify numberOfFiles out outExtMap outExtTopic parseCache parseFailed perl printTopicTrees process publications publish reports restructure restructurePhases runTime s3Bucket s3Exchange s3FolderIn s3FolderUp s3Parms s3Profile singleTopicBM startTime summaryFile targets testExchangeIn testExchangeOut testExpected testFails testFails2 testMode testResults testStandAlone tests titleOnly topicTrees unicode upload user version www xref xrefAllowUniquePartialMatches

catalog

Dita catalog to be used for linting.

clearCount

Limit on number of files to clear from each output folder.

client

The name of the client

conversion

Conversion name

convert

Convert documents to dita if true.

debug

Debug if true.

deguidize

0 - normal processing, 1 - replace guids in hrefs with their target files to deguidize dita references. Given href g1#g2/id convert g1 to a file name by locating the topic with topicId g2.

develop

Production run if this file folder is detected otherwise development.

ditaBin

Location of Dita tool

ditaXrefs

Convert xref hrefs expressed as just ids to dita format - useful in non Dita to Dita conversions for example: docBook

docSet

Select set of documents to convert.

download

Download from S3 if true.

downloads

Downloads folder.

endTime

End time of run in seconds since the epoch.

errorLogFile

Error log file.

exchange

1 - upload to S3 Exchange if at 100% lint, 2 - upload to S3 Exchange regardless, 0 - no upload to S3 Exchange.

exchangeHome

Home of exchange folder

exchangeItems

The items to be uploaded to the exchange folder: d - downloads, i - in, p - perl, o - out, r - reports

extendedNames

0 - derive names solely from titles, 1 - consider text beyond the title when constructing file names

fails

Copies of failing documents in a separate folder to speed up downloading.

fixBadRefs

Mask bad references using M3: the Monroe Masking Method if true

fixDitaRefs

Fix references in a corpus of Dita documents that have been converted to the GB Standard.

fixFailingFiles

Fix failing files in the testFails folder if this attribute is true

fixXrefsByTitle

Fix failing xrefs by looking for the unique topic with a title that matches the text of the xref.

gathered

Folder containing saved parse trees after initial parse and information gathering - pretty well obsolete

hits

1 - track hits so we can see which transformations are actually being used - normally off to avoid the overhead

hitsFolder

Folder containing at method hits by process id

home

Home folder containing all the other folders.

imageCache

Converted images are cached here to speed things up

in

Input documents folder.

inputExt

Extension of input files.

lint

Lint output xml

maximumFileFromStringLength

Maximum amount of title to use in constructing output file names.

maximumNumberOfFilesToClear

Maximum number of files to clear.

maximumNumberOfProcesses

Maximum number of conversion processes to run in parallel.

mimajen

1- Copy files to web, 0 - suppress

notify

1 - Broadcast results of conversion if at 100% lint, 2 - broadcast regardless of error count.

numberOfFiles

Expected number of output files

out

Converted documents output folder.

outExtMap

Preferred output extension for a map

outExtTopic

Preferred output extension for a topic

parseCache

Cached parse trees.

parseFailed

Folder for details of xml parse failures

perl

Perl folder.

printTopicTrees

1 - print the parse tree before cutting out the topics

process

Process data folder used to communicate results between processes.

publications

Publications folder on web server for client

publish

1 - convert Dita to Html and publish via DITA-OT if at 100% lint, 2 - publish regardless

reports

Reports folder.

restructure

1 - Restructure results of conversion if at 100% lint, 2 - restructure regardless of error count.

restructurePhases

Number of restructuring phases to run

runTime

Elapsed run time in seconds.

s3Bucket

Bucket on S3 holding documents to convert and the converted results.

s3Exchange

Exchange folder on S3

s3FolderIn

Folder on S3 containing original documents.

s3FolderUp

Folder on S3 containing results of conversion.

s3Parms

Additional S3 parameters for uploads and downloads.

s3Profile

Aws cli profile keyword value if any.

singleTopicBM

1 - allow single topic book maps when cutting out topics which is required if using fixDitaRefs, 0 - multiple topics required for a bookmap

startTime

Start time of run in seconds since the epoch.

summaryFile

Summary report file.

targets

Duplicates the in file structure - each file there-in shows us where the original file went

testExchangeIn

Exchange folder in which to receive tests so that test writers can disarrange their exchange folders as they please without disrupting testing at this end.

testExchangeOut

Exchange folder to publish tests results in so test writers can see the results in at testResults

testExpected

Folder containing test results expected.

testFails

Folder containing failing files to be fixed by reprocessing them but only if fixFailingFiles is true

testFails2

Folder containing files still unfixed by the current set of fixes

testMode

1 - run development tests, 2- run standalone tests, 0 run production documents

testResults

Folder containing actual test results locally, copied to: testExchangeOut

testStandAlone

Folder containing standalone tests which is used instead of regression tests if content is present

tests

Folder containing test input files received from test developer at testExchangeIn

titleOnly

Use only the title of topics to create GB Standard file names otherwise use the following text as well if the title is too short

topicTrees

Folder to contain printed topic trees if requested by printTopicTrees

unicode

Convert to utf8 if true.

upload

Upload to S3 Bucket if true and the conversion is at 100%, 2 - upload to S3 Bucket regardless, 0 - no upload to S3 Bucket.

user

Aws userid

version

Description of this run as printed in notification message and title

www

Web server folder

xref

Xref output xml.

xrefAllowUniquePartialMatches

Allow partial matching - i.e ignore the stuff to the right of the # in a reference if doing so produces a unique result

Optional Replace Methods

The following is a list of all the optionally replaceable methods in this package. A method coded with the same name in your package will over ride the method of the same name in this package providing your preferred processing for the replaced method in place of the default processing supplied by this package. If you do not supply such an over riding method, the existing method in this package will be used instead.

Replaceable Method List

afterConvertProjects beforeConvertProjects beforeUploadToS3 chooseIDGroup cleanUpBookMap cleanUpCutOutTopic convertDocument formatXml lintResults restructureCleanUp restructureOneDocument restructureOutputFiles saveCode selectFileForProcessing spelling spellingOut standardDitaCleanUp

Private Methods

getHome()

Compute home directory once.

s3ProfileValue()

S3 profile keyword.

conversionName()

Conversion name.

s3InputFolder()

S3 input folder

s3OutputFolder()

S3 output folder

s3ExchangeFolder()

S3 exchange folder

pleaseSee($$)

AWS command to see results

   Parameter  Description
1  $lint      Lint results
2  $xref      Xref results

downloadFromS3()

Download documents from S3 to the downloads folder.

convertOneFileToUTF8()

Convert one file to utf8 and return undef if successful else the name of the document in error

convertToUTF8()

Convert the encoding of documents in downloads to utf8 equivalents in folder in.

projectCount()

Number of projects.

newProject($)

Project details including at a minimum the name of the project and its source file.

   Parameter  Description
1  $source    Source file

findProjectFromSource($)

Locate a project by its source file

   Parameter  Description
1  $source    Full file name

loadProjects()

Locate documents to convert from folder in.

parseCacheFile($)

Name of the file in which to cache parse trees

   Parameter  Description
1  $project   Project

parseFile($)

Parse a file

   Parameter  Description
1  $file      File

parseProject($)

Parse a project.

   Parameter  Description
1  $project   Project

lintTopic($$$)

Lint a topic and return the lint details

   Parameter  Description
1  $project   Project
2  $x         Parse tree
3  $title     Optional title of lint

lintBookMap($$$$)

Lint a book map

   Parameter  Description
1  $project   Project
2  $x         Parse tree of source
3  $bookMap   Bookmap parse tree
4  $title     Title of lint

topicIsEssentiallyEmpty($)

Return 1 if the topic is essentially empty else undef.

   Parameter  Description
1  $file      File to check

findImage($)

Find an image that has been misplaced

   Parameter  Description
1  $image     Image to locate

standardDitaCleanUpDefault($$)

Clean up some items that always need to be done in Dita topics

   Parameter  Description
1  $project   Project
2  $x         Parse

couldBeCutOut($)

Return true if this node can be cut out

   Parameter  Description
1  $node      Node to test

cutOutTopics($$)

Cut out the topics in a document assuming that they are nested within the parse tree and create a bookmap from the residue if it is not already a bookmap

   Parameter  Description
1  $project   Project == document to cut
2  $x         Parse tree.

convertProject($)

Convert one document held in folder in into topic files held in out.

   Parameter  Description
1  $project   Project == document to convert

xrefResults()

Run Xref to fix check results

lintResultsDefault()

Lint results held in folder outand write reports to folder reports.

copyLogFiles()

Copy log files to reports/ so they get uploaded too

chunkFile($)

Chunk a file name to make it more readable

   Parameter  Description
1  $file      File to chunk

copyFilesToWeb2()

Copy files into position so that they can be web served

copyFilesToWeb()

Copy files into position so that they can be web served

uploadFoldersToS3()

Upload folders to S3

uploadToS3()

Copy entire home folder to S3

uploadToExchange()

Copy entire home folder to Exchange

bookMapPublicationFolder($)

Folder for html obtained by converting bookmap in supplied file

   Parameter  Description
1  $bookMap   Bookmap file

convertBookMapToHtml($)

Publish bookmaps on web server

   Parameter  Description
1  $bookMap   Bookmap

convertBookMapsToHtml()

Publish bookmaps on web server

convertDitaToHtml()

Publish bookmaps on web server

runTests()

Run tests by comparing files in folder out with corresponding files in testResults.

normalizeXml($)

Remove document processor tags

   Parameter  Description
1  $string    Text to normalize

testResult($$$)

Evaluate the results of a test

   Parameter  Description
1  $test      Test name
2  $got       What we got
3  $expected  What we expected result

checkResults()

Check test results

reportProjectsThatFailedToParse()

Report projects that failed to parse

reportSourceMapToTargets()

Report where the source files went

convertSelectedProjects()

Convert the selected documents by reading their source in in, converting them and writing the resulting topics to out.

fixDitaXrefHrefs()

Fix single word xref href attributes so that they are in dita format - these tend to originate in non dita xml.

reportProgramAttributeSettings()

Report the attribute settings

convertProjects()

Convert the selected documents.

restructureOneFile($$)

Restructure one output file

   Parameter  Description
1  $phase     Phase
2  $file      File to restructure

restructureResultsFiles()

Restructure output folders based on results from Lint and Xre

restructureResults()

Restructure output folders based on results from Lint and Xre

notifyUsers()

Notify users of results

replaceableMethods()

Replaceable methods

attributeMethods()

Attribute methods

overrideMethods($)

Merge packages

   Parameter  Description
1  $package   Name of package to be merged defaulting to that of the caller.

checkParameters()

Check parameters for obvious failures

convertXmlToDita()

Perform all the conversion projects.

Index

1 afterConvertProjects - Run just after project conversion starts

2 analyzeHits - Analyze the hits to find "at" calls that always fail so we can consider them for removal

3 attributeMethods - Attribute methods

4 beforeConvertProjects - Run just before project conversion starts

5 beforeUploadToS3 - Copy additional files into position before upload to s3

6 bookMapPublicationFolder - Folder for html obtained by converting bookmap in supplied file

7 checkParameters - Check parameters for obvious failures

8 checkResults - Check test results

9 chooseIDGroup - Return the id group for a project - files with the same id group share the same set of id attributes.

10 chunkFile - Chunk a file name to make it more readable

11 cleanUpBookMap - Clean up a book map once all its topics have been cut out and its output file has been assigned

12 cleanUpCutOutTopic - Clean up a topic once it has been cut out and its output file has been assigned

13 conversionName - Conversion name.

14 convertBookMapsToHtml - Publish bookmaps on web server

15 convertBookMapToHtml - Publish bookmaps on web server

16 convertDitaToHtml - Publish bookmaps on web server

17 convertDocument - Convert one document.

18 convertImageToSvg - Convert a graphics file to svg

19 convertOneFileToUTF8 - Convert one file to utf8 and return undef if successful else the name of the document in error

20 convertProject - Convert one document held in folder in into topic files held in out.

21 convertProjects - Convert the selected documents.

22 convertSelectedProjects - Convert the selected documents by reading their source in in, converting them and writing the resulting topics to out.

23 convertToUTF8 - Convert the encoding of documents in downloads to utf8 equivalents in folder in.

24 convertXmlToDita - Perform all the conversion projects.

25 copyFilesToWeb - Copy files into position so that they can be web served

26 copyFilesToWeb2 - Copy files into position so that they can be web served

27 copyLogFiles - Copy log files to reports/ so they get uploaded too

28 copyToAws - Copy to aws

29 couldBeCutOut - Return true if this node can be cut out

30 cutOutTopics - Cut out the topics in a document assuming that they are nested within the parse tree and create a bookmap from the residue if it is not already a bookmap

31 ddd - Log development messages

32 downloadFromS3 - Download documents from S3 to the downloads folder.

33 eee - Log error messages

34 findImage - Find an image that has been misplaced

35 findProjectFromSource - Locate a project by its source file

36 fixDitaXrefHrefs - Fix single word xref href attributes so that they are in dita format - these tend to originate in non dita xml.

37 formatXml - Format xml

38 getFromAws - Get results from Aws

39 getHome - Compute home directory once.

40 isAMap - Return true if this node is a map

41 lintBookMap - Lint a book map

42 lintResults - Lint results held in folder outand write reports to folder reports.

43 lintResultsDefault - Lint results held in folder outand write reports to folder reports.

44 lintTopic - Lint a topic and return the lint details

45 loadProjects - Locate documents to convert from folder in.

46 mifToXml - Convert Mif to Xml

47 newProject - Project details including at a minimum the name of the project and its source file.

48 normalizeXml - Remove document processor tags

49 notifyUsers - Notify users of results

50 overrideMethods - Merge packages

51 parseCacheFile - Name of the file in which to cache parse trees

52 parseFile - Parse a file

53 parseProject - Parse a project.

54 pleaseSee - AWS command to see results

55 projectCount - Number of projects.

56 replaceableMethods - Replaceable methods

57 reportProgramAttributeSettings - Report the attribute settings

58 reportProjectsThatFailedToParse - Report projects that failed to parse

59 reportSourceMapToTargets - Report where the source files went

60 restructureCleanUp - Cleanup after each restructuring phase

61 restructureOneDocument - Restructure one document

62 restructureOneFile - Restructure one output file

63 restructureOutputFiles - Restructure output folders based on results from Lint and Xref

64 restructureResults - Restructure output folders based on results from Lint and Xre

65 restructureResultsFiles - Restructure output folders based on results from Lint and Xre

66 runTests - Run tests by comparing files in folder out with corresponding files in testResults.

67 s3ExchangeFolder - S3 exchange folder

68 s3InputFolder - S3 input folder

69 s3OutputFolder - S3 output folder

70 s3ProfileValue - S3 profile keyword.

71 saveCode - Save code if developing

72 selectFileForProcessing - Select an input file for processing

73 setAtHits - Set hit tracking

74 spelling - Fix spelling in source string

75 spellingOut - Fix spelling in output string

76 standardDitaCleanUp - Clean up some items that always need to be done in Dita topics

77 standardDitaCleanUpDefault - Clean up some items that always need to be done in Dita topics

78 testResult - Evaluate the results of a test

79 topicIsEssentiallyEmpty - Return 1 if the topic is essentially empty else undef.

80 uploadFoldersToS3 - Upload folders to S3

81 uploadToExchange - Copy entire home folder to Exchange

82 uploadToS3 - Copy entire home folder to S3

83 xrefResults - Run Xref to fix check results

Installation

This module is written in 100% Pure Perl and, thus, it is easy to read, comprehend, use, modify and install via cpan:

sudo cpan install Data::Edit::Xml::To::DitaVb

Author

philiprbrenan@gmail.com

http://www.appaapps.com

Copyright

Copyright (c) 2016-2019 Philip R Brenan.

This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself.