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 -->
<xslutput 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>beriodicalTitle</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>bages</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/berson/b:Last"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="b:Author/b:Author/b:NameList/berson/b:First"/>
<xsl:text>, </xsl:text>
<i>
<xsl:value-of select="beriodicalTitle"/>
<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="bages"/>
<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/berson/b:Last"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="b:Year"/>
</sup>
</body>
</html>
</xsl:template>
<xsl:template match="text()" />
</xsl:stylesheet>
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 -->
<xslutput 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>beriodicalTitle</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>bages</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/berson/b:Last"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="b:Author/b:Author/b:NameList/berson/b:First"/>
<xsl:text>, </xsl:text>
<i>
<xsl:value-of select="beriodicalTitle"/>
<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="bages"/>
<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/berson/b:Last"/>
<xsl:text>, </xsl:text>
<xsl:value-of select="b:Year"/>
</sup>
</body>
</html>
</xsl:template>
<xsl:template match="text()" />
</xsl:stylesheet>