Convert from 0.8 to 1.0 CSL
Hi, I used the instructions to convert with this online converter: http://www.shell-tools.net/index.php?op=xslt and it does not seem to be working. Few mistakes happen and mess the whole process, anyone may help please? =)
Here is a link to my script:
https://gist.github.com/909948
Here are the mistakes:
/var/tmp/FOOR8MJmB:5: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xE9 0x66 0xE9 0x72
<title>Manuel canadien de la référence juridique 7e éd. CSL0.8 (Note et bibl
^
/var/tmp/FOOR8MJmB:556: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:556: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:556: parser error : Couldn't find end of Start Tag text line 556
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:556: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:568: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:568: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:568: parser error : Couldn't find end of Start Tag text line 568
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:568: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:591: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:591: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:591: parser error : Couldn't find end of Start Tag text line 591
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:591: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:614: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:614: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:614: parser error : Couldn't find end of Start Tag text line 614
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:614: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:630: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:630: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:630: parser error : Couldn't find end of Start Tag text line 630
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:630: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:646: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:646: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:646: parser error : Couldn't find end of Start Tag text line 646
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:646: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:700: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=" <" suffix=">" />
^
/var/tmp/FOOR8MJmB:700: parser error : attributes construct error
<text variable="URL" prefix=" <" suffix=">" />
^
/var/tmp/FOOR8MJmB:700: parser error : Couldn't find end of Start Tag text line 700
<text variable="URL" prefix=" <" suffix=">" />
^
/var/tmp/FOOR8MJmB:700: parser error : StartTag: invalid element name
<text variable="URL" prefix=" <" suffix=">" />
^
/var/tmp/FOOR8MJmB:735: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:735: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:735: parser error : Couldn't find end of Start Tag text line 735
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:735: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
unable to parse /var/tmp/FOOR8MJmB
Thanks!
Here is a link to my script:
https://gist.github.com/909948
Here are the mistakes:
/var/tmp/FOOR8MJmB:5: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xE9 0x66 0xE9 0x72
<title>Manuel canadien de la référence juridique 7e éd. CSL0.8 (Note et bibl
^
/var/tmp/FOOR8MJmB:556: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:556: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:556: parser error : Couldn't find end of Start Tag text line 556
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:556: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:568: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:568: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:568: parser error : Couldn't find end of Start Tag text line 568
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:568: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:591: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:591: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:591: parser error : Couldn't find end of Start Tag text line 591
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:591: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:614: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:614: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:614: parser error : Couldn't find end of Start Tag text line 614
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:614: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:630: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:630: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:630: parser error : Couldn't find end of Start Tag text line 630
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:630: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:646: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:646: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:646: parser error : Couldn't find end of Start Tag text line 646
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:646: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:700: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=" <" suffix=">" />
^
/var/tmp/FOOR8MJmB:700: parser error : attributes construct error
<text variable="URL" prefix=" <" suffix=">" />
^
/var/tmp/FOOR8MJmB:700: parser error : Couldn't find end of Start Tag text line 700
<text variable="URL" prefix=" <" suffix=">" />
^
/var/tmp/FOOR8MJmB:700: parser error : StartTag: invalid element name
<text variable="URL" prefix=" <" suffix=">" />
^
/var/tmp/FOOR8MJmB:735: parser error : Unescaped '<' not allowed in attributes values
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:735: parser error : attributes construct error
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:735: parser error : Couldn't find end of Start Tag text line 735
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
/var/tmp/FOOR8MJmB:735: parser error : StartTag: invalid element name
<text variable="URL" prefix=", en ligne : <" suffix=">"/>
^
unable to parse /var/tmp/FOOR8MJmB
Thanks!
you need to replace all cases of < and > with
& lt ; and & gt ; (without the spaces).
That done, there is a problem left with the accented e - there the shell tool is just being picky, but that, too, you'll have to convert to unicode. Here's a list
http://tlt.its.psu.edu/suggestions/international/bylanguage/french.html
for the é you'll want to use either & 233# ; or & eacute ; (again without the spaces)
I could not figure why it would not accept < and > as I don't have real programming knowledge, even if it may seems very basic for many of you. =D
I'll test and come back if something else is wrong. Consider it done. Thanks!
Characters like "<" and ">" are considered part of the core XML syntax, so you can't use them directly in strings like suffix=">".
Now, I do still have those problems... I tried with the numeric code or alphabetic code and none of them seems to be recognize by the online converter.
/var/tmp/FOORvLIcE:5: parser error : Entity 'eacute' not defined
<title>Manuel canadien de la r& eacute ;f&233#;rence juridique 7e éd. C
^
/var/tmp/FOORvLIcE:5: parser error : xmlParseEntityRef: no name
<title>Manuel canadien de la r& eacute ;f&233#;rence juridique 7e éd. C
^
/var/tmp/FOORvLIcE:5: parser error : Entity 'eacute' not defined
<title>Manuel canadien de la r& eacute ;f&233#;rence juridique 7e éd. C
^
/var/tmp/FOORvLIcE:27: parser error : Entity 'agrave' not defined
<single>& agrave ; la p </single>
^
/var/tmp/FOORvLIcE:307: parser error : Input is not proper UTF-8, indicate encoding !
Bytes: 0xAB 0x26 0x23 0x78
<text variable="title" form="short" prefix="« " suffix=" »"
^
/var/tmp/FOORvLIcE:485: parser error : Entity 'eacute' not defined
<text value="[non publiée]" />
^
/var/tmp/FOORvLIcE:496: parser error : Entity 'eacute' not defined
<text value="[non publiée]" />
^
unable to parse /var/tmp/FOORvLIcE
Edit:
Okay, so I realize we have to put the "#" before the serial number and not after.
Now again, all "«" and "»" are also not recognize, so I guess I'll have to convert them all.
-_-
I'll come back here for the result once it's done.
He cannot work with: & eacute ; (Without spaces)
He morph the wrong codes, r & # 233 ;f & # 233 ;rence
For instance, é is suppose to be 233, but then it produces something else on the output.
So "référence" becomes "référence"
All insecable spaces also converted to this Â.
Edit: the code for insecable spaces is: & # x0A0 ;
The code for  is: & Acirc ; or with & # 194 ;
(Without spaces)
So why does it generate something completely different?
Any solutions?
1.
Error: Bad value issue for attribute variable on element label from namespace http://purl.org/net/xbiblio/csl.
From line 584, column 10; to line 584, column 82
↩ <label variable="issue" form="short" prefix=" " suffix="" plural="true"/>↩
2.
Error: Bad value issue for attribute variable on element label from namespace http://purl.org/net/xbiblio/csl.
From line 607, column 10; to line 607, column 82
↩ <label variable="issue" form="short" prefix=" " suffix="" plural="true"/>↩
Here is the new gist: https://gist.github.com/910514
Thanks a lot! =)
I think that replacing both lines with
<text term="issue" form="short" prefix=" " plural="true"/>
might do it, but you'd have to check that.
Now: The document validates according to the specified schema(s).
So what's next?
^_^
<option name="subsequent-author-substitute" value="———"/>
Changing those dashes to regular hyphens did the trick. Your converted CSL 1.0 style can be found at:
https://gist.github.com/910635
---
Error: Attribute text-case not allowed on element date from namespace http://purl.org/net/xbiblio/csl at this point.
From line 243, column 5; to line 243, column 91
ued">↩ <date variable="issued" font-weight="normal" font-style="normal" text-case="lowercase">
---
(CSL 1.0 does no longer allow text-case to be set on the date element)
While the style is valid, it is however full of problems due to the conversion.
For exemple:
This: référence juridique 7e éd
Should be like
That: référence juridique 7e éd
and...
This: Chang, Liu, « Background: Rising Appeals to Beijing », English Caixin, Beijing, 2010, en ligne : <http://english.caing.com/2010-10-20/100190629.html>.
should be like this:
Chang, Liu, « Background: Rising Appeals to Beijing », English Caixin, Beijing, 2010, en ligne : <http://english.caing.com/2010-10-20/100190629.html>.
The script before conversion was:
r& # 233 ; f & # 233 ; rence juridique 7e & # 233 ;d (Without spaces of course)
Now it is:
référence juridique 7e éd
So I guess I'll start modifying those mis-convertion everywhere... there must be 56 "Â" which should be an unbreakable space.
Any recommandation? =D
(Alt-F I suppose)
I'm pretty sure that's a problem of the online version of the converter - I don't know if there are alternatives we can point to, I believe that the offline converters don't have that issue.
Those are made with
& # x0A0 ;
We may now appreciate a new Style, used by a few Universities, regional, provincial and Supreme Courts and Academic Journals in Law all accross the country (Canada).
^_^
Now I gotta get this on the repository... I'll try to understand the procedure.
I guess I imported it (with Tortoise) so it should eventually appear after someone update the repository. I'm so excited. haha
Do you know when it might be visible on the http://www.zotero.org/styles page?
I'll have to spread out the link quite soon for students and teachers. =)
https://www.zotero.org/svn/csl/mcrj7csl10.csl
Thanks
<id>www.zotero.org/styles/mcrj7csl08</id>
<link href="" rel="self"/>
<link href="" rel="documentation"/>
to
<id>http://www.zotero.org/styles/mcrj7csl10</id>
<link href="http://www.zotero.org/styles/mcrj7csl10" rel="self"/>
Due to an update to Firefox 4, I had to update to Zotero 2.1.6. I then discovered that the custom style I created was not functional anymore. Since it was not clean at all, I knew I will have to rewrite it from the beginning instead of modifying a style created by the Simple style generator some day. I think this day has come since I now have some leisure.
I wonder what the following error actually means since I only use normal or Italic :
Error parsing style:
CSL processor error, @font-style attribute: TypeError: CSL.Attributes[key] is undefined
Could you please also tell where to find a list of changes between CSL 0.81 and 1.0. I indeed would like to make the most of CSL 1.0 ? Do you think the primer on 1.0 contains enough details on new features ?
Edit : I just found the upgrade note.
could you help me to convert my 0.8 style into an 1.0 style? Tried it by myself but did not work.
Greetings!
This is the link to the style. Thanks a lot for your help!
https://gist.github.com/raw/1201723/77237eccabf7fdb39a46063505adb1d31a8f9907/heidelberg-medizin.csl
no guarantees it works like the old one, there is a bunch of strange stuff going on that I can't guarantee the new processor will interpret the same way as the old one.