Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing ISSUE #4 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions lattes2mods.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Mountain View, California, 94041, USA.
LIVROS-PUBLICADOS-OU-ORGANIZADOS|CAPITULOS-DE-LIVROS-PUBLICADOS|TEXTOS-EM-JORNAIS-OU-REVISTAS|
DADOS-GERAIS|FORMACAO-ACADEMICA-TITULACAO">
<xsl:apply-templates />
<!-- <xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@HOME-PAGE-DO-TRABALHO"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@DOI"/> -->
</xsl:template>

<xsl:template match="ORIENTACOES-CONCLUIDAS">
Expand All @@ -55,11 +57,11 @@ Mountain View, California, 94041, USA.
<xsl:template match="TRABALHO-EM-EVENTOS">
<mods:mods ID="publication-{@SEQUENCIA-PRODUCAO}">
<mods:titleInfo>
<mods:title> <xsl:value-of select="DADOS-BASICOS-DO-TRABALHO/@TITULO-DO-TRABALHO" /> </mods:title>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change it? In my CV, the tag DADOS-BASICOS-DO-TRABALHO is the child of TRABALHOS-EM-EVENTOS. The XSD confirms that.

<mods:title> <xsl:value-of select="DADOS-BASICOS-DO-ARTIGO/@TITULO-DO-TRABALHO" /> </mods:title>
</mods:titleInfo>

<mods:originInfo>
<mods:dateIssued> <xsl:value-of select="DADOS-BASICOS-DO-TRABALHO/@ANO-DO-TRABALHO" /> </mods:dateIssued>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same case.

<mods:dateIssued> <xsl:value-of select="DADOS-BASICOS-DO-ARTIGO/@ANO-DO-TRABALHO" /> </mods:dateIssued>
</mods:originInfo>

<xsl:for-each select="AUTORES">
Expand All @@ -80,7 +82,7 @@ Mountain View, California, 94041, USA.
</mods:titleInfo>

<mods:originInfo>
<mods:dateIssued> <xsl:value-of select="DADOS-BASICOS-DO-TRABALHO/@ANO-DO-TRABALHO"/> </mods:dateIssued>
<mods:dateIssued> <xsl:value-of select="DADOS-BASICOS-DO-ARTIGO/@ANO-DO-TRABALHO"/> </mods:dateIssued>
<xsl:if test="string-length(DETALHAMENTO-DO-TRABALHO/@NOME-DA-EDITORA)>0">
<mods:publisher> <xsl:value-of select="DETALHAMENTO-DO-TRABALHO/@NOME-DA-EDITORA" /> </mods:publisher>
</xsl:if>
Expand All @@ -95,9 +97,9 @@ Mountain View, California, 94041, USA.
<xsl:apply-templates select="DETALHAMENTO-DO-TRABALHO/@ISBN"/>
</mods:relatedItem>

<xsl:apply-templates select="DADOS-BASICOS-DO-TRABALHO/@IDIOMA"/>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem

<xsl:apply-templates select="DADOS-BASICOS-DO-TRABALHO/@HOME-PAGE-DO-TRABALHO"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-TRABALHO/@DOI"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@IDIOMA"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@HOME-PAGE-DO-TRABALHO"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@DOI"/>
<!-- <xsl:apply-templates select="AREAS-DO-CONHECIMENTO"/> -->
</mods:mods>
</xsl:template>
Expand Down Expand Up @@ -160,6 +162,8 @@ Mountain View, California, 94041, USA.
<xsl:apply-templates select="DADOS-BASICOS-DO-TEXTO/@IDIOMA"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-TEXTO/@HOME-PAGE-DO-TRABALHO"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-TEXTO/@DOI"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@HOME-PAGE-DO-TRABALHO"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@DOI"/>
<!-- <xsl:apply-templates select="AREAS-DO-CONHECIMENTO"/> -->
</mods:mods>
</xsl:template>
Expand Down Expand Up @@ -218,7 +222,10 @@ Mountain View, California, 94041, USA.
</mods:part>

<mods:identifier type="citekey"> <xsl:text>#P</xsl:text><xsl:value-of select="@SEQUENCIA-PRODUCAO"/> </mods:identifier>
</mods:mods>
<xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@HOME-PAGE-DO-TRABALHO"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-ARTIGO/@DOI"/>

</mods:mods>
</xsl:template>


Expand Down Expand Up @@ -254,6 +261,8 @@ Mountain View, California, 94041, USA.
<mods:genre>book</mods:genre>
<mods:identifier type="citekey"> <xsl:text>#P</xsl:text><xsl:value-of select="@SEQUENCIA-PRODUCAO"/> </mods:identifier>
<xsl:apply-templates select="DETALHAMENTO-DO-LIVRO/@ISBN"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-LIVRO/@HOME-PAGE-DO-TRABALHO"/>
<xsl:apply-templates select="DADOS-BASICOS-DO-LIVRO/@DOI"/>
</mods:mods>
</xsl:template>

Expand Down Expand Up @@ -522,8 +531,6 @@ Mountain View, California, 94041, USA.
</mods:mods>
</xsl:template>



<xsl:template match="@HOME-PAGE|@HOME-PAGE-DO-TRABALHO">
<xsl:if test="normalize-space(.) != ''">
<mods:location>
Expand All @@ -543,7 +550,9 @@ Mountain View, California, 94041, USA.

<xsl:template match="@DOI">
<xsl:if test="normalize-space(.) != ''">
<mods:identifier type="doi"><xsl:value-of select="."/></mods:identifier>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us try to avoid changes that are meaningless

<mods:identifier type="doi">
<xsl:value-of select="."/>
</mods:identifier>
</xsl:if>
</xsl:template>

Expand Down