I am a newbie to XSLT, and would appreciate any feedback from this experienced community.
I'm attempting to extract inline citations from my document, put them at the end of the document, deduplicate them, and assign them the proper references.
My document looks something like this:
Expand|Select|Wrap|Line Numbers
- <section>
- <para> This is my content <citation>Joe Smith, 1997 Journal of Medicine.</citation> This is more content <citation>Jane Doe, 2003, Cosmopolitan</citation>
- </para>
- <para> Even more content <citation>Joe Smith, 1997 Journal of Medicine.</citation>
- </para>
- </section>
Expand|Select|Wrap|Line Numbers
- <section>
- <para> This is my content (1) This is more content (2)</para>
- <para> Even more content (1)</para>
- </section>
- <section>
- <title> References </title>
- <listitem>1 - Joe Smith, 1997 Journal of Medicine. </listitem>
- <listitem>2 - Jane Doe, 2003, Cosmopolitan</listitem>
- </section>
Thank you, any help is greatly appreciated.
Expand|Select|Wrap|Line Numbers
- <xsl:template match="/">
- <xsl:copy-of select = "."/>
- <xsl:apply-templates select="//citation">
- <xsl:sort select="."/>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="//citation">
- <xsl:copy-of select = "."/>
- </xsl:template>