[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: How do I omit XML declaration in output?
I am on Windows, but the processing pipeline is built with ANT and I use the Java version of Saxon for transformations, so .NET isn't in the picture here. In fact, the computers here run Win2K (a quick search of my registry for the string ".NET" came back empty).
Thanks for your input, though. -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Nassar, Anthony <ANassar@xxxxxxxx> Sent: Fri, 30 Mar 2007 15:06:14 -0400 To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: How do I omit XML declaration in output? The .NET XmlWriter class has an XmlSettings property that includes an OmitXmlDeclaration property. Is that what you're after? It sounds to me like you're in Windows. -----Original Message----- From: cknell@xxxxxxxxxx [mailto:cknell@xxxxxxxxxx] Sent: Friday, March 30, 2007 2:55 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: How do I omit XML declaration in output? I have a process that selects data from a SQL database and combines it using XSLT to produce an Excel file. I now have a wish to move the data from an XML file into the database. At a point in the process, I will continue to use XSLT to produce the final output, so I need to retain the escaped ampersands in the data. I have written a stylesheet to create a flat data file for uploading into the database. When I set the output method attribute to "text", the ampersands are output without the escaping. That is what I expect, but not what I need. When I set the output method attribute to "xml", the ampersands are escaped, this is also what I expect (and what I need). The fly in the ointment is that with the method set to "xml", the xml document declaration is also output on the first line. This too is what I expect, unfortunately, not what I want. Is there a setting that will cause the processor to omit the document declaration, or will I have to remove it in a separate section of the processing pipeline?
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|