RE: [xsl] RE: A simple solution (Was: Re: One for tomorrow :-) )

Subject: RE: [xsl] RE: A simple solution (Was: Re: One for tomorrow :-) )
From: "Daniel Newman" <daniel.newman@xxxxxxxxxxx>
Date: Wed, 4 Jul 2001 13:14:47 +0100
I just found a problem with the XML, and checked with the producers of it,
and it turns out what they said to me yesterday, isn't what they're saying
to me today about how they structure their data.

Yesterday they were saying "if  a name is on more than one line, it will
indicate this with a comma", which was the question I asked yesterday, and
many of your answered for me.

However, today they're saying "the address is separated from the name using
the comma". This makes quite a difference. Some sample data attached:

			<Item id="1">
				<PostCode>M60 1AA</PostCode>
				<NameAddress1>SMITH &amp; WILLIAMSON NOMINEES</NameAddress1>
				<NameAddress2>&lt;A/C A164&gt;,</NameAddress2>
				<NameAddress3>12 POINT STREET</NameAddress3>
				<NameAddress4>SPITTAL ESTATE</NameAddress4>
			<Item id="2">
				<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>
			<Item id="9">
				<PostCode>M60 1AA</PostCode>
				<NameAddress1>MR ANTHONY LLOYD BOND-SMITH +</NameAddress1>
				<NameAddress2>M/S PETRONELLA ELIZABETH</NameAddress2>
				<NameAddress4>12 POINT STREET</NameAddress4>
				<NameAddress5>SPITTAL ESTATE</NameAddress5>

So looking at this data, I need to construct the name by starting at
NameAddress1 and continuing until I reach a comma. I think this was answered
yesterday by someone using contains('NameAddress') but I've lost that one!!!

I also then need to still get the first node after this comma (or use
NameAddress2 if no comma?) and display just one node.

Thanks for the re-work, but I'm too pissed off at the mo to sort it out



 XSL-List info and archive:

Current Thread