B
Barry Anderberg
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!!!
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!!!