Result Xslt Not As Expected フォローする

0
Avatar
Legacy Poster

Hi

 

I'm using commander to translate a third party xml file to btxml, this works fine when I create a btxml file from my xml file and execute in Bartender. But when I use commander the tranformation is incomplete. My xsl content:

<xsl:transform version="1.0" 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
	xmlns:models="http://schemas.datacontract.org/2004/07/ICS.Rfsmart.Ax2012.Models" 
	xmlns:label="http://schemas.datacontract.org/2004/07/ICS.LabelPrinting"> 

<!-- suppress default template outputting all text -->
<xsl:template match="text()"/>

<!-- main template -->
<xsl:template match="models:WMSPurchaseOrderReceive02Model">
	<XMLScript Version="2.0">
		<Command Name="Job 1">
			<Print>
				<Format>\\share\test.btw</Format>
				<NamedSubString Name="itemNumber"><Value><xsl:value-of select="models:_x003C_ItemNumber_x003E_k__BackingField"/></Value></NamedSubString> 
			</Print>
		</Command>
	</XMLScript>
</xsl:template>
</xsl:transform>

Which results in:

<?xml version="1.0"?>
<XMLScript xmlns:models="http://schemas.datacontract.org/2004/07/ICS.Rfsmart.Ax2012.Models" xmlns:label="http://schemas.datacontract.org/2004/07/ICS.LabelPrinting" Version="2.0">
	<Command Name="Job 1">
		<Print>
			<Format>\\share\test.btw</Format>
			<NamedSubString Name="itemNumber">
				<Value>900110</Value>
			</NamedSubString>
		</Print>
	</Command>
</XMLScript>

Executing this from Bartender gives me the right result, a label with 900110 where it should. However, if I do this from commander it indicates the transformation was correct, but the log does not mention the NamedSubString and the label does not contain the 900110. The log result is this:

Command Handler: testHandler - C:\PROGRA~2\Seagull\BARTEN~1\bartend.exe /XMLScript=<?xml version="1.0"?><XMLScript Version="2.0" xmlns:models="http://schemas.datacontract.org/2004/07/ICS.Rfsmart.Ax2012.Models" xmlns:label="http://schemas.datacontract.org/2004/07/ICS.LabelPrinting"><Command Name="Job 1"><Print><Format>\\share\test.btw</Format></Print></Command></XMLScript>

No mention of the NamedSubstring.

 

Is this normal behaviour, or am I missing something?

 

Thank you for your help

 

Solved:

 

No idea how, but now it works. After adding a command to write the filtered trigger content to a file I could see the NamedSubstring, and the label contained the data.

サインインしてコメントを残してください。