[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Using XSL for creating DOS batch files

Subject: Using XSL for creating DOS batch files
From: <michella@xxxxxxx>
Date: Mon, 11 Oct 2004 16:38:15 +0200
dos batch concat
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&#xD;&#xA;')"/>

			</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 '&#xD;&#xA' by '&#10;&#13', 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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.