Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSL in Word 2007 bibliography, changing

From: JAdanez@-----.---
To: 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



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent