xsl-list
[Top] [All Lists]

Re: [xsl] xsl:for-each in Corresp Tag

2020-02-12 11:15:47
On 12.02.2020 18:06, Byomokesh Sahoo sahoo(_dot_)byomokesh(_at_)gmail(_dot_)com 
wrote:

XML

<corresp><label>Correspondence to</label> Anne Marie Darling,
<institution content-type="department">Department of
Epidemiology</institution>, <institution>Boston
University</institution>, <addr-line content-type="street">715 Albany
Street</addr-line>, <country>USA</country>; <email>amdarlin(_at_)bu(_dot_)edu
<mailto:amdarlin(_at_)bu(_dot_)edu></email></corresp>

<corresp><label>Correspondence to</label> Anne Marie Darling,
<institution content-type="department">Department of
Epidemiology</institution>, <addr-line
content-type="postal-code">02118</addr-line>, <country>USA</country>;
</corresp>

<corresp>Joanne Lawrence, Association of British Neurologists, Ormond
House, 27 Boswell Street, London WC1N 3JZ, UK;
<email>joanne(_dot_)lawrence(_at_)abn(_dot_)org(_dot_)uk
<mailto:joanne(_dot_)lawrence(_at_)abn(_dot_)org(_dot_)uk></email></corresp>

Desired Output

<corresp><x>Correspondence to</x> Anne Marie Darling,
<institution><department>Department of Epidemiology</department>,
<institution-name>Boston University</institution-name></institution>,
<street>715 Albany Street</street>, <country>USA</country>;
<email>amdarlin(_at_)bu(_dot_)edu 
<mailto:amdarlin(_at_)bu(_dot_)edu></email></corresp>

<corresp><x>Correspondence to</x> Anne Marie Darling,
<institution><department>Department of Epidemiology</department>,
<postal-code>02118</postal-code>, <country>USA</country>;
<email>amdarlin(_at_)bu(_dot_)edu 
<mailto:amdarlin(_at_)bu(_dot_)edu></email></corresp>

Is the start tag
   <institution>
not closed at all?


<corresp>Joanne Lawrence, Association of British Neurologists, Ormond
House, 27 Boswell Street, London WC1N 3JZ, UK;
<email>joanne(_dot_)lawrence(_at_)abn(_dot_)org(_dot_)uk
<mailto:joanne(_dot_)lawrence(_at_)abn(_dot_)org(_dot_)uk></email></corresp>


Please explain the transformation rules you want to implement. Posting
two samples of XML together with longish code that doesn't do the job
isn't really a way to tell us what kind of transformation you want to
achieve.
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/1167547
or by email: xsl-list-unsub(_at_)lists(_dot_)mulberrytech(_dot_)com
--~--

<Prev in Thread] Current Thread [Next in Thread>