Philip R Brenan

Name

Data::Edit::Xml::SDL - Create SDL file map from a set of linted xml files produced by Data::Edit::Xml::Lint

Synopsis

Create an SDL file map from a set of linted xml files produced by Data::Edit::Xml::Lint

 my $s = Data::Edit::Xml::SDL::new();
    $s->sourcebasepath = 'C:\frame\batch1\out';
    $s->targetFolder   = qq(RyffineImportSGIfm);
    $s->imagePath      = qq(images);
    $s->version = 1;

 say STDERR $s->createSDLFileMap(qw(. xml));

Produces:

 <?xml version="1.0" encoding="utf-8"?>
 <filemap sourcebasepath="C:\hp\frame\batch1\out" version="12.0.0.0">;
   <file fileextension=".ditamap" >
     <ishobject ishref="GUID-D7147C7F-2017-0012-FRMB-000000000002" ishtype="ISHMasterDoc">
       <ishfields>
      <ishfield level="logical" name="FTITLE" xml:space="preserve">bm_0003388-002</ishfield>'
      <ishfield level="version" name="VERSION" xml:space="preserve">1</ishfield>
      <ishfield level="lng" name="DOC-LANGUAGE" xml:space="preserve">en-US</ishfield>
      <ishfield name="FAUTHOR" level="lng" xml:space="preserve">bill.gearhart@hpe.com</ishfield>
     </ishfields>
   </ishobject>
 </file>

etc.

Description

Constructor

Construct a new SDL file map creator

new()

Create a new SDL file map creator - call this method statically as in Data::Edit::Xml::Lint::new()

Attributes

Attributes describing a lint

filePathFolder :lvalue

Prefix this folder (if supplied) to the filepath

fileType :lvalue

The fileType of the file to be processed

folderHasMixedContent :lvalue

folderHasMixedContent field

ishType :lvalue

IshType field

imagePath :lvalue

Image path relative to sourcebasepath

language :lvalue

The language of the content, defaults to: 'en-US'

lint :lvalue

The lint of the file to be processed

sdlVersion :lvalue

Version of SDL we are using, defaults to: '12.0.0.0'

section :lvalue

Sub folder for file on SDL: maps, topics

sourcebasepath :lvalue

Path to source to be uploaded

targetFolder :lvalue

The SDL target folder to be used

version :lvalue

Version of the input content

SDL File Map

Generate an SDL file map

createSDLFileMap($@)

Generate an SDL file map for a selected set of files

  1  $sdl                   Sdl
  2  @foldersAndExtensions  Directory tree search specification

Private Methods

xmlLineOne()

Line one of all xml files

getFileMap()

File map tag

getFile($$)

File tag

  1  $sdl     Sdl file map creator
  2  $images  Processing an image file or not

getIshObject()

IshObject tag

getFTitle()

FTITLE tag

getVersion()

Version tag

getDocLanguage()

DOC-LANGUAGE tag

getAuthor()

Author tag

getResolution()

Resolution

Index

createSDLFileMap

filePathFolder

fileType

folderHasMixedContent

getAuthor

getDocLanguage

getFile

getFileMap

getFTitle

getIshObject

getResolution

getVersion

imagePath

ishType

language

lint

new

sdlVersion

section

sourcebasepath

targetFolder

version

xmlLineOne

Installation

This module is written in 100% Pure Perl and, thus, it is easy to read, use, modify and install.

Standard Module::Build process for building and installing modules:

  perl Build.PL
  ./Build
  ./Build test
  ./Build install

Author

philiprbrenan@gmail.com

http://www.appaapps.com

Copyright

Copyright (c) 2016-2017 Philip R Brenan.

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