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

RE: One for tomorrow :-)

Subject: RE: One for tomorrow :-)
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Tue, 3 Jul 2001 18:23:53 +0100
vbscript regexp.test
Daniel,
Something like this might work

<xsl:template match="Item">
	<xsl:for-each select="*[contains(name(), 'Address')]">
		<xsl:if test="regExp:test(., ',$')">
			<xsl:value-of select="." />
		</xsl:if>
	</xsl:for-each>
</xsl:template>

Ciao Chris

XML/XSL Portal 
http://www.bayes.co.uk/xml


>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Daniel Newman
>Sent: 03 July 2001 16:48
>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>Subject:  One for tomorrow :-)
>
>
>I've got an interesting problem, that I could fix very easily in VBscript,
>but haven't got a clue (I don't think) in XSL.
>
>My XML (I know you've all already got it :), is:
>
><Item id="2">
>	<HIN>G0200328400</HIN>
>	<PostCode>EC2A 1BR</PostCode>
>	<NameAddress1>SMITH &amp; WILLIAMSON NOMINEES</NameAddress1>
>	<NameAddress2>LIMITED &lt;CH&gt;,</NameAddress2>
>	<NameAddress3>10 ACACIA AVENUE</NameAddress3>
>	<NameAddress4>HUTTINGDON HILL</NameAddress4>
>	<NameAddress5>LONDON</NameAddress5>
>	<NameAddress6/>
>	<NameAddress7/>
></Item>
>
>And my problem is, that I want to display NameAddress1, and also need to
>concat all following Nodes that end in a comma. So I need to do a:
>
>Print NameAddress1
>Set CurrentNode = NextNode()
>Do While Right(CurrentNode, 1) = ","
>	Print CurrentNode
>	Set CurrentNode = NextNode()
>Loop
>
>Is something like this possible in XSL?
>
>It's the Loop I can't find a solution to, and also how to tell the XSL to
>stay on the next child.
>
>Cheers,
>
>Daniel.
>
>
>Bis-Web Ltd.
>Tel: 01993 880614
>Fax: 01993 881625
>
>*******************************************************************
>*********
>The information transmitted is intended only for the person or entity to
>which it is addressed and may contain confidential and/or privileged
>material. Any review, retransmission, dissemination or other use of, or
>taking of any action in reliance upon, this information by persons or
>entities other than the intended recipient is prohibited. If you received
>this in error, please contact the sender and delete the
>material from any computer.
>*******************************************************************
>*********
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

 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.