Re: Displaying XML document in ASP.NET page using XSL Transform
From: Dan Brussee (dbrussee_at_nc.rr.com)
Date: 04/08/04
- Next message: Todd: "Re: Timer thread stops running"
- Previous message: Barry Anderberg: "Displaying XML document in ASP.NET page using XSL Transform"
- In reply to: Barry Anderberg: "Displaying XML document in ASP.NET page using XSL Transform"
- Next in thread: Chris Barber: "Re: Displaying XML document in ASP.NET page using XSL Transform"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 08 Apr 2004 02:32:20 GMT
The XSL transform document requires exact XML formatting. Your <BR>
will need to change to <BR/>. Other than that, I would think that
would work. As for the space, you need to use the XSL variant of a
space. Somthing like #160; or something like that. (been a while for
xsl for me)
On 7 Apr 2004 19:20:58 -0700, banderbe@yahoo.com (Barry Anderberg)
wrote:
>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!!!
- Next message: Todd: "Re: Timer thread stops running"
- Previous message: Barry Anderberg: "Displaying XML document in ASP.NET page using XSL Transform"
- In reply to: Barry Anderberg: "Displaying XML document in ASP.NET page using XSL Transform"
- Next in thread: Chris Barber: "Re: Displaying XML document in ASP.NET page using XSL Transform"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|