[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

preserveWhiteSpace true not working

Subject: preserveWhiteSpace true not working
From: Peter Tsantes <PTsantes@xxxxxxxxxxxxxx>
Date: Thu, 12 Apr 2001 14:41:56 -0400
preservewhitespace

> I am using MSXML3 running in replace mode on NT.
> I'm doing a server side parse of XML and XSLT in VB as such(viewing in
> IE5.5):
> 
> <%
> xmlDir	= "/ContentMng/" 
> 	sXml 	= xmlDir & "test.xml"
> 
> 	if Instr(Request("HTTP_USER_AGENT"),"MSIE")>0 then
> 		sXsl 	= xmlDir & "test.xsl"
> 	end if
> 
> 	Set oXmlDoc = Server.CreateObject("Msxml2.FreeThreadedDOMDocument")
> 	
> 	Set oXslDoc = Server.CreateObject("Msxml2.FreeThreadedDOMDocument")
> 	
> 	oXmlDoc.async = false
> 	oXmlDoc.preserveWhiteSpace=true
> 	oXslDoc.async = false
> 	oXslDoc.preserveWhiteSpace=true
> 	oXmlDoc.load(Server.MapPath(sXml))
> 	oXslDoc.load(Server.MapPath(sXsl))
> 	
> 	' Error Checking
>  If oXmlDoc.parseError.errorCode <> 0 Then
> 	response.write ("Error: " + doc.parserError.reason)
>  End If
>   Response.Write  oXmlDoc.transformNode(oXslDoc)
> %>
> 
> 
> My xml contains white space and line breaks like this:
> 
> <?xml version="1.0"?>
> <Careers_List xml:space="preserve" >
> 	<joblisting>
> 		<id>1</id>
> 		<jobTitle>Java Developer</jobTitle>
> 		<Description>We are seeking 
> 		ng an experienced Java               Developer to take
> charge of Interface  
> 		Development
> 		</Description>
> 	</joblisting>
> </Careers_List>
> 
> The problem is my Description element text still outputs like this:
> "We are seeking an experienced Java Developer to take charge of Interface
> Development"
> 
> No white space or line breal preservation. Why is this happening?
> 
> Peter S. Tsantes
> Developer
> Tradescape.com
> ptsantes@xxxxxxxxxxxxxx

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.