Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XSL in Word 2007 bibliography, changing >Thread Next - Re: XSL in Word 2007 bibliography, changing Re: XSL in Word 2007 bibliography, changingTo: NULL Date: 10/4/2007 8:39:00 AM
Hi Mitja,
When generating a bibliography, Word 2007 sends to the XSL style file
a XML tree like this:
<b:Bibliography>
<b:Locals>
<b:DefaultLCID>1033</b:DefaultLCID>
<b:Local LCID="1033">
...
...
</b:Local>
<b:Local LCID="3082">
...
...
</b:Local>
...
...
</b:Locals>
<b:Source>
...
...
</b:Source>
<b:Source>
...
...
</b:Source>
...
...
</b:Bibliography>
The subtree "b:Locals" contains sets of strings for different
languages (LCID) and some of them according to the bibliography style
selected (APA, MLA, etc.). The line <xsl:value-of select="/*/b:Locals/
b:Local[@LCID=$_LCID]/b:Strings/b:RetrievedFromCap"/> reads the value
of the string named "RetrievedFromCap" ("RetrievedFrom" with capital
initial character) in the "b:Locals" subtree for the language returned
by the function "localLCID" and stored in the variable "_LCID" (i.e.:
the language selected for the source or, if blank, the default
language of the document [the value of the tag <b:DefaultLCID>]).
To my mind, there are two solutions to change the caption "Retrieved
%1, from %2" to "Accesible on %2, on %1":
(1) To replace the function "templ_str_RetrievedFromCap" with
something like this:
<xsl:template name="templ_str_RetrievedFromCap">
<xsl:value-of select="'Accesible on %2, on %1'"/>
</xsl:template>
or, checking the _LCID variable, like this:
<xsl:template name="templ_str_RetrievedFromCap">
<xsl:param name="LCID"/>
<xsl:variable name="_LCID">
<xsl:call-template name="localLCID">
<xsl:with-param name="LCID" select="$LCID"/>
</xsl:call-template>
</xsl:variable>
<xsl:choose>
<xsl:when test "$_LCID" = "1033">
<xsl:value-of select="'Accesible on %2, on %1'"/>
</xsl:when>
<xsl:when test "$_LCID" = "3082">
<xsl:value-of select="'Consultado el %2 en %1'"/>
</xsl:when>
</xsl:choose>
</xsl:template>
(2) To build, in a customized XSL file, a customized "b:Locals"
subtree containing the values of your personal bibliography style for
one or several languages. You can see an example of customized XSL
file for Word 2007 (it includes comments, but in Spanish) at
http://www.fermu.com/content/view/541/1/lang,es/
Please, excuse my poor English skill
Chuso
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
