Update of /cvsroot/babeldoc/babeldoc/modules/core/config/pipeline/documentation
In directory sc8-pr-cvs1:/tmp/cvs-serv26238/config/pipeline/documentation
Modified Files:
documentation.properties
Log Message:
updated the documentation pipeline and some supporting code.
Index: documentation.properties
===================================================================
RCS file: /cvsroot/babeldoc/babeldoc/modules/core/config/pipeline/documentation/documentation.properties,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** documentation.properties 8 Sep 2003 23:43:27 -0000 1.6
--- documentation.properties 17 Sep 2003 16:44:12 -0000 1.7
***************
*** 1,4 ****
--- 1,10 ----
+ #
+ #
+ # Babeldoc documentation pipeline
+ #
entryStage=attrdefault
+ # Check for style attribute - if not present
+ # default it to html
attrdefault.stageType=Scripting
attrdefault.nextStage=callstages
***************
*** 7,10 ****
--- 13,17 ----
attrdefault.attrs.style=html
+ # Call stage to generate the pipeline stage xml
callstages.stageType=CallStage
callstages.callStage=documentation.stagexml
***************
*** 12,15 ****
--- 19,23 ----
callstages.nextStage=callscanners
+ # Call stage to generate the scanner xml
callscanners.stageType=CallStage
callscanners.callStage=documentation.scannerxml
***************
*** 17,20 ****
--- 25,29 ----
callscanners.nextStage=callprocessors
+ # Call stage to generate the processor xml
callprocessors.stageType=CallStage
callprocessors.callStage=documentation.processorxml
***************
*** 22,47 ****
callprocessors.nextStage=loaduserguide
loaduserguide.stageType=Reader
loaduserguide.nextStage=callgenerateug
loaduserguide.file=${system.get("babeldoc.home")}/readme/userguide.xml
callgenerateug.stageType=CallStage
! callgenerateug.callStage=documentation.choose
callgenerateug.discardResults=true
callgenerateug.nextStage=loaddevguide
loaddevguide.stageType=Reader
loaddevguide.nextStage=callgeneratedg
loaddevguide.file=${system.get("babeldoc.home")}/readme/devguide.xml
callgeneratedg.stageType=CallStage
! callgeneratedg.callStage=documentation.choose
callgeneratedg.discardResults=true
callgeneratedg.nextStage=null
choose.stageType=Router
choose.nextStage=transform
choose.nextStage.pdftransform=#if(${document.get("style").equalsIgnoreCase("pdf")})true#end
transform.stageType=XslTransform
transform.transformationFile=${system.get("babeldoc.home")}/readme/docbook-xsl/${document.get("style")}/docbook.xsl
--- 31,79 ----
callprocessors.nextStage=loaduserguide
+ # Read the userguide xml
loaduserguide.stageType=Reader
loaduserguide.nextStage=callgenerateug
loaduserguide.file=${system.get("babeldoc.home")}/readme/userguide.xml
+ # call into the main documentation pipeline
callgenerateug.stageType=CallStage
! callgenerateug.callStage=documentation.basename
callgenerateug.discardResults=true
callgenerateug.nextStage=loaddevguide
+ # read the developer guide xml
loaddevguide.stageType=Reader
loaddevguide.nextStage=callgeneratedg
loaddevguide.file=${system.get("babeldoc.home")}/readme/devguide.xml
+ # call into the main documentation pipeline
callgeneratedg.stageType=CallStage
! callgeneratedg.callStage=documentation.basename
callgeneratedg.discardResults=true
callgeneratedg.nextStage=null
+ # Make the final output name for the documentation (name minus .xml)
+ basename.stageType=Scripting
+ basename.language=javascript
+ basename.nextStage=templatize
+ basename.script=\
+ var infile = document.get("file_name");\
+ var lastxml = infile.lastIndexOf(".xml");\
+ var basefile = infile.substring(0, lastxml); \
+ document.put("base_file", basefile);
+
+ # Templatize using velocity - this makes the ${..} get resolved in
+ # the xml - primarily for resolving paths to the babeldoc_home, etc.
+ templatize.stageType=VelocityTemplatize
+ templatize.splitAttributes=true
+ templatize.nextStage=choose
+
+ # If this style is pdf (not currently working) then do xslfo formating
+ #
choose.stageType=Router
choose.nextStage=transform
choose.nextStage.pdftransform=#if(${document.get("style").equalsIgnoreCase("pdf")})true#end
+ # Transform the document
transform.stageType=XslTransform
transform.transformationFile=${system.get("babeldoc.home")}/readme/docbook-xsl/${document.get("style")}/docbook.xsl
***************
*** 58,64 ****
fotransform.bufferSize=2048
writer.stageType=FileWriter
writer.nextStage=null
! writer.outputFile=${document.get("file_name")}.${document.get("style")}
#
--- 90,97 ----
fotransform.bufferSize=2048
+ # Write the document to the file
writer.stageType=FileWriter
writer.nextStage=null
! writer.outputFile=${document.get("base_file")}.${document.get("style")}
#
|