Problems adapting citation style

I followed the steps to create Chicago style with abstracts (as outlined here: http://www.zotero.org/support/csl_simple_edits and on the forum:
To change that to "Abstract"
change
<text variable="note" display="block"/>
to
<text variable="abstract" display="block"/>)

which all seemed to work until I got this message when I went to install the new style:

XML Parsing Error: not well-formed
Location: file:///C:/Documents%20and%20Settings/erin/My%20Documents/chicagowithabstract.csl
Line Number 92, Column 101: <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-prece[invalid character]es-last="always"/>

It still allowed me to install it but when I create a bibliography it replaces the author with question marks (although it shows fine in the test pane).

And/ or is there any easier way to get bibliographies with abstracts than going through this process? Am not looking forward to have to explain it to colleagues!

Thank you very much for your help.
  • XML Parsing Error: not well-formed
    Location: file:///C:/Documents%20and%20Settings/erin/My%20Documents/chicagowithabstract.csl
    Line Number 92, Column 101: <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-prece\uffffes-last="always"/>
    So fix that line. It should be 'delimiter-precedes-last', but you have a utf-8 character that has replaced the 'd.' There may be other errors. Always make sure your style validates before you install or distribute. Validation errors are both common & relatively easy to fix.
  • (I had to remove that character in the original post.)
  • Thanks but I'm afraid that maybe I don't understand the answer (I've never done anything with code before). I've opened up the style in the test pane but when I go down to the line where it indicates there is a problem it has precedes spelt properly i.e. with a d so I don't know what the problem is.

    However, when I scroll down there is a line that says this:
    <option name="subsequent-author-substitute" value="���"/>
    I don't know why and I don't know what it should be.

    Also, why have these things happended when all I did was change the word "note" to "abstract" as per the instructions? I want to prevent this happening again.

    Maybe I'm missing something but am finding this fairly difficult and time-consuming.

    Thanks for your help.
  • how are you editing and/or saving the styles? I.e. which text editor are you using?
  • I am pasting it into Notepad and then saving as .csl file.

    It is showing fine in the test pane but shows up this 'parsing error' when I try to install it.
  • could you post the file?
    gist.github.com
    just copy and paste, create a public gist and post the URL here - no registration or anything like it necessary.
    You're positive you're using Notepad and not WordPad, right?
  • Here it is: http://gist.github.com/420474

    Am definitely saving it in notepad. It couldn't be anything to do with the way I am saving it?:
    - Paste into notepad
    - File name: name.csl
    - Save as type: All files
    - Encoding: ANSI

    I don't know what the last 2 things mean but our IT person told me to do it this way.

    Thanks
  • OK, now go the gist (the one you created yourself), download the file using the "Raw" link on the top right, right-click and "save as.." chicagowithabstract.csl
    try installing that.

    If that doesn't work, under "View"--> Character Encoding in Firefox, what do you have selected?
  • I've installed that and it has worked- although oddly it installed it under the name I had given it previously ('annotated bibliography with abstract v2'), not the name 'chicagowithabstract.csl' that I saved it as following your instructions above.

    How do I make changes to styles in the future to avoid these problems? Do I need to go through the gist hub process as above? I am going to need to explain this to colleagues too.

    Thank you very much for your help.
  • the name you see it as is the one in the <title> brackets - the file name should ideally be the same as in the id field (my bad) but in your case that shouldn't matter.

    I'm still not sure what happened - something went wrong with the way you saved this in notepad.
    I'm not sure what the "ANSI" setting does - what are the alternatives? If you have an ASCI option that would be preferable, or maybe try UTF-8?
    Alternatively, there are free, superior alternatives to Notepad (I've always wondered why Windows has such a crappy default text editor) - try the Free&Open Source Notepad++
    http://notepad-plus.sourceforge.net/uk/site.htm
    or the free Komodo Edit
    (I think the latter would even allow you to live-validate your styles).
  • Hello!
    I have adapted a style for french humanities, more or less based on Chicago Citation Style (full note). I also took in account the previous french-adapted styles.
    For the broadcast type, I wanted to use the role=guest ("invité" in french). Since this term can be singular or plural, I wrote the following lines:
    <terms>
    <locale xml:lang="fr">
    <term name="editor" form="short">
    <single>éd.</single>
    <multiple>éds</multiple>
    </term>
    <term name="guest" form="long">
    <single>invité</single>
    <multiple>invités</multiple>
    </term>
    </locale>

    The validator considers there are errors concerning "guest":
    #

    Warning: Being lax about non-RNC Content-Type: text/plain

    http://bitbucket.org/bdarcus/csl-schema/raw/83f9cf9b53bd/csl.rnc
    #

    Error: Bad value guest for attribute name on element term from namespace http://purl.org/net/xbiblio/csl.

    From line 30, column 3; to line 30, column 33

    </term>↩ <term name="guest" form="long">↩ <
    #

    Error: Bad value guest for attribute variable on element names from namespace http://purl.org/net/xbiblio/csl.

    From line 381, column 5; to line 381, column 28

    est">↩ <names variable="guest">↩

    However, if I install the style, it works perfectly well.

    Is the validator excessive ? Is there any risk of ulterior problems ?
  • The validator is not "excessive." There is no "guest" role in CSL at present. You should remove that portion of the code from your style (at best, that code will just never be used processors that run CSL that is not strictly conforming).
Sign In or Register to comment.