S
sreten_v
I need to run one line command that will import XML data from the XML
file specified into the form. Everything runs smoothly, InfoPath form
opens, however my data does not show in the form. Does anyone know if
that is possible to do in InfoPath at all?
Here is what I run:
"C:\Program Files\Microsoft Office\OFFICE11\INFOPATH.exe" /aggregate
"C:\Temp\InfoPath3\CAA.xml" "C:\Temp\InfoPath3\InfoPath3Template.xsn"
CAA.xml:
<?xml version="1.0"?>
<NewDataSet>
<Table>
<ACCOUNTNUMBER>1234567890</ACCOUNTNUMBER>
</Table>
</NewDataSet>
I use this XSL file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform"
xmlns:agg="http://schemas.microsoft.com/office/infopath/2003/
aggregation"
xmlns:target="http://schemas.microsoft.com/office/infopath/2003/
aggregation-target"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/
2003-05-29T20:30:47">
<xsl:template match="/">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="/my:ACCOUNTNUMBER">
<my:field1 agg:select="/my:NewDataSet/my:Table/
my:ACCOUNTNUMBER" agg:action="replace">
</my:field1>
</xsl:template>
</xsl:stylesheet>
Thanks,
Sreten
file specified into the form. Everything runs smoothly, InfoPath form
opens, however my data does not show in the form. Does anyone know if
that is possible to do in InfoPath at all?
Here is what I run:
"C:\Program Files\Microsoft Office\OFFICE11\INFOPATH.exe" /aggregate
"C:\Temp\InfoPath3\CAA.xml" "C:\Temp\InfoPath3\InfoPath3Template.xsn"
CAA.xml:
<?xml version="1.0"?>
<NewDataSet>
<Table>
<ACCOUNTNUMBER>1234567890</ACCOUNTNUMBER>
</Table>
</NewDataSet>
I use this XSL file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform"
xmlns:agg="http://schemas.microsoft.com/office/infopath/2003/
aggregation"
xmlns:target="http://schemas.microsoft.com/office/infopath/2003/
aggregation-target"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/
2003-05-29T20:30:47">
<xsl:template match="/">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="/my:ACCOUNTNUMBER">
<my:field1 agg:select="/my:NewDataSet/my:Table/
my:ACCOUNTNUMBER" agg:action="replace">
</my:field1>
</xsl:template>
</xsl:stylesheet>
Thanks,
Sreten