HighTechTalks DotNet Forums  

Displaying XML document in ASP.NET page using XSL Transform

Dotnet XML microsoft.public.dotnet.xml


Discuss Displaying XML document in ASP.NET page using XSL Transform in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Displaying XML document in ASP.NET page using XSL Transform - 04-07-2004 , 10:20 PM






I have an XML document that I am trying to display in my ASP.NET page.

I am using an XSL Transform to display repeating XML data in a
specific format.

It reads the data, and displays it on my page, but there's a problem.

It runs all the data together on one line.

The XSL file is as follows:

-- begin xml ---

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/guestbook">
<xsl:apply-templates select="guestbook" />
<xsl:value-of select="name" />
<xsl:apply-templates select="guestbook" />
<xsl:value-of select="comment" />
</xsl:template>
</xsl:stylesheet>

-- end xml ---

I've tried putting <BR> in between the name and comment in the XSL
file and ASP.NET strips it out. I view the source in my browser and
for some reason ASP.NET just sends all the XML data as one string on
one line. I can't even figure out how to put spaces between the two
items.

I'd like to see:

Joe Blow

Hello, My Name is Joe.



Instead, what I get is:

Joe BlowHello, My Name is Joe.



Please help!!!

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.