xsl-list
[Top] [All Lists]

RE: XSL-output for xml without parent node

2004-05-04 17:20:48
Why can't you add a root node?  Your XML has to be compliant to use XSLT.
The XSLT processor does not know how to handle your XML when you break the
rules of valid XML. 

-----Original Message-----
From: Bret [mailto:laker_66(_at_)yahoo(_dot_)com] 
Sent: Tuesday, May 04, 2004 7:59 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] XSL-output for xml without parent node

I'm aware the Input XML Is in invalid format and that
was one of the reason's i was curious if there was
anyother way . 

--- Kenny Akridge <kenny(_at_)akridgefamily(_dot_)com> wrote:
The first problem is that your XML is invalid.  You
need to have one root
node for the entire element.  As soon as you fix
that, you will get 1 2 3 in
your output.

Make your xml look something like this.  You may
want to read some more XSLT
tutorials as well.

<root>
      <RESULT ID="1" NAME="te"/>
      <RESULT ID="2" NAME="tes"/>
      <RESULT ID="3" NAME="tess"/>
</root>

-----Original Message-----
From: Bret [mailto:laker_66(_at_)yahoo(_dot_)com] 
Sent: Tuesday, May 04, 2004 5:04 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] XSL-output for xml without parent
node

Hi!
I have the following xml .
 
 <RESULT ID="1" NAME="te"/>
 <RESULT ID="2" NAME="tes"/>
 <RESULT ID="3" NAME="tess"/>
 
  
I have the following xsl
 
 <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xml:space="preserve">
 <xsl:template match="/">
 <html>
 <body>
 <xsl:for-each select="//RESULT">
 <xsl:value-of select="@ID"/>                                 
 </xsl:for-each>
 </body>
 </html>
 </xsl:template> 
</xsl:stylesheet>

when i use the following xsl i'm not getting any
output . I'm guessing it has to
 do with  <xsl:for-each select="//RESULT"> .
 
I do get output if i have only one record in the XML
file .
 
 Any help appreciated .
 
 Thanks!!!!
 


      
              
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 


--+------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




--+------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




        
                
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--




<Prev in Thread] Current Thread [Next in Thread>