Re: Displaying XML document in ASP.NET page using XSL Transform

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Dan Brussee (dbrussee_at_nc.rr.com)
Date: 04/08/04


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!!!



Relevant Pages

  • Re: [PHP] Re: About XSLT/XML Pagination
    ... approach for the xsl files. ... imagining take some simple xml data, but imagine it has a DTD or XMLSchema ... database to create 1 or more xml files. ...
    (php.general)
  • Re: [PHP] Re: About XSLT/XML Pagination
    ... On 7/22/07, Tony Marston wrote: ... > approach for the xsl files. ... > ive also been building the xml data in memory, ...
    (php.general)
  • Re: [PHP] Re: About XSLT/XML Pagination
    ... approach for the xsl files. ... imagining take some simple xml data, but imagine it has a DTD or XMLSchema ... > database to create 1 or more xml files. ...
    (php.general)
  • Re: onclick - reassign new function with parameters after displaye
    ... It creates an HTML document which looks and acts correctly. ... The orginal XSL is creating a record that shows data from two different ... The form reads in those global variables. ... XML Node that forms the context of your little XSL. ...
    (microsoft.public.scripting.jscript)
  • Re: onclick - reassign new function with parameters after displaye
    ... As far as XML data, it is not on the client side, and my limted ... as global parameter the info I need to get correct record from HTML, ... needed into XSL proscessing. ... The form reads in those global variables. ...
    (microsoft.public.scripting.jscript)