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

RE: xsl schould render a vbs-Array

Subject: RE: xsl schould render a vbs-Array
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Mon, 24 May 2004 11:32:21 -0600
vbs array
By changing your for-each select attribute value to "field[@noUpdate =
'true']" the for-each element will only process the field elements that
match this criteria therefore you will not encounter the problem of an
empty value in your array.

Hope this helps!

<M:D/>

> -----Original Message-----
> From: Hans Pickelmann | N|rnberg [mailto:info@xxxxxxxxxxxxxxxx]
> Sent: Monday, May 24, 2004 11:20 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  xsl schould render a vbs-Array
> 
> Hello,
> i want to render xml-nodes to a vbs array.
> but i don't want to have an empty entry at the end of the array.
> my xml looks like:
> 
> <fieldnameArray>
> <field noUpdate="true">
> <fieldname>bei_id</fieldname>
> </field>
> <field noUpdate="false">
> <fieldname>bei_template</fieldname>
> </field>
> <field noUpdate="false">
> <fieldname>bei_text</fieldname>
> </field>
> </fieldnameArray>
> 
> and here my xsl
> <xsl:apply-templates select="fieldnameArray" />
> 
> 
> <xsl:template match="fieldnameArray">
> no_update_fields=Array("<xsl:for-each select="field" ><xsl:if
> test="@noUpdate = 'true'"><xsl:apply-templates select="./fieldname"
> /><xsl:if test="position()!=last()">", "</xsl:if></xsl:if></xsl:for-
> each>")
> </xsl:template>
> 
> if the last noUpdate-attribute is false there will always be an empty
> entry in my vbs-array
> 
> Any help would be greatly appreciated.
> greetinx Hans
> 
> ___________________________________
> Hans Pickelmann
> PULSAR interactive media GmbH
> Online Development
> 
> Forsterstra_e 100    Durchwahl: +49 (0)911 / 416 000 73
> 90441 N|rnberg       Fax:       +49 (0)911 / 416 000 75
> Germany              Mobil:     +49 (0)170 / 903 42  43
>                      E-Mail:    mailto:hp@xxxxxx
>                      Internet:  http://pim.de

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.