Aha!  Serializer is the key.  I didn't notice that class.  I was just using a TextWriterDestination, which obviously requires an XmlWriter.  Thank you so much!  Thank you both Michael and Christophe for the <xsl:output method="text"/> pointer as well.

Now it's time to figure out this xslt beast...

Thanks,
Mark

P.S. Just to make this thread show up in peoples' future search results, here are some of the errors I was getting with various attempts at solving the problem:
    Token Content in state Prolog would result in an invalid XML document.
    Token Text in state Document would result in an invalid XML document.
    WriteStartDocument cannot be called on writers created with ConformanceLevel.Fragment.


On Thu, Feb 23, 2012 at 5:23 AM, Michael Kay <mike@saxonica.com> wrote:
You need to set the output method to "text", either from the stylesheet itself (xsl:output), or from the command line (!method=text), or from the C# API.

If you are using the API, you need to set the XmlDestination argument of the XsltTransformer.Run method to a Serializer.

Without seeing more specifically what you are doing or what errors you are getting, it's hard to know where you are going wrong, but the fact that you mention XmlWriter suggests you are trying to direct the output to software that's designed to output XML rather than text.

Michael Kay
Saxonica


On 23/02/2012 03:51, Mark Rubelmann wrote:
Hi all,

I'm completely new to Saxon and xslt so please forgive me if this has been answered a million times already.  I'm using Saxon in C# and I'm trying to generate some simple plain text output with xslt.  Despite my best efforts, I haven't been able to make it write anything other than well-formed XML.  Putting in raw text without a root node just throws an exception.  I've tried setting the conformance of my XmlWriter to fragment instead of document but that gave me a different error.  I don't have any of my source code in front of me at the moment and I also don't remember the exact errors, but I just wanted to see if anyone has worked through the same issue.  I can send code snippets tomorrow if it's helpful.

Thanks,
Mark


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help