|
next
|
 Subject: Running transform in SS UI completes, from command line does not Author: Bob Chauvin Date: 24 Jan 2008 04:14 PM Originally Posted: 24 Jan 2008 04:10 PM
|
I have a simple transform from XML to text file that works fine in the UI, but when I run it from the command prompt via a batch, the transform stops and truncates the output. In the UI it produces 860 rows in the text file, from the batch it stops part way through the 842nd entry.
In the UI i am running the built-in processor, which I think maps to stylusxslt.exe? Should they both return the same reslut?
Here's the command line from my .bat file:
@echo off
SetLocal
Set StylusXSLT="C:\Program Files\Stylus Studio 2007 XML Enterprise Suite Release 2\bin\stylusxslt.exe"
REM echo %StylusXSLT%
REM %StylusXSLT% ?
@echo on
%StylusXSLT% -in people\testperson.xml -style nk2_to_txt.xsl -param PersonName='testperson' > data2.txt
and the transform:
<?xml version="1.0"?>
<!--20071009 chauvinr Convert nk2 records exported from .-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="PersonName">unknown</xsl:param>
<xsl:output method="text" encoding="UTF-8"/>
<xsl:template match="/">
<!-- Set the ouput document name for each entry based on the client name and client number. Remove invalid chars with translate and replace functions -->
<!-- <xsl:result-document href="file:///c:/HRPG/{translate(replace(replace(normalize-space(Patient_LName),'%|\\|/',''),'&',' And '),'~!@#$%^*()_+{}|\/?><','')}-{replace(normalize-space(Account,'~!@#$%^*()_+{}|\/?><','')}.xml" format="section-format"-->
<xsl:result-document href="file:///c:/temp/contacts-from-nk2.txt" >
<xsl:for-each select="/*/item">
<xsl:value-of select="position()"/>, <xsl:value-of select="$AttorneyName"/>, <xsl:value-of select="type"/>, <xsl:value-of select="display_name"/>, <xsl:value-of select="email"/>, <xsl:value-of select="autocomplete_value"/>, <xsl:value-of select="index"/><xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:result-document>
</xsl:template>
<!--
<xsl:template match="@xsi:noNamespaceSchemaLocation">
</xsl:template>-->
</xsl:stylesheet>
|
|
|
|