Successful Formatting of Simple Citations & Bibliography Style

J

June

The Microsoft Blog Team has a helpful tutorial if you are determined:

http://blogs.msdn.com/microsoft_office_word/archive/2007/12/14/bibliography-citations-1011.aspx

I used their simple template and with a little tweaking, I changed the
bibliography style to look like (I don't know if the bold/italics tags work
here, but they do in the .xsl file I made):

Author Last, First, <i>Journal Title</i>, (<b>YEAR</b>), <i>Volume
(Issue)</i>, Pages.

The complete code I used for my .xsl file is pasted at the bottom of this
post.

However, there are three things I still can't figure out and hope that
someone knows a simple way to fix them:

(1) I want to have my bibliography numbered as in the ISO690 Numerical style.
(2) I want my citations to refer to these numbers as in the ISO690 Numerical
style.
(3) I want the citations to be superscript numbers alone with no punctuation.

If anyone knows how to fix any of these things (see my code below) I would
be very grateful. I also considered just going into the ISO690Nmerical.xsl
file and trying to alter the formatting, but the code is too complex for me
to figure out without having to learn XSL. I tried copying and pasting a few
lines from this file, but I believe there are too many internal references
for this to work. Please help me if you can! Thank you!

Here is my code from the .xsl file (tweaked from Microsoft blog team's code):

<?xml version="1.0" ?>

<!-- List of the external resources that we are referencing -->

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:b="http://schemas.openxmlformats.org/officeDocument/2006/bibliography">

<!-- When the bibliography or citation is in your document, it's just HTML -->

<xsl:eek:utput method="html" encoding="us-ascii"/>

<!-- match the root element, and dispatch to its children -->

<xsl:template match="/">

<xsl:apply-templates select="*" />

</xsl:template>

<!--set an optional version number for this style-->

<xsl:template match="b:version">

<xsl:text>2008.1.28</xsl:text>

</xsl:template>

<!-- Defines the name of the style in the References dropdown -->

<xsl:template match="b:StyleName">

<xsl:text>Simple Journal Style</xsl:text>

</xsl:template>


<!-- Specifies which fields should appear in the Create Source dialog when
in a collapsed state (The Show All Bibliography Fieldscheckbox is cleared) -->

<xsl:template match="b:GetImportantFields[b:SourceType =
'ArticleInAPeriodical']">

<b:ImportantFields>

<b:ImportantField>

<xsl:text>b:Author/b:Author/b:NameList</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:periodicalTitle</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:Year</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:Volume</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:Issue</xsl:text>

</b:ImportantField>

<b:ImportantField>

<xsl:text>b:pages</xsl:text>

</b:ImportantField>

</b:ImportantFields>

</xsl:template>

<!-- Defines the output format for a simple Book (in the Bibliography) with
important fields defined -->

<xsl:template match="b:Source[b:SourceType = 'ArticleInAPeriodical']">

<!--Label the paragraph as an Office Bibliography paragraph -->

<p>

<xsl:value-of select="b:Author/b:Author/b:NameList/b:person/b:Last"/>

<xsl:text>, </xsl:text>

<xsl:value-of select="b:Author/b:Author/b:NameList/b:person/b:First"/>

<xsl:text>, </xsl:text>

<i>

<xsl:value-of select="b:periodicalTitle"/>

<xsl:text>, </xsl:text>

</i>

<b>

<xsl:value-of select="b:Year"/>

<xsl:text>, </xsl:text>

</b>

<i>

<xsl:value-of select="b:Volume"/>

<xsl:text>, (</xsl:text>

<xsl:value-of select="b:Issue"/>

<xsl:text>), </xsl:text>

</i>

<xsl:value-of select="b:pages"/>

<xsl:text>.</xsl:text>

</p>

</xsl:template>

<!-- Defines the output of the entire Bibliography -->

<xsl:template match="b:Bibliography">

<html xmlns="http://www.w3.org/TR/REC-html40">

<body>

<xsl:apply-templates select ="*">

</xsl:apply-templates>

</body>

</html>

</xsl:template>

<!-- Defines the output of the Citation -->

<xsl:template match="b:Citation/b:Source[b:SourceType =
'ArticleInAPeriodical']">

<html xmlns="http://www.w3.org/TR/REC-html40">

<body>

<!-- Defines the output format as (Author, Year)-->

<sup>

<xsl:value-of select="b:Author/b:Author/b:NameList/b:person/b:Last"/>

<xsl:text>, </xsl:text>

<xsl:value-of select="b:Year"/>

</sup>

</body>

</html>

</xsl:template>

<xsl:template match="text()" />

</xsl:stylesheet>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top