• No se han encontrado resultados

Cambios realizados en los Estados financieros de 2014 a raíz de la auditoría

correspondientes al ejercicio concluido en diciembre de 2014

VI. Cambios realizados en los Estados financieros de 2014 a raíz de la auditoría

This auxiliary file converts the bibliography from the old DTD to the new one.16

1906 <xsl:transform

1907 xmlns:tei="http://www.tei-c.org/ns/1.0"

1908 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 1909 version="1.0">

1910 <xsl:output method=’xml’ doctype-system=’raweb3.dtd’ indent=’no’ 1911 encoding=’iso-8859-1’/>

We simplified the code, by assuming that the id is ‘bibliography’. The transformation of <biblio> is an element of the same name. We consider all <citation> elements.

1912 <xsl:template match="biblio"> 1913 <xsl:element name="biblio"> 1914 <xsl:attribute name="id">bibliography</xsl:attribute> 1915 <xsl:apply-templates select="citation"/> 1916 </xsl:element> 1917 </xsl:template>

Translation of a <citation> element. The result is a <biblStruct>, depending on the type it can have one of two alternatives (on page 185, we have the template that converts the entry to HTML, and a comment that says that we check the validity; nothing is done here, we assume that the first or second if-test is true). The last three <note> elements will be used to sort the entries, or for debug.

1918 <xsl:template match="citation"> 1919 <xsl:element name="biblStruct">

1920 <xsl:attribute name="id"><xsl:value-of select="./@id"/></xsl:attribute> 1921 <xsl:if test="@type=’article’ or @type=’inbook’ or @type=’incollection’ 1922 or @type=’inproceedings’ or @type=’conference’">

1923 <xsl:call-template name="citation.analy"/> 1924 </xsl:if>

1925 <xsl:if test="@type=’book’ or @type=’booklet’ or @type=’proceedings’ or

1926 @type=’phdthesis’ or @type=’techreport’ or @type=’unpublished’ or

1927 @type=’misc’ or @type=’masterthesis’ or @type=’mastersthesis’ or

1928 @type=’manual’"> 1929 <xsl:call-template name="citation.mono"/> 1930 </xsl:if> 1931 <xsl:apply-templates select="bhowpublished"/> 1932 <xsl:element name="note"> 1933 <xsl:attribute name="type">classification</xsl:attribute> 1934 <xsl:value-of select="./@type"/> 1935 </xsl:element> 1936 <xsl:element name="note"> 1937 <xsl:attribute name="type">from</xsl:attribute>

1938 <xsl:value-of select="./@from"/> 1939 </xsl:element> 1940 <xsl:element name="note"> 1941 <xsl:attribute name="type">userid</xsl:attribute> 1942 <xsl:value-of select="./@userid"/> 1943 </xsl:element> 1944 </xsl:element> 1945 </xsl:template>

In order to make this document shorter, we have use the pseudo command “apply-many- templates” that calls apply-templates in order. The next three templates are specific to the TEI.

1946 <xsl:template name="citation.mono"> 1947 <xsl:element name="monogr"> 1948 <xsl:apply-many-templates

1949 "btitle" and "bbooktitle" and "bseries" and "bjournal" and "bauteurs" 1950 and "bediteur" and "bnote" and "btype" and "bedition"/>

1951 <xsl:call-template name="imprint"/> 1952 </xsl:element>

1953 </xsl:template>

This is a bit more complicated, because we have three parts <analytic>, <monogr> and <imprint>.

1954 <xsl:template name="citation.analy"> 1955 <xsl:element name="analytic">

1956 <xsl:apply-many templates "btitle" and "bauteurs"/> 1957 </xsl:element>

1958 <xsl:element name="monogr">

1959 <xsl:apply-many-templates "bediteur" and "bbooktitle" and "bseries" 1960 and "bjournal" and "bnote" and "btype"/>

1961 <xsl:call-template name="imprint"/> 1962 </xsl:element>

1963 </xsl:template>

This is used to indicate how the reference is published.

1964 <xsl:template name="imprint"> 1965 <xsl:element name="imprint">

1966 <xsl:apply-many-templates "bvolume" and "bchapter" and "bnumber"

1967 and "bpublisher" and "bschool" and "borganization" and "binstitution"/> 1968 <xsl:call-template name="bdate"/>

1969 <xsl:apply-many-templates "bpages" and "xref"/> 1970 </xsl:element>

1971 </xsl:template>

Transformation of the <btitle>. The result is a <title> element, whose attribute depends on the type. We have not shown the value of the second test. Using ‘choose’ and ‘otherwise’ would make the code more robust.

1972 <xsl:template match="btitle">

1973 <xsl:if test="../@type=’article’ or ../@type=’inbook’ or

1974 ../@type=’incollection’ or ../@type=’inproceedings’ or ../@type=’conference’"> 1975 <title level="a"> <xsl:apply-templates /> </title>

1976 </xsl:if>

1977 <xsl:if test=" ... ">

1978 <title level="m"> <xsl:apply-templates /> </title> 1979 </xsl:if>

Transformation of <bauteurs>. The result is a <author>, containing the same list of authors. We translate all the <bpers>, and replace <etal> by a person whose first name is ‘ETAL’.

1981 <xsl:template match="bauteurs"> 1982 <xsl:element name="author"> 1983 <xsl:for-each select="bpers|etal"> 1984 <xsl:choose> 1985 <xsl:when test="name()=’etal’"> 1986 <xsl:element name="persName"> 1987 <xsl:element name="foreName"><xsl:text>ETAL</xsl:text></xsl:element> 1988 </xsl:element> 1989 </xsl:when>

1990 <xsl:otherwise> <xsl:call-template name="personne"/> </xsl:otherwise> 1991 </xsl:choose>

1992 </xsl:for-each> 1993 </xsl:element> 1994 </xsl:template>

Transformation of <beditor>. The result is a <editor>. What about Mister Etal?

1995 <xsl:template match="bediteur"> 1996 <xsl:element name="editor"> 1997 <xsl:for-each select="bpers"> 1998 <xsl:call-template name="personne"/> 1999 </xsl:for-each> 2000 </xsl:element> 2001 </xsl:template>

Transformation of <bpers> in <persName>. The attributes nom and prenom are translated into <foreName> and <surname>.17

2002 <xsl:template name="personne"> 2003 <xsl:element name="persName">

2004 <xsl:element name="foreName"> <xsl:value-of select="@prenom"/> </xsl:element> 2005 <xsl:element name="surname"> <xsl:value-of select="@nom"/> </xsl:element> 2006 </xsl:element>

2007 </xsl:template>

We replace <bseries> by <title>.

2008 <xsl:template match="bseries">

2009 <title level="s"> <xsl:value-of select="."/> </title> 2010 </xsl:template>

Ditto for <bjournal>, with a different attribute value.

2011 <xsl:template match="bjournal">

2012 <title level="j"> <xsl:value-of select="."/> </title> 2013 </xsl:template>

Ditto for <booktitle>. In some cases, we add the value of the <baddress>.

2014 <xsl:template match="bbooktitle"> 2015 <title level="m">

2016 <xsl:value-of select="."/>

2017 <xsl:if test="../baddress"> <xsl:text>, </xsl:text><xsl:value-of select="../baddress"/> 2018 </xsl:if>

2019 </title> 2020 </xsl:template>

We replace <bnote> by <note>.

2021 <xsl:template match="bnote">

2022 <note type="bnote"> <xsl:value-of select="."/> </note> 2023 </xsl:template>

Ditto for<btype>, with a different attribute value.

2024 <xsl:template match="btype">

2025 <note type="typdoc"> <xsl:value-of select="."/> </note> 2026 </xsl:template>

Ditto for <bhowpublished>, with a different attribute value.

2027 <xsl:template match="bhowpublished">

2028 <note type="howpublished"> <xsl:value-of select="."/> </note> 2029 </xsl:template>

The transformation of <bschool> is <publisher>, with an <orgName> that contains the name of the school. It can be followed by the value of the <baddress> field of the entry.

2030 <xsl:template match="bschool"> 2031 <xsl:element name="publisher"> 2032 <xsl:element name="orgName"> 2033 <xsl:attribute name="type">school</xsl:attribute> 2034 <xsl:value-of select="."/> 2035 </xsl:element>

2036 <xsl:if test="../baddress"><xsl:apply-templates select="../baddress"/></xsl:if> 2037 </xsl:element>

2038 </xsl:template>

Same idea here. But the implementation is different.

2039 <xsl:template match="borganization"> 2040 <xsl:element name="publisher"> 2041 <xsl:element name="orgName"> 2042 <xsl:attribute name="type">organisation</xsl:attribute> 2043 <xsl:value-of select="."/> 2044 <xsl:if test="../baddress"> 2045 <xsl:element name="address"> 2046 <xsl:apply-templates select="../baddress"/> 2047 </xsl:element> 2048 </xsl:if> 2049 </xsl:element> 2050 </xsl:element> 2051 </xsl:template>

Same idea here.

2052 <xsl:template match="binstitution"> 2053 <xsl:element name="publisher"> 2054 <xsl:element name="orgName"> 2055 <xsl:attribute name="type">institution</xsl:attribute> 2056 <xsl:value-of select="."/> 2057 <xsl:if test="../baddress"> 2058 <xsl:element name="address"> 2059 <xsl:apply-templates select="../baddress"/> 2060 </xsl:element> 2061 </xsl:if> 2062 </xsl:element> 2063 </xsl:element> 2064 </xsl:template> Strange. 2065 <xsl:template match="bedition"> 2066 <xsl:element name="edition">

2067 <xsl:value-of select="./text()"/> 2068 <xsl:copy-of select="./*"/> 2069 </xsl:element>

2070 </xsl:template>

Translation of a date into a <dateStruct>. We take the <bmonth> and <byear> and convert them into <month> and <year>. Nothing is done if both fields are missing.

2071 <xsl:template name="bdate">

2072 <xsl:if test="string-length(bmonth|byear)>0"> 2073 <xsl:element name="dateStruct">

2074 <xsl:if test="string-length(bmonth)>0">

2075 <xsl:element name="month"> <xsl:value-of select="bmonth"/> </xsl:element> 2076 </xsl:if>

2077 <xsl:if test="string-length(byear)>0">

2078 <xsl:element name="year"> <xsl:value-of select="byear"/> </xsl:element> 2079 </xsl:if>

2080 </xsl:element> 2081 </xsl:if> 2082 </xsl:template>

Transformation of <bvolume> into a <biblScope>.

2083 <xsl:template match="bvolume">

2084 <biblScope type="volume"> <xsl:value-of select="."/> </biblScope> 2085 </xsl:template>

Transformation of <bchapter> into a <biblScope> with a different attribute value.

2086 <xsl:template match="bchapter">

2087 <biblScope type="chapter"> <xsl:value-of select="."/> </biblScope> 2088 </xsl:template>

Transformation of <bnumber> into a <biblScope> with a different attribute value.

2089 <xsl:template match="bnumber">

2090 <biblScope type="number"> <xsl:value-of select="."/> </biblScope> 2091 </xsl:template>

Transformation of <bpages> into a <biblScope> with a different attribute value.

2092 <xsl:template match="bpages">

2093 <biblScope type="number"> <xsl:value-of select="."/> </biblScope> 2094 </xsl:template>

Transformation of <bpublisher> into a <publisher> containing a <orgName>, and sometimes the address. 2095 <xsl:template match="bpublisher"> 2096 <xsl:element name="publisher"> 2097 <xsl:element name="orgName"> 2098 <xsl:value-of select="."/> 2099 <xsl:apply-templates select="../baddress"/> 2100 </xsl:element> 2101 </xsl:element> 2102 </xsl:template>

Translation of <baddress> into a <address> containing a <addrLine>.

2103 <xsl:template match="baddress"> 2104 <xsl:if test="not(../bbooktitle)"> 2105 <xsl:element name="address">

2106 <xsl:element name="addrLine"><xsl:value-of select="."/></xsl:element> 2107 </xsl:element>

2108 </xsl:if> 2109 </xsl:template>

Unused.

2110 <xsl:template match="biblio/citation/xref"> 2111 ...

2112 </xsl:template>

This is the end of the file.

2113 </xsl:transform>