Thread: Citation style
View Single Post
  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Yves Dhondt Yves Dhondt is offline
external usenet poster
 
Posts: 767
Default Citation style

Your approach should work, but you must make sure that you replace all
values '6' to '3'. Note that you can't do a global find/replace as this
would influence some template names which contains the value '6' in their
name.

At first glance, without doing any extensive testing, the following works:

xsl:variable name="author0"
xsl:choose
xsl:when
test="string-length(msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:Source/b:Author/b:Main/b:Corporate)
0"

xsl:value-of
select="msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:Source/b:Author/b:Main/b:Corporate"
/
/xsl:when
xsltherwise
xsl:variable name="cAuthors"
xsl:value-of
select="count(msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:Source/b:Author/b:Main/b:NameList/b:Person)"
/
/xsl:variable
xsl:for-each
select="msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:Source/b:Author/b:Main/b:NameList/b:Person"

xsl:choose
xsl:when test="position() 3 or (position() 1 and $cAuthors
3)"
/xsl:when
xsl:when test="position() = 1"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:choose
xsl:when
test="msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:NonUniqueLastName"
xsl:call-template
name="templ_prop_APA_CitationLong_FML"/
/xsl:when
xsltherwise
xsl:call-template
name="templ_prop_APA_CitationShort_FML"/
/xsltherwise
/xsl:choose
/xsl:with-param
xsl:with-param name="FM"
xsl:choose
xsl:when
test="msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:NonUniqueLastName"
xsl:call-template
name="templ_prop_APA_CitationLong_FM"/
/xsl:when
xsltherwise
xsl:call-template
name="templ_prop_APA_CitationShort_FM"/
/xsltherwise
/xsl:choose
/xsl:with-param
xsl:with-param name="ML"
xsl:choose
xsl:when
test="msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:NonUniqueLastName"
xsl:call-template
name="templ_prop_APA_CitationLong_ML"/
/xsl:when
xsltherwise
xsl:call-template
name="templ_prop_APA_CitationShort_ML"/
/xsltherwise
/xsl:choose
/xsl:with-param
xsl:with-param name="FL"
xsl:choose
xsl:when
test="msxsl:node-set($ListPopulatedWithMain)/b:Citation/b:NonUniqueLastName"
xsl:call-template
name="templ_prop_APA_CitationLong_FL"/
/xsl:when
xsltherwise
xsl:call-template
name="templ_prop_APA_CitationShort_FL"/
/xsltherwise
/xsl:choose
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"no/xsl:with-param
/xsl:call-template
/xsl:when
xsl:when test="position() 1"
xsl:call-template name="formatNameCore"
xsl:with-param name="FML"
xsl:call-template name="templ_prop_APA_CitationShort_FML"/
/xsl:with-param
xsl:with-param name="FM"
xsl:call-template name="templ_prop_APA_CitationShort_FM"/
/xsl:with-param
xsl:with-param name="ML"
xsl:call-template name="templ_prop_APA_CitationShort_ML"/
/xsl:with-param
xsl:with-param name="FL"
xsl:call-template name="templ_prop_APA_CitationShort_FL"/
/xsl:with-param
xsl:with-param name="upperLast"no/xsl:with-param
xsl:with-param name="withDot"no/xsl:with-param
/xsl:call-template
/xsl:when
/xsl:choose

xsl:choose
xsl:when test="(position() = 1 and $cAuthors 3)"
!--xsl:call-template name="templ_prop_ListSeparator"/--
xsl:text /xsl:text
xsl:call-template name="templ_str_AndOthersUnCap"/
/xsl:when
xsl:when test="position() 1 and $cAuthors 3"
/xsl:when
xsl:when test="($cAuthors - 1 = position() and ($cAuthors = 2))"
xsl:call-template name="templ_prop_Space"/
xsl:call-template name="templ_prop_APA_BeforeLastAuthor"/
xsl:call-template name="templ_prop_Space"/
/xsl:when
xsl:when test="($cAuthors - 1 = position() and ($cAuthors 2))"
xsl:call-template name="templ_prop_AuthorsSeparator"/

xsl:variable name="noAndBeforeLastAuthor"
xsl:call-template name="templ_prop_NoAndBeforeLastAuthor"/
/xsl:variable
xsl:if test="$noAndBeforeLastAuthor != 'yes'"
xsl:call-template name="templ_prop_APA_BeforeLastAuthor"/
xsl:call-template name="templ_prop_Space"/
/xsl:if
/xsl:when
xsl:when test="$cAuthors position() and 3 position() "
xsl:call-template name="templ_prop_AuthorsSeparator"/
/xsl:when
/xsl:choose

/xsl:for-each
/xsltherwise
/xsl:choose
/xsl:variable

Yves
--
BibWord : Microsoft Word Citation and Bibliography styles
http://bibword.codeplex.com


"Susan Koziel" wrote in message
...
I have another question on the same topic.
Is there any way to alter the code to give me
xsl:when test="(position() = 1 and $cAuthors 3)"
rather then the current APA setting of six:
xsl:when test="(position() = 1 and $cAuthors 6)"


Again I've had a reviewer request that I use et al anytime more then three
authors are listed.

I tried just altering the $cAuthors 3
that gives me
(first authors et al second author third author....sixth author)
not exactly what I need.... but closer
Thanks.
-Sue