I am just picking up xslt and I was wondering if I could get some
pointers. I have an xml body that looks like this:
Expand|Select|Wrap|Line Numbers
- <location>
- <civic-address>
- <country>US</country>
- <A1>New York</A1>
- <A2>King's County</A2>
- <A3>New York</A3>
- <A4>Manhattan</A4>
- <A5>Morningside Heights</A5>
- <A6>Broadway</A6>
- <PRD>N</PRD>
- <POD>SW</POD>
- <STS>Street</STS>
- <HNO>123</HNO>
- <HNS>A</HNS>
- <LMK>Low Library</LMK>
- <LOC>Room 543</LOC>
- <FLR>5</FLR>
- <NAM>Joe's Barbershop</NAM>
- <PC>10027-0401</PC>
- </civic-address>
- </location>
- <location>
- <civic-address>
- ...
- </civic-address>
- </location>
- <location>
- <civic-address>
- ...
- </civic-address>
- </location>
'street' that has the values of HNO HNS PRD A6 POD STS from one civic-
address. So the output should look like:
Expand|Select|Wrap|Line Numbers
- <location>
- <civic-address>
- <country>US</country>
- <A1>New York</A1>
- <A2>King's County</A2>
- <A3>New York</A3>
- <A4>Manhattan</A4>
- <A5>Morningside Heights</A5>
- <street> 123 A N Broadway SW Street </street>
- <LMK>Low Library</LMK>
- <LOC>Room 543</LOC>
- <FLR>5</FLR>
- <NAM>Joe's Barbershop</NAM>
- <PC>10027-0401</PC>
- </civic-address>
- </location>
- <location>
- <civic-address>
- ...
- </civic-address>
- </location>
- <location>
- <civic-address>
- ...
- </civic-address>
- </location>
ignored. If all of them are missing, then a 'street' element should
not be created.
I am looking for tips on creating an efficient xslt for this.
TIA,
rouble