[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Can't get output from xml -> text transformation

Subject: RE: Can't get output from xml -> text transformation
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Wed, 11 Aug 2004 19:21:26 +0100
xml to text transformation
Your XML is not well-formed, the element featuredGame has no closing tag.

So presumably you were running it on a different file than the one you
showed us.

Michael Kay 

> -----Original Message-----
> From: Todd Alexander [mailto:heeznow@xxxxxxx] 
> Sent: 11 August 2004 18:53
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Can't get output from xml -> text transformation
> 
> I have an xsl I'm running through xalan against an xml file, with the
> output going to a csv file. My problem is that I get the output
> expected for the first template rule in the csv file but I canot get
> anything output for the second. I'm getting blank spaces for each
> node I'm expecting to hit for the second rule, so I know I'm getting
> there, but no matter what I put inside the rule (xsl:text , xsl:value-
> of etc) I cannot get any text of any kind.
> 
> The source xml file looks like:
> 
> <?xml version="1.0"?>
> <allGamesDownloadable>
> <featuredGameList title="Featured Downloads">
> <featuredGame featuredHeadline="blah blah blah"
> gameId="gameOne">
> </featuredGameList>
> <gameGroupList>
> <gameGroup title="Action Games">
> <gameItem gameID="gameOne"/>
> <gameItem gameID="gameTwo"/>
> </gameGroup>
> <gameGroup title="Arcade">
> <gameItem gameID="gameThree"/>
> <gameItem gameID="gameFour"/>
> </gameGroup>
> </gameGroupList>
> </allGamesDownloadable>
> 
> The XSL in question is:
> <?xml version="1.0"?>
> <xsl:stylesheet
> version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="text" />
> 
> <xsl:template match="/">
> <xsl:text>
> GAMEID,GAMENAME
> </xsl:text>
> <xsl:apply-templates/>
> </xsl:template>
> 
> <xsl:template match="gameItem">
> <!-- for debugging -->
> <xsl:text>cracker</xsl:text>
> </xsl:template>
> 
> </xsl:stylesheet>
> 
> What I get output is:
> 
> GAMEID,GAMENAME
> 
> {then the expected numner of lines with varying numbers of spaces}
> 
> 
> 
> Thanks,
> Todd Alexander
> heeznow@xxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.