@echo off if "%1" EQU "chunked" ( set XSLTARGS=^ --stringparam toc.section.depth 1 ^ --stringparam generate.section.toc.level 2 ^ --stringparam chunk.first.sections 1 ^ --stringparam chunk.section.depth 2 ^ --stringparam base.dir chunked/ ^ --stringparam use.id.as.filename 1 ^ %DOCBOOKXSL%/html/chunk.xsl ) else ( set XSLTARGS=^ --stringparam toc.section.depth 4 ^ %DOCBOOKXSL%/html/docbook.xsl ) type sphinx.xml ^ | perl -pe "s///g" ^ | perl -pe "s/<\/b>/<\/emphasis>/g" ^ | perl -pe "s/(fixed|bug) #(\d+)/\1 #\2<\/ulink>/" ^ | xsltproc ^ --stringparam section.autolabel 1 ^ --stringparam section.label.includes.component.label 1 ^ %XSLTARGS% ^ - ^ | perl -pe "s/\xA0/\ /g" ^ | perl -pe "s/\xA9/\©/g" ^ | perl -pe "s/\xEF/\ï/g" ^ | perl -pe "s/((<\/(li|dt|dt|head|div)>)+)/\1\n/g" ^ | perl -pe "s/<\/a>//g" ^ | perl -pe "s/<\/head>/\n