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

Array XSL PROb

Subject: Array XSL PROb
From: P Vikram <vikram_good_boy@xxxxxxxxx>
Date: Fri, 14 Sep 2001 17:50:29 -0700 (PDT)
array xsl
Hi

Iam using javax.xml.Transform for transformation.My
XML is like
<testnode><top><NAME>myname</NAME><top></testnode>.

My XSL is like below: 

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text" />
<xsl:template match="testnode">
	myarray = [
	<xsl:apply-templates select="//top"/>
	]
</xsl:template>

<xsl:template match="top">
	"<xsl:value-of select="NAME"/>",
</xsl:template>
</xsl:stylesheet>

Now in the array myarray two rows are getting
populated.one myname and second undefined.

How to make only the array gets populated with myname.

Using xsl:if gives an error: 
"testnode" attribute is not allowed on the xsl:if
element!


Thanks

Vikram
--- David Carlisle <davidc@xxxxxxxxx> wrote:
> 
> > is giving and error...any ideas
> it's hard to say if you don't tell us what the error
> was but
> I'll note that if you are using a system that
> produces messages like the
> one you quoted:
> 
> > "test" attribute is not allowed on the xsl:if
> > element!
> 
> then it isn't an XSLT system so sending correct XSLT
> might not work.
> 
> Other than that I'll note that you said:
> 
> > <id> & <name> .
> 
> but your code had
> 
> > 	"<xsl:value-of select="ID"/>""<xsl:value-of
> > select="NAME"/>",
> 
> ID does not mach <id> XML is case sensitive. However
> that should not
> produce an error it should just produce nothing.
> 
> David
> 
>
_____________________________________________________________________
> This message has been checked for all known viruses
> by Star Internet
> delivered through the MessageLabs Virus Scanning
> Service. For further
> information visit http://www.star.net.uk/stats.asp
> or alternatively call
> Star Internet for details on the Virus Scanning
> Service.
> 
>  XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> 


__________________________________________________
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.