[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: RE: A simple solution (Was: Re: One for tomorrow :
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: <Items> <Item id="1"> <HIN>C0072995945</HIN> <PostCode>M60 1AA</PostCode> <NameAddress1>SMITH & WILLIAMSON NOMINEES</NameAddress1> <NameAddress2><A/C A164>,</NameAddress2> <NameAddress3>12 POINT STREET</NameAddress3> <NameAddress4>SPITTAL ESTATE</NameAddress4> <NameAddress5>SANDLODGE</NameAddress5> <NameAddress6>MANCHESTER</NameAddress6> <NameAddress7/> </Item> <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> <Item id="9"> <HIN>C0072990838</HIN> <PostCode>M60 1AA</PostCode> <NameAddress1>MR ANTHONY LLOYD BOND-SMITH +</NameAddress1> <NameAddress2>M/S PETRONELLA ELIZABETH</NameAddress2> <NameAddress3>BOND-SMITH,</NameAddress3> <NameAddress4>12 POINT STREET</NameAddress4> <NameAddress5>SPITTAL ESTATE</NameAddress5> <NameAddress6>SANDLODGE</NameAddress6> <NameAddress7>MANCHESTER</NameAddress7> </Item> </Items> 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 [expletive deleted] off at the mo to sort it out myself!!!! Cheers, Daniel. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|