This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: One for tomorrow :-)
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: RE: [xsl] One for tomorrow :-)
- From: "Chris Bayes" <Chris at Bayes dot co dot uk>
- Date: Tue, 3 Jul 2001 18:23:53 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
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@lists.mulberrytech.com
>[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Daniel Newman
>Sent: 03 July 2001 16:48
>To: xsl-list@lists.mulberrytech.com
>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 & WILLIAMSON NOMINEES</NameAddress1>
> <NameAddress2>LIMITED <CH>,</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