RE: [xsl] One for tomorrow :-)

Subject: RE: [xsl] One for tomorrow :-)
From: "Chris Bayes" <Chris@xxxxxxxxxxx>
Date: Tue, 3 Jul 2001 18:23:53 +0100
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="." />

Ciao Chris

XML/XSL Portal

>-----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: [xsl] 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/>
>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()
>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.
>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:

 XSL-List info and archive:

Current Thread