P
printdude1968
Hi Everyone...
I'm a newbie to this stuff so bear with me.
I have a well formed xml document (I use jdom to verify)
<?xml version="1.0" encoding="ISO-8859-1"?>
<print-control>
<destinations
xmlns:destination0="http://mydomain.com/destinations/dest0"
xmlns:destination1="http://mydomain.com/destinations/dest1"
xmlns:destination2="http://mydomain.com/destinations/dest2"
xmlns:destination3="http://mydomain.com/destinations/dest3"
xmlns:destination4="http://mydomain.com/destinations/dest4"
xmlns:destination5="http://mydomain.com/destinations/dest5"
xmlns:destination6="http://mydomain.com/destinations/dest6"
xmlns:destination7="http://mydomain.com/destinations/dest7"
xmlns:destination8="http://mydomain.com/destinations/dest8"
xmlns:destination9="http://mydomain.com/destinations/dest9">
</destinations>
<production
xmlns:lp10="http://mydomain.comprinters/lp10"
xmlns:lp20="http://mydomain.comprinters/lp20"
xmlns:lp22="http://mydomain.comprinters/lp22"
xmlns:lp80="http://mydomain.comprinters/lp80"
xmlns:lp110="http://mydomain.comprinters/lp110"
xmlns:lp320="http://mydomain.comprinters/lp320"
xmlns:lp322="http://mydomain.comprinters/lp322"
xmlns:lp650="http://mydomain.comprinters/lp650"
xmlns:lp651="http://mydomain.comprinters/lp651"
xmlns:lp652="http://mydomain.comprinters/lp652"
xmlns:lp700="http://mydomain.comprinters/lp700"
xmlns:lp701="http://mydomain.comprinters/lp701"
xmlns:lp702="http://mydomain.comprinters/lp702"
xmlns:lp703="http://mydomain.comprinters/lp703"
xmlns:lp856="http://mydomain.comprinters/lp856"
xmlns:lp900="http://mydomain.comprinters/lp900">
<destination1>
<lp10:configuration>
<lp10:mapsBackToBCISClass>W</lp10:mapsBackToBCISClass>
<lp10:queueType>psfOther</lp10:queueType>
<lp10:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp10:formfontFilters>
<lp10:formfontPath>/dev/fs/E/PrintApps/LBM</lp10:formfontPath>
<lp10:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp10:jobName>
<lp10ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp10ptionsInputTextFile>
<lp10:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp10:dataInputTextFile>
<lp10:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp10:chequeOutputPCLFile>
<lp10clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp10clOutputPCLFile>
<lp10:billsOutputTextFile>${dataInputTextFile}.bill</lp10:billsOutputTextFile>
<lp10:changeDate>$(date "+%Y-%m-%d")</lp10:changeDate>
<lp10:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp10:splitOn>
<lp10:logicalQueue>PD${localQueueDestCode}PSF1</lp10:logicalQueue>
<lp10:media>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp10:media>
<lp10:spliton>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp10:spliton>
<lp10:countpage>${TOTAL_PAGES}</lp10:countpage>
<lp10:startpage>1</lp10:startpage>
<lp10:endpage>200</lp10:endpage>
<lp10:numfile>1</lp10:numfile>
<lp10:get_options>""</lp10:get_options>
<lp10:defaultMedium>3hol</lp10:defaultMedium>
</lp10:configuration>
<lp700:configuration>
<lp700:mapsBackToBCISClass>N/A</lp700:mapsBackToBCISClass>
<lp700:queueType>PassThrough</lp700:queueType>
<lp700:logicalQueue>PD${localQueueDestCode}PT1</lp700:logicalQueue>
<lp700:fileName>$(cat ${optionsInputTextFile} | awk '{print $2}' |
awk -F= '{print $2}' )</lp700:fileName>
<lp700lex>$(cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}' )</lp700lex>
<lp700:fileNamePart1>$( echo ${dev_file_name} | awk -F'_' '{print
$1}')</lp700:fileNamePart1>
<lp700:fileNamePart2>$( echo ${dev_file_name} | awk -F'_' '{print
$2}')</lp700:fileNamePart2>
<lp700:underwriterCode>$( echo ${fileNamePart2} | cut
-c1-4)</lp700:underwriterCode>
<lp700:repCode>$( echo ${fileNamePart2} | cut
-c5-8)</lp700:repCode>
<lp700:series>$( echo ${fileNamePart2} | cut -c9-9)</lp700:series>
<lp700:group>$( echo ${fileNamePart2} | cut -c10-12)</lp700:group>
<lp700:roomText>$(cat ${optionsInputTextFile} | awk '{print $6}' |
awk -F= '{print $2}' )</lp700:roomText>
<lp700:media>$(cat ${optionsInputTextFile} | awk '{print $4}' |
awk -F= '{print $2}' )</lp700:media>
<lp700:defaultMediaCode>"default-medium=${media}"</lp700:defaultMediaCode>
</lp700:configuration>
</destination1>
<destination2>
</destination2>
<destination3>
</destination3>
<destination4>
<lp110:configuration>
<lp110:mapsBackToBCISClass>H</lp110:mapsBackToBCISClass>
<lp110:queueType>psfOther</lp110:queueType>
<lp110:logicalQueue>PD${localQueueDestCode}PSF3</lp110:logicalQueue>
<lp110:defaultMedium>3hol</lp110:defaultMedium>
<lp110:form>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp110:form>
<lp110:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp110:formfontFilters>
<lp110:formfontPath>/dev/fs/E/PrintApps/LBM</lp110:formfontPath>
<lp110:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp110:jobName>
<lp110ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp110ptionsInputTextFile>
<lp110:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp110:dataInputTextFile>
<lp110:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp110:chequeOutputPCLFile>
<lp110clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp110clOutputPCLFile>
<lp110:billsOutputTextFile>${dataInputTextFile}.bill</lp110:billsOutputTextFile>
<lp110:changeDate>$(date "+%Y-%m-%d")</lp110:changeDate>
<lp110:lpsdirWin>"E:\\ROC\\OM\\server"</lp110:lpsdirWin>
<lp110:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp110:splitOn>
</lp110:configuration>
</destination4>
<destination5>
</destination5>
<destination6>
<lp650:configuration>
<lp650:mapsBackToBCISClass>CHEQQB</lp650:mapsBackToBCISClass>
<lp650:queueType>PassThrough</lp650:queueType>
<lp650:formfontMode>Dynamic</lp650:formfontMode>
<lp650:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp650:formfontFilters>
<lp650:formfontPath>/dev/fs/E/PrintApps/LBM</lp650:formfontPath>
<lp650:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp650:jobName>
<lp650ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp650ptionsInputTextFile>
<lp650:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp650:dataInputTextFile>
<lp650:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp650:chequeOutputPCLFile>
<lp650clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp650clOutputPCLFile>
<lp650:billsOutputTextFile>${dataInputTextFile}.bill</lp650:billsOutputTextFile>
<lp650:changeDate>$(date "+%Y-%m-%d")</lp650:changeDate>
<lp650:lpsdirWin>"E:\\ROC\\OM\\server"</lp650:lpsdirWin>
<lp650:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp650:splitOn>
<lp650:logicalQueue>PD${localQueueDestCode}PT2</lp650:logicalQueue>
<lp650:media>$(cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp650:media>
<lp650:form>$(cat ${optionsInputTextFile} | awk '{print $8}' | awk
-F= '{print $2}')</lp650:form>
<lp650:room>$(cat ${optionsInputTextFile} | awk '{print $9}' | awk
-F= '{print $2}')</lp650:room>
<lp650rogrammerText>$(cat ${optionsInputTextFile} | awk '{print
$3 " " $1 " " $10}')</lp650rogrammerText>
<lp650rogrammerTextSpaced>$(echo $programmerText | sed "s/=/
/g")</lp650rogrammerTextSpaced>
<lp650rogrammerTextReplaced>$(echo $programmerTextSpaced| awk
'{print $2 "." $4 "." $6}')</lp650rogrammerTextReplaced>
</lp650:configuration>
<lp651:configuration>
<lp651:mapsBackToBCISClass>CHEQQB2</lp651:mapsBackToBCISClass>
<lp651:queueType>PassThrough</lp651:queueType>
<lp651:formfontMode>Static</lp651:formfontMode>
<lp651:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp651:formfontFilters>
<lp651:formfontPath>/dev/fs/E/PrintApps/LBM</lp651:formfontPath>
<lp651:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp651:jobName>
<lp651ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp651ptionsInputTextFile>
<lp651:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp651:dataInputTextFile>
<lp651:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp651:chequeOutputPCLFile>
<lp651clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp651clOutputPCLFile>
<lp651:billsOutputTextFile>${dataInputTextFile}.bill</lp651:billsOutputTextFile>
<lp651:changeDate>$(date "+%Y-%m-%d")</lp651:changeDate>
<lp651:lpsdirWin>"E:\\ROC\\OM\\server"</lp651:lpsdirWin>
<lp651:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp651:splitOn>
<lp651:logicalQueue>PD${localQueueDestCode}PT2</lp651:logicalQueue>
<lp651:componentCombo>$(cat ${optionsInputTextFile} | awk '{print
$3 " " $1 " " $10}')</lp651:componentCombo>
<lp651:comboNoDelimiter>$(echo ${componentCombo} | sed "s/=/
/g")</lp651:comboNoDelimiter>
<lp651:comboDotDelimiter>$(echo ${comboNoDelimiter}| awk '{print $2
"." $4 "." $6}')</lp651:comboDotDelimiter>
<lp651:room>$(cat ${optionsInputTextFile} | awk '{print $9}' | awk
-F= '{print $2}')</lp651:room>
<lp651:commentLine>"${dev_room}:${form}:Filename:${comboDotDelimiter}"</lp651:commentLine>
</lp651:configuration>
<lp652:configuration>
<lp652:mapsBackToBCISClass>WQB</lp652:mapsBackToBCISClass>
<lp652:queueType>psfOther</lp652:queueType>
<lp652:logicalQueue>PD${localQueueDestCode}PSF1</lp652:logicalQueue>
<lp652:defaultMedium>3hol</lp652:defaultMedium>
<lp652:logicalQueue>PD${localQueueDestCode}PSF1</lp652:logicalQueue>
<lp652:form>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp652:form>
<lp652:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp652:formfontFilters>
<lp652:formfontPath>/dev/fs/E/PrintApps/LBM</lp652:formfontPath>
<lp652:logOutputTextFile>${LPSDIR}/adm/log</lp652:logOutputTextFile>
<lp652:topLevel>/dev/fs/E/</lp652:topLevel>
<lp652:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp652:jobName>
<lp652ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp652ptionsInputTextFile>
<lp652:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp652:dataInputTextFile>
<lp652:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp652:chequeOutputPCLFile>
<lp652clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp652clOutputPCLFile>
<lp652:billsOutputTextFile>${dataInputTextFile}.bill</lp652:billsOutputTextFile>
<lp652:changeDate>$(date "+%Y-%m-%d")</lp652:changeDate>
<lp652:lpsdirWin>"E:\\ROC\\OM\\server"</lp652:lpsdirWin>
<lp652:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp652:splitOn>
</lp652:configuration>
<lp701:configuration>
<lp701:mapsBackToBCISClass>N/A</lp701:mapsBackToBCISClass>
<lp701:queueType>PassThrough</lp701:queueType>
<lp701:logicalQueue>PD${localQueueDestCode}PT1</lp701:logicalQueue>
<lp701:fileName>$(cat ${optionsInputTextFile} | awk '{print $2}' |
awk -F= '{print $2}' )</lp701:fileName>
<lp701lex>$(cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}' )</lp701lex>
<lp701:fileNamePart1>$( echo ${dev_file_name} | awk -F'_' '{print
$1}')</lp701:fileNamePart1>
<lp701:fileNamePart2>$( echo ${dev_file_name} | awk -F'_' '{print
$2}')</lp701:fileNamePart2>
<lp701:underwriterCode>$( echo ${fileNamePart2} | cut
-c1-4)</lp701:underwriterCode>
<lp701:repCode>$( echo ${fileNamePart2} | cut
-c5-8)</lp701:repCode>
<lp701:series>$( echo ${fileNamePart2} | cut -c9-9)</lp701:series>
<lp701:group>$( echo ${fileNamePart2} | cut -c10-12)</lp701:group>
<lp701:roomText>$(cat ${optionsInputTextFile} | awk '{print $6}' |
awk -F= '{print $2}' )</lp701:roomText>
<lp701:media>$(cat ${optionsInputTextFile} | awk '{print $4}' |
awk -F= '{print $2}' )</lp701:media>
<lp701:defaultMediaCode>"default-medium=${media}"</lp701:defaultMediaCode>
</lp701:configuration>
</destination6>
<lp702:configuration>
</lp702:configuration>
</destination7>
<destination8>
</destination8>
<destination9>
</destination9>
</production>
<development
xmlns:lp10="http://mydomain.com/printers/lp10"
xmlns:lp20="http://mydomain.com/printers/lp20"
xmlns:lp22="http://mydomain.com/printers/lp22"
xmlns:lp80="http://mydomain.com/printers/lp80"
xmlns:lp110="http://mydomain.com/printers/lp110"
xmlns:lp171="http://mydomain.com/printers/lp171"
xmlns:lp173="http://mydomain.com/printers/lp173"
xmlns:lp174="http://mydomain.com/printers/lp174"
xmlns:lp175="http://mydomain.com/printers/lp175"
xmlns:lp176="http://mydomain.com/printers/lp176"
xmlns:lp320="http://mydomain.com/printers/lp320"
xmlns:lp322="http://mydomain.com/printers/lp322"
xmlns:lp650="http://mydomain.com/printers/lp650"
xmlns:lp651="http://mydomain.com/printers/lp651"
xmlns:lp652="http://mydomain.com/printers/lp652"
xmlns:lp700="http://mydomain.com/printers/lp700"
xmlns:lp701="http://mydomain.com/printers/lp701"
xmlns:lp702="http://mydomain.com/printers/lp702"
xmlns:lp703="http://mydomain.com/printers/lp703"
xmlns:lp856="http://mydomain.com/printers/lp856"
xmlns:lp900="http://mydomain.com/printers/lp900">
<destination1>
<lp173:configuration>
<lp173:mapsBackToBCISClass>PDFCHE2</lp173:mapsBackToBCISClass>
<lp173:queueType>N/A</lp173:queueType>
<lp173:formfontMode>Static</lp173:formfontMode>
<lp173:logicalQueue>pdfOnly</lp173:logicalQueue>
<lp173dfChangeTime>$( date "+%H.%M.%S" )</lp173dfChangeTime>
<lp173dfChangeDate>$( date "+%Y-%m-%d")</lp173dfChangeDate>
<lp173dfProgrammerText>$( grep "programmer"
${optionsInputTextFile} | awk '{print $3}' | awk -F= '{print
$2}')</lp173dfProgrammerText>
<lp173dfJobname>$( grep "job" ${optionsInputTextFile} | awk
'{print $1}' | awk -F= '{print $2}' )</lp173dfJobname>
<lp173dfOutputFile>${LPDEST}/pdfOutputFile.${SEQ}</lp173dfOutputFile>
<lp173dfRepname>$( grep "room" ${optionsInputTextFile} | awk
'{print $9}' | awk -F= '{print $2}')</lp173dfRepname>
<lp173dfForm>$( grep "room" ${optionsInputTextFile} | awk '{print
$7}' | awk -F= '{print $2}')</lp173dfForm>
<lp173dfRoom>( grep "room" ${optionsInputTextFile}| awk '{print
$9}' | awk -F= '{print $2}')</lp173dfRoom>
<lp173dfOutputFileName>${pdfProgrammerText}-${pdfJobname}-${pdfRepname}-${SEQ}</lp173dfOutputFileName>
<lp173dfDocName>${pdfChangeDate}-${pdfForm}-${pdfOutputFileName}.${pdfChangeTime}.pdf
</lp173dfDocName>
</lp173:configuration>
<lp700:configuration>
<lp700:logicalQueue>PD${localQueueDestCode}PT1</lp700:logicalQueue>
<lp700:fileName>$(cat ${optionsInputTextFile} | awk '{print $2}' |
awk -F= '{print $2}' )</lp700:fileName>
<lp700lex>$(cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}' )</lp700lex>
<lp700:fileNamePart1>$( echo ${dev_file_name} | awk -F'_' '{print
$1}')</lp700:fileNamePart1>
<lp700:fileNamePart2>$( echo ${dev_file_name} | awk -F'_' '{print
$2}')</lp700:fileNamePart2>
<lp700:underwriterCode>$( echo ${fileNamePart2} | cut
-c1-4)</lp700:underwriterCode>
<lp700:repCode>$( echo ${fileNamePart2} | cut
-c5-8)</lp700:repCode>
<lp700:series>$( echo ${fileNamePart2} | cut -c9-9)</lp700:series>
<lp700:group>$( echo ${fileNamePart2} | cut -c10-12)</lp700:group>
<lp700:roomText>$(cat ${optionsInputTextFile} | awk '{print $6}' |
awk -F= '{print $2}' )</lp700:roomText>
<lp700:media>$(cat ${optionsInputTextFile} | awk '{print $4}' |
awk -F= '{print $2}' )</lp700:media>
<lp700:defaultMediaCode>"default-medium=${media}"</lp700:defaultMediaCode>
</lp700:configuration>
</destination2>
<destination3>
<lp20:configuration>
<lp20:mapsBackToBCISClass>C</lp20:mapsBackToBCISClass>
<lp20:queueType>psfOther</lp20:queueType>
<lp20:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp20:formfontFilters>
<lp20:formfontPath>/dev/fs/E/PrintApps/LBM</lp20:formfontPath>
<lp20:logOutputTextFile>${LPSDIR}/adm/log</lp20:logOutputTextFile>
<lp20:topLevel>/dev/fs/E/</lp20:topLevel>
<lp20:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp20:jobName>
<lp20ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp20ptionsInputTextFile>
<lp20:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp20:dataInputTextFile>
<lp20:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp20:chequeOutputPCLFile>
<lp20clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp20clOutputPCLFile>
<lp20:billsOutputTextFile>${dataInputTextFile}.bill</lp20:billsOutputTextFile>
<lp20:changeDate>$(date "+%Y-%m-%d")</lp20:changeDate>
<lp20:lpsdirWin>"E:\\ROC\\OM\\server"</lp20:lpsdirWin>
<lp20:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp20:splitOn>
<lp20:logicalQueue>doNotPrint</lp20:logicalQueue>
</lp20:configuration>
<lp900:configuration>
<lp900:mapsBackToBCISClass>WO</lp900:mapsBackToBCISClass>
<lp900:queueType>psfOther</lp900:queueType>
<lp900:logicalQueue>PD${localQueueDestCode}PSF1</lp900:logicalQueue>
<lp900:defaultMedium>3hol</lp900:defaultMedium>
<lp900:logicalQueue>PD${localQueueDestCode}PSF1</lp900:logicalQueue>
<lp900:form>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp900:form>
<lp900:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp900:formfontFilters>
<lp900:formfontPath>/dev/fs/E/PrintApps/LBM</lp900:formfontPath>
<lp900:logOutputTextFile>${LPSDIR}/adm/log</lp900:logOutputTextFile>
<lp900:topLevel>/dev/fs/E/</lp900:topLevel>
<lp900:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp900:jobName>
<lp900ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp900ptionsInputTextFile>
<lp900:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp900:dataInputTextFile>
<lp900:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp900:chequeOutputPCLFile>
<lp900clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp900clOutputPCLFile>
<lp900:billsOutputTextFile>${dataInputTextFile}.bill</lp900:billsOutputTextFile>
<lp900:changeDate>$(date "+%Y-%m-%d")</lp900:changeDate>
<lp900:lpsdirWin>"E:\\ROC\\OM\\server"</lp900:lpsdirWin>
<lp900:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp900:splitOn>
</lp900:configuration>
</destination3>
</development>
</print-control>
What I need is an xsl or something which will let me go through the
document and create a table
Pseudo code
for each destination d in production
for each printer (ie. lp10) in d
format a line for each attribute
done
done
for each destination d in developement
for each printer (ie. lp10) in d
format a line for each attribute
done
done
I've played around with xsl and xslt and seem to run into issues when I
find that I need to process the
namespaces....
There must be an easy way to do it
Here's what I'd like my output to look like
Production
lp110
BackToBCISClass=>H
queueType=>psfOther
logicalQueue=PD${localQueueDestCode}PSF3
defaultMedium=>3hol
form=>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk -F=
'{print $2}')
formfontFilters=>/dev/fs/E/PrintApps/LBM/filters/
formfontPath=>/dev/fs/E/PrintApps/LBM
jobName=>$(cat ${optionsInputTextFile} | awk '{print $1}' | awk
-F= '{print $2}')
optionsInputTextFile=>${LPSDIR}/${DEST}/o.${SEQ}
dataInputTextFile=>${LPSDIR}/${DEST}/p.${SEQ}
chequeOutputPCLFile=>${LPSDIR}/${DEST}/cheque.${SEQ}
pclOutputPCLFile=${LPSDIR}/${DEST}/file.${SEQ}
billsOutputTextFile=>${dataInputTextFile}.bill
changeDate=>$(date "+%Y-%m-%d")
lpsdirWin=>"E:\\ROC\\OM\\server"
splitOn=>$( head -n 1 ${dataInputTextFile} | cut -c2-4)
Is this possible using xsl or xslt and if so, how do I reconcile the
namespaces?
I'm a newbie to this stuff so bear with me.
I have a well formed xml document (I use jdom to verify)
<?xml version="1.0" encoding="ISO-8859-1"?>
<print-control>
<destinations
xmlns:destination0="http://mydomain.com/destinations/dest0"
xmlns:destination1="http://mydomain.com/destinations/dest1"
xmlns:destination2="http://mydomain.com/destinations/dest2"
xmlns:destination3="http://mydomain.com/destinations/dest3"
xmlns:destination4="http://mydomain.com/destinations/dest4"
xmlns:destination5="http://mydomain.com/destinations/dest5"
xmlns:destination6="http://mydomain.com/destinations/dest6"
xmlns:destination7="http://mydomain.com/destinations/dest7"
xmlns:destination8="http://mydomain.com/destinations/dest8"
xmlns:destination9="http://mydomain.com/destinations/dest9">
</destinations>
<production
xmlns:lp10="http://mydomain.comprinters/lp10"
xmlns:lp20="http://mydomain.comprinters/lp20"
xmlns:lp22="http://mydomain.comprinters/lp22"
xmlns:lp80="http://mydomain.comprinters/lp80"
xmlns:lp110="http://mydomain.comprinters/lp110"
xmlns:lp320="http://mydomain.comprinters/lp320"
xmlns:lp322="http://mydomain.comprinters/lp322"
xmlns:lp650="http://mydomain.comprinters/lp650"
xmlns:lp651="http://mydomain.comprinters/lp651"
xmlns:lp652="http://mydomain.comprinters/lp652"
xmlns:lp700="http://mydomain.comprinters/lp700"
xmlns:lp701="http://mydomain.comprinters/lp701"
xmlns:lp702="http://mydomain.comprinters/lp702"
xmlns:lp703="http://mydomain.comprinters/lp703"
xmlns:lp856="http://mydomain.comprinters/lp856"
xmlns:lp900="http://mydomain.comprinters/lp900">
<destination1>
<lp10:configuration>
<lp10:mapsBackToBCISClass>W</lp10:mapsBackToBCISClass>
<lp10:queueType>psfOther</lp10:queueType>
<lp10:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp10:formfontFilters>
<lp10:formfontPath>/dev/fs/E/PrintApps/LBM</lp10:formfontPath>
<lp10:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp10:jobName>
<lp10ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp10ptionsInputTextFile>
<lp10:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp10:dataInputTextFile>
<lp10:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp10:chequeOutputPCLFile>
<lp10clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp10clOutputPCLFile>
<lp10:billsOutputTextFile>${dataInputTextFile}.bill</lp10:billsOutputTextFile>
<lp10:changeDate>$(date "+%Y-%m-%d")</lp10:changeDate>
<lp10:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp10:splitOn>
<lp10:logicalQueue>PD${localQueueDestCode}PSF1</lp10:logicalQueue>
<lp10:media>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp10:media>
<lp10:spliton>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp10:spliton>
<lp10:countpage>${TOTAL_PAGES}</lp10:countpage>
<lp10:startpage>1</lp10:startpage>
<lp10:endpage>200</lp10:endpage>
<lp10:numfile>1</lp10:numfile>
<lp10:get_options>""</lp10:get_options>
<lp10:defaultMedium>3hol</lp10:defaultMedium>
</lp10:configuration>
<lp700:configuration>
<lp700:mapsBackToBCISClass>N/A</lp700:mapsBackToBCISClass>
<lp700:queueType>PassThrough</lp700:queueType>
<lp700:logicalQueue>PD${localQueueDestCode}PT1</lp700:logicalQueue>
<lp700:fileName>$(cat ${optionsInputTextFile} | awk '{print $2}' |
awk -F= '{print $2}' )</lp700:fileName>
<lp700lex>$(cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}' )</lp700lex>
<lp700:fileNamePart1>$( echo ${dev_file_name} | awk -F'_' '{print
$1}')</lp700:fileNamePart1>
<lp700:fileNamePart2>$( echo ${dev_file_name} | awk -F'_' '{print
$2}')</lp700:fileNamePart2>
<lp700:underwriterCode>$( echo ${fileNamePart2} | cut
-c1-4)</lp700:underwriterCode>
<lp700:repCode>$( echo ${fileNamePart2} | cut
-c5-8)</lp700:repCode>
<lp700:series>$( echo ${fileNamePart2} | cut -c9-9)</lp700:series>
<lp700:group>$( echo ${fileNamePart2} | cut -c10-12)</lp700:group>
<lp700:roomText>$(cat ${optionsInputTextFile} | awk '{print $6}' |
awk -F= '{print $2}' )</lp700:roomText>
<lp700:media>$(cat ${optionsInputTextFile} | awk '{print $4}' |
awk -F= '{print $2}' )</lp700:media>
<lp700:defaultMediaCode>"default-medium=${media}"</lp700:defaultMediaCode>
</lp700:configuration>
</destination1>
<destination2>
</destination2>
<destination3>
</destination3>
<destination4>
<lp110:configuration>
<lp110:mapsBackToBCISClass>H</lp110:mapsBackToBCISClass>
<lp110:queueType>psfOther</lp110:queueType>
<lp110:logicalQueue>PD${localQueueDestCode}PSF3</lp110:logicalQueue>
<lp110:defaultMedium>3hol</lp110:defaultMedium>
<lp110:form>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp110:form>
<lp110:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp110:formfontFilters>
<lp110:formfontPath>/dev/fs/E/PrintApps/LBM</lp110:formfontPath>
<lp110:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp110:jobName>
<lp110ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp110ptionsInputTextFile>
<lp110:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp110:dataInputTextFile>
<lp110:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp110:chequeOutputPCLFile>
<lp110clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp110clOutputPCLFile>
<lp110:billsOutputTextFile>${dataInputTextFile}.bill</lp110:billsOutputTextFile>
<lp110:changeDate>$(date "+%Y-%m-%d")</lp110:changeDate>
<lp110:lpsdirWin>"E:\\ROC\\OM\\server"</lp110:lpsdirWin>
<lp110:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp110:splitOn>
</lp110:configuration>
</destination4>
<destination5>
</destination5>
<destination6>
<lp650:configuration>
<lp650:mapsBackToBCISClass>CHEQQB</lp650:mapsBackToBCISClass>
<lp650:queueType>PassThrough</lp650:queueType>
<lp650:formfontMode>Dynamic</lp650:formfontMode>
<lp650:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp650:formfontFilters>
<lp650:formfontPath>/dev/fs/E/PrintApps/LBM</lp650:formfontPath>
<lp650:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp650:jobName>
<lp650ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp650ptionsInputTextFile>
<lp650:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp650:dataInputTextFile>
<lp650:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp650:chequeOutputPCLFile>
<lp650clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp650clOutputPCLFile>
<lp650:billsOutputTextFile>${dataInputTextFile}.bill</lp650:billsOutputTextFile>
<lp650:changeDate>$(date "+%Y-%m-%d")</lp650:changeDate>
<lp650:lpsdirWin>"E:\\ROC\\OM\\server"</lp650:lpsdirWin>
<lp650:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp650:splitOn>
<lp650:logicalQueue>PD${localQueueDestCode}PT2</lp650:logicalQueue>
<lp650:media>$(cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp650:media>
<lp650:form>$(cat ${optionsInputTextFile} | awk '{print $8}' | awk
-F= '{print $2}')</lp650:form>
<lp650:room>$(cat ${optionsInputTextFile} | awk '{print $9}' | awk
-F= '{print $2}')</lp650:room>
<lp650rogrammerText>$(cat ${optionsInputTextFile} | awk '{print
$3 " " $1 " " $10}')</lp650rogrammerText>
<lp650rogrammerTextSpaced>$(echo $programmerText | sed "s/=/
/g")</lp650rogrammerTextSpaced>
<lp650rogrammerTextReplaced>$(echo $programmerTextSpaced| awk
'{print $2 "." $4 "." $6}')</lp650rogrammerTextReplaced>
</lp650:configuration>
<lp651:configuration>
<lp651:mapsBackToBCISClass>CHEQQB2</lp651:mapsBackToBCISClass>
<lp651:queueType>PassThrough</lp651:queueType>
<lp651:formfontMode>Static</lp651:formfontMode>
<lp651:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp651:formfontFilters>
<lp651:formfontPath>/dev/fs/E/PrintApps/LBM</lp651:formfontPath>
<lp651:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp651:jobName>
<lp651ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp651ptionsInputTextFile>
<lp651:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp651:dataInputTextFile>
<lp651:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp651:chequeOutputPCLFile>
<lp651clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp651clOutputPCLFile>
<lp651:billsOutputTextFile>${dataInputTextFile}.bill</lp651:billsOutputTextFile>
<lp651:changeDate>$(date "+%Y-%m-%d")</lp651:changeDate>
<lp651:lpsdirWin>"E:\\ROC\\OM\\server"</lp651:lpsdirWin>
<lp651:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp651:splitOn>
<lp651:logicalQueue>PD${localQueueDestCode}PT2</lp651:logicalQueue>
<lp651:componentCombo>$(cat ${optionsInputTextFile} | awk '{print
$3 " " $1 " " $10}')</lp651:componentCombo>
<lp651:comboNoDelimiter>$(echo ${componentCombo} | sed "s/=/
/g")</lp651:comboNoDelimiter>
<lp651:comboDotDelimiter>$(echo ${comboNoDelimiter}| awk '{print $2
"." $4 "." $6}')</lp651:comboDotDelimiter>
<lp651:room>$(cat ${optionsInputTextFile} | awk '{print $9}' | awk
-F= '{print $2}')</lp651:room>
<lp651:commentLine>"${dev_room}:${form}:Filename:${comboDotDelimiter}"</lp651:commentLine>
</lp651:configuration>
<lp652:configuration>
<lp652:mapsBackToBCISClass>WQB</lp652:mapsBackToBCISClass>
<lp652:queueType>psfOther</lp652:queueType>
<lp652:logicalQueue>PD${localQueueDestCode}PSF1</lp652:logicalQueue>
<lp652:defaultMedium>3hol</lp652:defaultMedium>
<lp652:logicalQueue>PD${localQueueDestCode}PSF1</lp652:logicalQueue>
<lp652:form>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp652:form>
<lp652:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp652:formfontFilters>
<lp652:formfontPath>/dev/fs/E/PrintApps/LBM</lp652:formfontPath>
<lp652:logOutputTextFile>${LPSDIR}/adm/log</lp652:logOutputTextFile>
<lp652:topLevel>/dev/fs/E/</lp652:topLevel>
<lp652:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp652:jobName>
<lp652ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp652ptionsInputTextFile>
<lp652:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp652:dataInputTextFile>
<lp652:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp652:chequeOutputPCLFile>
<lp652clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp652clOutputPCLFile>
<lp652:billsOutputTextFile>${dataInputTextFile}.bill</lp652:billsOutputTextFile>
<lp652:changeDate>$(date "+%Y-%m-%d")</lp652:changeDate>
<lp652:lpsdirWin>"E:\\ROC\\OM\\server"</lp652:lpsdirWin>
<lp652:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp652:splitOn>
</lp652:configuration>
<lp701:configuration>
<lp701:mapsBackToBCISClass>N/A</lp701:mapsBackToBCISClass>
<lp701:queueType>PassThrough</lp701:queueType>
<lp701:logicalQueue>PD${localQueueDestCode}PT1</lp701:logicalQueue>
<lp701:fileName>$(cat ${optionsInputTextFile} | awk '{print $2}' |
awk -F= '{print $2}' )</lp701:fileName>
<lp701lex>$(cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}' )</lp701lex>
<lp701:fileNamePart1>$( echo ${dev_file_name} | awk -F'_' '{print
$1}')</lp701:fileNamePart1>
<lp701:fileNamePart2>$( echo ${dev_file_name} | awk -F'_' '{print
$2}')</lp701:fileNamePart2>
<lp701:underwriterCode>$( echo ${fileNamePart2} | cut
-c1-4)</lp701:underwriterCode>
<lp701:repCode>$( echo ${fileNamePart2} | cut
-c5-8)</lp701:repCode>
<lp701:series>$( echo ${fileNamePart2} | cut -c9-9)</lp701:series>
<lp701:group>$( echo ${fileNamePart2} | cut -c10-12)</lp701:group>
<lp701:roomText>$(cat ${optionsInputTextFile} | awk '{print $6}' |
awk -F= '{print $2}' )</lp701:roomText>
<lp701:media>$(cat ${optionsInputTextFile} | awk '{print $4}' |
awk -F= '{print $2}' )</lp701:media>
<lp701:defaultMediaCode>"default-medium=${media}"</lp701:defaultMediaCode>
</lp701:configuration>
</destination6>
<lp702:configuration>
</lp702:configuration>
</destination7>
<destination8>
</destination8>
<destination9>
</destination9>
</production>
<development
xmlns:lp10="http://mydomain.com/printers/lp10"
xmlns:lp20="http://mydomain.com/printers/lp20"
xmlns:lp22="http://mydomain.com/printers/lp22"
xmlns:lp80="http://mydomain.com/printers/lp80"
xmlns:lp110="http://mydomain.com/printers/lp110"
xmlns:lp171="http://mydomain.com/printers/lp171"
xmlns:lp173="http://mydomain.com/printers/lp173"
xmlns:lp174="http://mydomain.com/printers/lp174"
xmlns:lp175="http://mydomain.com/printers/lp175"
xmlns:lp176="http://mydomain.com/printers/lp176"
xmlns:lp320="http://mydomain.com/printers/lp320"
xmlns:lp322="http://mydomain.com/printers/lp322"
xmlns:lp650="http://mydomain.com/printers/lp650"
xmlns:lp651="http://mydomain.com/printers/lp651"
xmlns:lp652="http://mydomain.com/printers/lp652"
xmlns:lp700="http://mydomain.com/printers/lp700"
xmlns:lp701="http://mydomain.com/printers/lp701"
xmlns:lp702="http://mydomain.com/printers/lp702"
xmlns:lp703="http://mydomain.com/printers/lp703"
xmlns:lp856="http://mydomain.com/printers/lp856"
xmlns:lp900="http://mydomain.com/printers/lp900">
<destination1>
<lp173:configuration>
<lp173:mapsBackToBCISClass>PDFCHE2</lp173:mapsBackToBCISClass>
<lp173:queueType>N/A</lp173:queueType>
<lp173:formfontMode>Static</lp173:formfontMode>
<lp173:logicalQueue>pdfOnly</lp173:logicalQueue>
<lp173dfChangeTime>$( date "+%H.%M.%S" )</lp173dfChangeTime>
<lp173dfChangeDate>$( date "+%Y-%m-%d")</lp173dfChangeDate>
<lp173dfProgrammerText>$( grep "programmer"
${optionsInputTextFile} | awk '{print $3}' | awk -F= '{print
$2}')</lp173dfProgrammerText>
<lp173dfJobname>$( grep "job" ${optionsInputTextFile} | awk
'{print $1}' | awk -F= '{print $2}' )</lp173dfJobname>
<lp173dfOutputFile>${LPDEST}/pdfOutputFile.${SEQ}</lp173dfOutputFile>
<lp173dfRepname>$( grep "room" ${optionsInputTextFile} | awk
'{print $9}' | awk -F= '{print $2}')</lp173dfRepname>
<lp173dfForm>$( grep "room" ${optionsInputTextFile} | awk '{print
$7}' | awk -F= '{print $2}')</lp173dfForm>
<lp173dfRoom>( grep "room" ${optionsInputTextFile}| awk '{print
$9}' | awk -F= '{print $2}')</lp173dfRoom>
<lp173dfOutputFileName>${pdfProgrammerText}-${pdfJobname}-${pdfRepname}-${SEQ}</lp173dfOutputFileName>
<lp173dfDocName>${pdfChangeDate}-${pdfForm}-${pdfOutputFileName}.${pdfChangeTime}.pdf
</lp173dfDocName>
</lp173:configuration>
<lp700:configuration>
<lp700:logicalQueue>PD${localQueueDestCode}PT1</lp700:logicalQueue>
<lp700:fileName>$(cat ${optionsInputTextFile} | awk '{print $2}' |
awk -F= '{print $2}' )</lp700:fileName>
<lp700lex>$(cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}' )</lp700lex>
<lp700:fileNamePart1>$( echo ${dev_file_name} | awk -F'_' '{print
$1}')</lp700:fileNamePart1>
<lp700:fileNamePart2>$( echo ${dev_file_name} | awk -F'_' '{print
$2}')</lp700:fileNamePart2>
<lp700:underwriterCode>$( echo ${fileNamePart2} | cut
-c1-4)</lp700:underwriterCode>
<lp700:repCode>$( echo ${fileNamePart2} | cut
-c5-8)</lp700:repCode>
<lp700:series>$( echo ${fileNamePart2} | cut -c9-9)</lp700:series>
<lp700:group>$( echo ${fileNamePart2} | cut -c10-12)</lp700:group>
<lp700:roomText>$(cat ${optionsInputTextFile} | awk '{print $6}' |
awk -F= '{print $2}' )</lp700:roomText>
<lp700:media>$(cat ${optionsInputTextFile} | awk '{print $4}' |
awk -F= '{print $2}' )</lp700:media>
<lp700:defaultMediaCode>"default-medium=${media}"</lp700:defaultMediaCode>
</lp700:configuration>
</destination2>
<destination3>
<lp20:configuration>
<lp20:mapsBackToBCISClass>C</lp20:mapsBackToBCISClass>
<lp20:queueType>psfOther</lp20:queueType>
<lp20:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp20:formfontFilters>
<lp20:formfontPath>/dev/fs/E/PrintApps/LBM</lp20:formfontPath>
<lp20:logOutputTextFile>${LPSDIR}/adm/log</lp20:logOutputTextFile>
<lp20:topLevel>/dev/fs/E/</lp20:topLevel>
<lp20:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp20:jobName>
<lp20ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp20ptionsInputTextFile>
<lp20:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp20:dataInputTextFile>
<lp20:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp20:chequeOutputPCLFile>
<lp20clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp20clOutputPCLFile>
<lp20:billsOutputTextFile>${dataInputTextFile}.bill</lp20:billsOutputTextFile>
<lp20:changeDate>$(date "+%Y-%m-%d")</lp20:changeDate>
<lp20:lpsdirWin>"E:\\ROC\\OM\\server"</lp20:lpsdirWin>
<lp20:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp20:splitOn>
<lp20:logicalQueue>doNotPrint</lp20:logicalQueue>
</lp20:configuration>
<lp900:configuration>
<lp900:mapsBackToBCISClass>WO</lp900:mapsBackToBCISClass>
<lp900:queueType>psfOther</lp900:queueType>
<lp900:logicalQueue>PD${localQueueDestCode}PSF1</lp900:logicalQueue>
<lp900:defaultMedium>3hol</lp900:defaultMedium>
<lp900:logicalQueue>PD${localQueueDestCode}PSF1</lp900:logicalQueue>
<lp900:form>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk
-F= '{print $2}')</lp900:form>
<lp900:formfontFilters>/dev/fs/E/PrintApps/LBM/filters/</lp900:formfontFilters>
<lp900:formfontPath>/dev/fs/E/PrintApps/LBM</lp900:formfontPath>
<lp900:logOutputTextFile>${LPSDIR}/adm/log</lp900:logOutputTextFile>
<lp900:topLevel>/dev/fs/E/</lp900:topLevel>
<lp900:jobName>$(cat ${optionsInputTextFile} | awk '{print $1}' |
awk -F= '{print $2}')</lp900:jobName>
<lp900ptionsInputTextFile>${LPSDIR}/${DEST}/o.${SEQ}</lp900ptionsInputTextFile>
<lp900:dataInputTextFile>${LPSDIR}/${DEST}/p.${SEQ}</lp900:dataInputTextFile>
<lp900:chequeOutputPCLFile>${LPSDIR}/${DEST}/cheque.${SEQ}</lp900:chequeOutputPCLFile>
<lp900clOutputPCLFile>${LPSDIR}/${DEST}/file.${SEQ}</lp900clOutputPCLFile>
<lp900:billsOutputTextFile>${dataInputTextFile}.bill</lp900:billsOutputTextFile>
<lp900:changeDate>$(date "+%Y-%m-%d")</lp900:changeDate>
<lp900:lpsdirWin>"E:\\ROC\\OM\\server"</lp900:lpsdirWin>
<lp900:splitOn>$( head -n 1 ${dataInputTextFile} | cut
-c2-4)</lp900:splitOn>
</lp900:configuration>
</destination3>
</development>
</print-control>
What I need is an xsl or something which will let me go through the
document and create a table
Pseudo code
for each destination d in production
for each printer (ie. lp10) in d
format a line for each attribute
done
done
for each destination d in developement
for each printer (ie. lp10) in d
format a line for each attribute
done
done
I've played around with xsl and xslt and seem to run into issues when I
find that I need to process the
namespaces....
There must be an easy way to do it
Here's what I'd like my output to look like
Production
lp110
BackToBCISClass=>H
queueType=>psfOther
logicalQueue=PD${localQueueDestCode}PSF3
defaultMedium=>3hol
form=>$( cat ${optionsInputTextFile} | awk '{print $7}' | awk -F=
'{print $2}')
formfontFilters=>/dev/fs/E/PrintApps/LBM/filters/
formfontPath=>/dev/fs/E/PrintApps/LBM
jobName=>$(cat ${optionsInputTextFile} | awk '{print $1}' | awk
-F= '{print $2}')
optionsInputTextFile=>${LPSDIR}/${DEST}/o.${SEQ}
dataInputTextFile=>${LPSDIR}/${DEST}/p.${SEQ}
chequeOutputPCLFile=>${LPSDIR}/${DEST}/cheque.${SEQ}
pclOutputPCLFile=${LPSDIR}/${DEST}/file.${SEQ}
billsOutputTextFile=>${dataInputTextFile}.bill
changeDate=>$(date "+%Y-%m-%d")
lpsdirWin=>"E:\\ROC\\OM\\server"
splitOn=>$( head -n 1 ${dataInputTextFile} | cut -c2-4)
Is this possible using xsl or xslt and if so, how do I reconcile the
namespaces?