[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using XSL for creating DOS batch files
Hi all, The following code sample creates a procXml.bat files containing multiple commands to be executed sequentially. [...] <xsl:output name="bat" method="text" version="1.0" encoding="ascii" indent="no"/> [...] <xsl:template match="/"> <xsl:result-document href="procXml.bat" format="bat"> <xsl:for-each-group select="/Classes/Class/SADefinition[contains(@SAObjName,'app_')]" group-by="@SAObjName"> <xsl:sort select="@SAObjName"/> <xsl:if test="not(@SAObjName=/following-sibling::*[position()=1]/@SAObjName)"> <xsl:value-of select="concat('fop -fo ',@SAObjName,'.fo -pdf ',@SAObjName,'.pdf
')"/> </xsl:if> </xsl:for-each-group> </xsl:result-document> </xsl:template> And here is the output (procXml.bat): fop -fo app_AdmSpm.fo -pdf app_AdmSpm.pdf fop -fo app_AQis.fo -pdf app_AQis.pdf fop -fo app_AusbildungVorOrt.fo -pdf app_AusbildungVorOrt.pdf fop -fo app_Bestad.fo -pdf app_Bestad.pdf fop -fo app_Bipa.fo -pdf app_Bipa.pdf fop -fo app_Bmz.fo -pdf app_Bmz.pdf fop -fo app_Elz.fo -pdf app_Elz.pdf fop -fo app_Elze_Bz.fo -pdf app_Elze_Bz.pdf ... When I launch it in the command prompt, it will only run the first line, but not the others, then comes back to the prompt. For info : I tried to replace '
' by ' 
', which won't result to significant changes... furthermore, I changed the encode option into UTF-8 and US-ASCII. Nothing changed! Any help would be greatful ;-) Lawrence Michel
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|