This is a numbered style (citation numbers in brackets), with the bibliography ordered by author-date. Please let me know if you have suggestions or problems.
But when I run it through validator.nu the problems it has are from sections copied exactly from other styles in the repository.
When I try to run some of the styles in the repository through validator.nu, they also do not validate and give similar errors. Any idea what is going on?
This works for me: http://img217.imageshack.us/img217/8724/validation.png
(usually I paste in the style code [using "Text Field"] instead of the style URL [using "Address"], but both approaches work here. Obviously you're doing something different)
Also note that CSL 0.8.1 styles don't have the version attribute on the cs:style element (so you shouldn't include use "version="0.8.1"").
Thanks for the image. I guess I also had to strip off the line:
<?xml version="1.0" encoding="UTF-8"?>
That validated against CSL 0.8.1. I've committed the changed file.
The weird thing is that I started with a validated CSL style, and the things that were not validating were things I did not change. When I drop the same styles from the repository into the validator, they do not validate. I assume that it is a version issue there too, but all of them reference CSL 1.0.
Can you upload your style (with the first line) and another style from repository which is listed as version="1.0" to https://gist.github.com/ and post the URLs here? Then we can make sure we're looking at the same thing.
[edit]: As an addition to Dan's remark, see also http://xmlwriter.net/xml_guide/xml_declaration.shtml . So the "version="1.0"" on the line that starts with "<?xml ..." indicates that the style is written in XML 1.0. For CSL 1.0 styles, the line that starts with "<style ..." also includes "version="1.0"", indicating that the style is written in accordance to the CSL 1.0 specification. CSL 0.8.1 styles don't indicate the CSL version in the style.
I got this through validation with the xml line back in this time. For me at least, there is a little confusion in the docs over how these are supposed to look. But I appreciate your helping me get this one right. Note that I started with a valid style that was listed as CSL 1.0 and made changes. None of the changes I made raised an error in the validator, but some of the existing code did.
But when I run it through validator.nu the problems it has are from sections copied exactly from other styles in the repository.
When I try to run some of the styles in the repository through validator.nu, they also do not validate and give similar errors. Any idea what is going on?
---
1. Error: Attribute version not allowed on element style from namespace http://purl.org/net/xbiblio/csl at this point.
From line 1, column 1; to line 2, column 77
<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" version="1.0" class="in-text">
---
The style validates against the CSL 0.8.1 schema when I remove "version="1.0"" from the cs:style element.
IO Error: HTTP resource not retrievable. The HTTP status from the remote server was: 404.
I'm following the instructions on the dev page <http://www.zotero.org/support/dev/creating_citation_styles>
I've tried both servers listed (for version 0.8.1 and version 1.0) and get the same result.
I've also tried removing "version="1.0" from either and both of the statements you list above and replacing it with version="0.8.1"
Am I missing a step here?
(usually I paste in the style code [using "Text Field"] instead of the style URL [using "Address"], but both approaches work here. Obviously you're doing something different)
Also note that CSL 0.8.1 styles don't have the version attribute on the cs:style element (so you shouldn't include use "version="0.8.1"").
<?xml version="1.0" encoding="UTF-8"?>
That validated against CSL 0.8.1. I've committed the changed file.
The weird thing is that I started with a validated CSL style, and the things that were not validating were things I did not change. When I drop the same styles from the repository into the validator, they do not validate. I assume that it is a version issue there too, but all of them reference CSL 1.0.
When I checkout styles from the repository, all are listed as version="1.0"
[edit]: As an addition to Dan's remark, see also http://xmlwriter.net/xml_guide/xml_declaration.shtml . So the "version="1.0"" on the line that starts with "<?xml ..." indicates that the style is written in XML 1.0. For CSL 1.0 styles, the line that starts with "<style ..." also includes "version="1.0"", indicating that the style is written in accordance to the CSL 1.0 specification. CSL 0.8.1 styles don't indicate the CSL version in the style.