xsl-list
[Top] [All Lists]

Re: [xsl] Grouping based on key result

2009-05-19 00:29:20
Dear All,

Please find my good quality sample input.

<author-group>
        <author>
                <given-name>Bing</given-name>
                <surname>Pan</surname>
                <cross-ref refid="aff1">
                        <sup>a</sup>
                </cross-ref>
                <cross-ref refid="aff2">
                        <sup>b</sup>
                </cross-ref>
                <cross-ref refid="cor1">
                        <sup>&#x204E;</sup>
                </cross-ref>
                
<e-address>panb04(_at_)mails(_dot_)tsinghua(_dot_)edu(_dot_)cn</e-address>
        </author>

        <author>
                <given-name>Anand</given-name>
                <surname>Asundi</surname>
                <cross-ref refid="aff1">
                        <sup>a</sup>
                </cross-ref>
        </author>

        <author>
                <given-name>Huimin</given-name>
                <surname>Xie</surname>
                <cross-ref refid="aff2">
                        <sup>b</sup>
                </cross-ref>
        </author>

        <author>
                <given-name>Jianxin</given-name>
                <surname>Gao</surname>
                <cross-ref refid="aff3">
                        <sup>c</sup>
                </cross-ref>
        </author>

        <affiliation id="aff1">
                <label>a</label>
                <textfn>School of Mechanical and Aerospace Engineering, Nanyang
Technological University, 639798 Singapore, Singapore</textfn>
        </affiliation>
        <affiliation id="aff2">
                <label>b</label>
                <textfn>FML, Department of Engineering Mechanics, Tsinghua
University, Beijing 10084, China</textfn>
        </affiliation>
        <affiliation id="aff3">
                <label>c</label>
                <textfn>The Welding Institute, Great Abington, Cambridge CB21 
6AL, UK</textfn>
        </affiliation>
</author-group>

The existing code is working fine for a single affiliation. If the
author is having multiple affiliations the code is not working as
intended.

Output of the code:
<author>B. Pan</author>, <author>A. Asundi</author> (Singapore)
<author>H. Xie</author> (China)  &amp; <author>J. Gao</author> (UK)

Output required:

<author>B. Pan</author> (Singapore, China), <author>A. Asundi</author>
(Singapore), <author>H. Xie</author> (China) &amp; <author>J.
Gao</author> (UK)


Please help in getting the required output.

Regards,
Ganesh


On Mon, May 18, 2009 at 2:16 PM, Andrew Welch 
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> wrote:
Just trying to be helpful here...

<author><given-name>Anand</given-name><surname>Asundi</surname>
<cross-ref refid="aff1"><sup>a</sup></cross-ref></author>

Please help in getting the required output.

I would normally have a look, but you haven't indented the XML so I
pretty much instantly decide not to bother figuring out what the
problem is...  I would recommend re-posting with good quality sample
input.



--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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