ABNT 6023/2002 - brazilian citation style
Hi,
The CSL for brazilian citation style (ABNT 6023/2002) is shared in
http://rapidshare.com/files/147568341/abnt6023b.csl.html
Contributions are well come.
Thanks
Pedro Andretta
The CSL for brazilian citation style (ABNT 6023/2002) is shared in
http://rapidshare.com/files/147568341/abnt6023b.csl.html
Contributions are well come.
Thanks
Pedro Andretta
Pedro Brasil
THIS STYLE IS NOT VALID!
Problem 1: it's not a valid unicode file, so parsers break entirely because of two incorrect characters.
Problem 2: many, many, many dumb errors. I know this is a consequence of some dumb problems in the style creation application, but ...
People: you cannot distribute files that are not valid, and you should not post them if you haven't even bothered to validate them!
And we need to get the CSL editor fixed so that it doesn't keep doing this. One trivial change—checking to see if there is a formatting value specified before printing an attribute—would fix a lot of these problems.
So I wrote a little XSLT that fixes this problem ,and another one (a typo):
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:cs="http://purl.org/net/xbiblio/csl"
xmlns=""
version="1.0">
<xsl:output method="xml" indent="yes" encoding="utf-8"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="cs:option">
<xsl:choose>
<xsl:when test="@name='disambiguate-add-givename'">
<option name="disambiguate-add-givenname" value="(@value)"/>
</xsl:when>
<xsl:otherwise>
<option name="(@name)" value="(@value)"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="@text-case|@prefix|@suffix|@form[not(text())]"/>
</xsl:stylesheet>
But, alas, it doesn't fix all of them (see below), and I don't have the time to fix them all. I'd rather this be fixed at the source of the problem.
I'd also like, BTW, that Zotero reject invalid styles.
$ rnv ~/xbiblio/csl/schema/trunk/csl.rnc cleaned.csl
cleaned.csl
cleaned.csl:44:0: error: attribute ^variable with invalid value "editor"
cleaned.csl:47:0: error: attribute ^variable with invalid value "editor"
cleaned.csl:50:0: error: attribute ^variable with invalid value "editor"
cleaned.csl:57:0: error: attribute ^variable with invalid value "translator"
cleaned.csl:60:0: error: attribute ^variable with invalid value "translator"
cleaned.csl:63:0: error: attribute ^variable with invalid value "translator"
cleaned.csl:96:0: error: attribute ^variable with invalid value "number-of-volume"
cleaned.csl:99:0: error: attribute ^variable with invalid value "number-of-volume"
cleaned.csl:102:0: error: attribute ^variable with invalid value "number-of-volume"
cleaned.csl:220:0: error: text not allowed
required:
after
allowed:
element http://purl.org/net/xbiblio/csl^label
element http://purl.org/net/xbiblio/csl^substitute
cleaned.csl:251:0: error: element ^option not allowed
required:
element http://purl.org/net/xbiblio/csl^layout
allowed:
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^sort
cleaned.csl:252:0: error: element ^option not allowed
required:
element http://purl.org/net/xbiblio/csl^layout
allowed:
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^sort
cleaned.csl:253:0: error: element ^option not allowed
required:
element http://purl.org/net/xbiblio/csl^layout
allowed:
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^sort
cleaned.csl:254:0: error: element ^option not allowed
required:
element http://purl.org/net/xbiblio/csl^layout
allowed:
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^sort
cleaned.csl:265:0: error: element ^option not allowed
required:
element http://purl.org/net/xbiblio/csl^layout
allowed:
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^sort
cleaned.csl:266:0: error: element ^option not allowed
required:
element http://purl.org/net/xbiblio/csl^layout
allowed:
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^option
element http://purl.org/net/xbiblio/csl^sort
cleaned.csl:292:0: error: unfinished content of element http://purl.org/net/xbiblio/csl^else
required:
element http://purl.org/net/xbiblio/csl^names
element http://purl.org/net/xbiblio/csl^date
element http://purl.org/net/xbiblio/csl^label
element http://purl.org/net/xbiblio/csl^text
element http://purl.org/net/xbiblio/csl^number
element http://purl.org/net/xbiblio/csl^choose
element http://purl.org/net/xbiblio/csl^group
error: some documents are invalid