That's great thanks - can you/anyone help with my document - I can't work
out where to put the exsl:document tag? Ive tried a few optios:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ns0="http://tempuri.org/PrintQueueTenancyLetterForm5DS.xsd"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags">
<xsl:output method="xml" encoding="UTF-8" standalone="yes" />
<xsl:template match="/">
<xsl:processing-instruction name="mso-application">
<xsl:text>progid="Word.Document"</xsl:text>
</xsl:processing-instruction>
<w:wordDocument
xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:w10="urn:schemas-microsoft-com:office:word"
xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
xmlns:ns0="http://tempuri.org/PrintQueueTenancyLetterForm5DS.xsd"
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" w:macrosPresent="no"
w:embeddedObjPresent="yes" w:ocxPresent="no" xml:space="preserve">
<o:SmartTagType
o:namespaceuri="urn:schemas-microsoft-com:office:smarttags" o:name="City" />
<o:SmartTagType
o:namespaceuri="urn:schemas-microsoft-com:office:smarttags" o:name="Street"
/>
<o:SmartTagType
o:namespaceuri="urn:schemas-microsoft-com:office:smarttags" o:name="address"
/>
<o:SmartTagType
o:namespaceuri="urn:schemas-microsoft-com:office:smarttags"
o:name="country-region" />
<o:SmartTagType
o:namespaceuri="urn:schemas-microsoft-com:office:smarttags" o:name="place"
/>
<o:DocumentProperties>
<o:Title>Form4B</o:Title>
<o:Author>Bowe</o:Author>
<o:LastAuthor>Jim Ryder</o:LastAuthor>
<o:Revision>2</o:Revision>
<o:TotalTime>1</o:TotalTime>
<o:LastPrinted>2003-02-13T16:16:00Z</o:LastPrinted>
<o:Created>2006-01-05T15:51:00Z</o:Created>
<o:LastSaved>2006-01-05T15:51:00Z</o:LastSaved>
<o:Pages>2</o:Pages>
<o:Words>340</o:Words>
<o:Characters>1944</o:Characters>
<o:Company>NCHA</o:Company>
<o:Lines>16</o:Lines>
<o:Paragraphs>4</o:Paragraphs>
<o:CharactersWithSpaces>2280</o:CharactersWithSpaces>
<o:Version>8.5425</o:Version>
</o:DocumentProperties>
<w:fonts>
<w:defaultFonts w:ascii="Times New Roman" w:fareast="Times New
Roman" w:h-ansi="Times New Roman" w:cs="Times New Roman" />
</w:fonts>
<w:lists>
<w:listDef w:listDefId="0">
<w:lsid w:val="00C65B6C" />
<w:plt w:val="Multilevel" />
<w:tmpl w:val="00000000" />
<w:lvl w:ilvl="0">
<w:start w:val="1" />
<w:lvlText w:val="%1." />
<w:legacy w:legacy="on" w:legacySpace="0" w:legacyIndent="720"
/>
"Naraendira Kuma R.R." <na****@nospam.com> wrote in message
news:us*************@TK2MSFTNGP12.phx.gbl...
Looks like you need your XSLT to be able to create multiple output
documents.
You could do that with the exsl:document tag.
http://www.exslt.org/exsl/index.html
http://msdn.microsoft.com/library/de...ml06162003.asp
Cheers,
-Naraendira Kumar R.R.
~~~~~~~~~~~~~~~
<ji******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com... Hi,
The following snippet:
(ds is a populated dataset)
string sXSLT = @"C:\XML\template\template.xsl";
string sTemp = @"C:\XML\temp\temp.xml";
string sOutput = @"C:\XML\output\output.xml";
ds.WriteXml(sTemp);
XslTransform xslt = new XslTransform();
xslt.Load(sXSLT);
xslt.Transform(sTemp, sOutput, new XmlUrlResolver());
creates an XML word document which, when opened, loads fine - in other
words It is generating my word document OK.
However, assuming the dataset contains more than one row, then only
one word document is created, with the body of the document repeated
over and over - rather than one document per dataset row.
Is there any way to create a document per dataset row (other that
ensuring the dataset only contains one row!)??
Thanks in advance.