xsl-list
[Top] [All Lists]

Re: [xsl] page range in Reference

2020-01-26 12:10:38
On 26.01.2020 17:52, Byomokesh Sahoo sahoo(_dot_)byomokesh(_at_)gmail(_dot_)com 
wrote:

Below is my input  and required output xml. Need to all dot, columns(:)
in outside elements will be same to go output xml. I am struggling how
to manage page range tag ( <fpage>752</fpage>&#x2013;<lpage>8</lpage>)
in output reference.

<mixed-citation><person-group
person-group-type="author"><string-name><surname>Kie</surname>
<given-names>DW</given-names></string-name>,
<string-name><surname>Doon</surname>
<given-names>E</given-names></string-name>, <etal>et
al.</etal></person-group> <article-title>Gestational how much is
enough</article-title>
<year>2007</year>;<volume>110</volume>:<fpage>752</fpage>&#x2013;<lpage>8</lpage>.</mixed-citation>

Required Output:

<mixed-citation><string-name><surname>Kie</surname>
<given-names>DW</given-names></string-name>,
<string-name><surname>Doon</surname>
<given-names>E</given-names></string-name>, <etal>et al.</etal>
<article-title>Gestational how much is enough</article-title>
<year>2007</year>;<volume>110</volume>:<page-range>752-8</page-range>.</mixed-citation>

Do you know that any mixed-citation element will have those child nodes
  <fpage>...</fpage>&#x2013;<lpage>...</lpage>
?
Should be easy to set up

  <xsl:template match="fpage">
    <page-range>
      <xsl:value-of select="., following-sibling::lpage" separator="-"/>
    </page-range>
  </xsl:template>

and block processing of the lpage with

   <xsl:template match="lpage"/>
--~----------------------------------------------------------------
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>
  • [xsl] page range in Reference, Byomokesh Sahoo sahoo(_dot_)byomokesh(_at_)gmail(_dot_)com
    • Re: [xsl] page range in Reference, Martin Honnen martin(_dot_)honnen(_at_)gmx(_dot_)de <=