import of validated style-file doesnt work

Hi everybody,

I tried to write a style for German law citations (notes without bibliographie). Works fine in the reference test pane and is validated in validator.nu. If I open the csl-file with firefox, he asks me if I want to install it, but if I klick ok, it doesn't appear in my styles list. Same via style tab in zotero: install?=> ok => doesn't appear.

I noted that when I open it with FF, there's a grey bar on top saying something like "no style information in this document", and the first line of the file (<?xml version="1.0" encoding="UTF-8"?>) is missing.

Can anybody help? Thanks a lot! J

This is the file:

<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" xml:lang="en">

<info>

<title>
test
</title>

<id>
</id>

<author>
<name>myname</name>
</author>

<summary>German Law Citation Style</summary>
<category term="note"/>

<updated>2009-05-20T02:46:19+00:00</updated>
</info>

<macro name="author-short">
<names variable="author">
<name form="short" and="text" delimiter="/" delimiter-precedes-last="always" font-style="italic"/>
</names>
</macro>

<macro name="title-short">
<choose>
<if variable="title" match="none">
</if>
<else>
<text variable="title" form="short"/>
</else>
</choose>
</macro>

<macro name="editor-short">
<choose>
<if variable="title abstract" match="all">
</if>
<else>
<names variable="editor">
<name form="short" delimiter="/" delimiter-precedes-last="always" prefix="in: " suffix=" (Hrsg.)"/>
</names>
</else>
</choose>
</macro>

<macro name="container-title">
<choose>
<if variable="abstract">
<text variable="abstract"/>
</if>
<else>
<text variable="container-title"/>
<text variable="volume"/>
</else>
</choose>
</macro>

<macro name="edition-year">
<choose>
<if type="article-journal">
<group delimiter=" ">
<text variable="collection-title" prefix="in: "/>
<date variable="issued">
<date-part name="year"/>
</date>
</group>
</if>
<else-if variable="edition" match="any">
<group delimiter=" ">
<text variable="edition" suffix=" Aufl."/>
<date variable="issued">
<date-part name="year"/>
</date>
</group>
</else-if>
<else>
<date variable="issued">
<date-part name="year"/>
</date>
</else>
</choose>
</macro>

<citation>
<option name="et-al-min" value="4"/>
<option name="et-al-use-first" value="1"/>
<option name="et-al-subsequent-min" value="4"/>
<option name="et-al-subsequent-use-first" value="1"/>
<option name="disambiguate-add-names" value="true"/>

<layout prefix="" suffix="." delimiter="; ">

<choose>

<if position="ibid-with-locator">

<group delimiter=", ">
<text term="ibid" text-case="capitalize-first" suffix="."/>
<text macro="point-locators-subsequent"/>
</group>
</if>

<else-if position="ibid">
<text term="ibid" text-case="capitalize-first" suffix="."/>
</else-if>

<else>

<group delimiter=", ">
<text macro="author-short"/>
<text macro="title-short"/>
<text macro="editor-short"/>
<text macro="container-title"/>
<text macro="edition-year"/>
</group>
</else>
</choose>
</layout>
</citation>
</style>
  • I don't see how your style could have validated as correct when it includes an empty id value. That id value is essential for Zotero (or any other application that support CSL) to be able to deal with your style.
  • validator.nu did... What am I supposed to write in there? The path? It's not uploaded... Thanks a lot! j
  • No, a URI. Check some examples from the Zotero repo. Also, see http://www.zotero.org/support/dev/csl_syntax_summary#info.
  • edited May 20, 2009
    rnv & validator.nu both validate it against the trunk version of csl.rnc, despite the empty id value.

    (To use validator.nu, you'd need to add the schema URL (which you might have done--it validates, but which many neglect to do))
  • Oops; a bug in the schema. The cs:id element's content is just "string." I'll fix that.
  • edited May 20, 2009
    Done. Validation should now correctly flag errors of this sort.
  • I put in http://www.zotero.org/styles/german-law-style. Doesn't work, though.
  • edited May 20, 2009
    @noksagt "To use validator.nu, you'd need to add the schema URL"
    =>did that!
  • What do you mean "doesn't work"? Doesn't validate? Or, Zotero won't register it?
  • You also put everything into your citation block & have no bibliography block. That's almost certainly not what you intend to do (don't know if that is supposed to be valid or not; I guess I can see wanting only one of the two for weird edge cases & also don't know if Zotero will tolerate it).
  • That shouldn't be a problem; it's a note style.
  • It won't register. Validates as before. But when trying to install (both ways), the same as before occurs, too. At least I helped to discover a bug so far!! J
  • @noksagt: The bibliographie I can overtake (almost) from a chicago manual style. But since I can't figure out how to install it, I'll deal with that later, I thought, before it's all useless...
  • That shouldn't be a problem; it's a note style.
    Yes--you're right.

    It installs fine with an id for me in Zotero 2. Haven't tested it, though.
  • That's bizarre - I've got Zotero 2 as well. Also I can install styles from the repository without problems...
  • Does the file have a .csl extension?
  • Make sure it doesn't have a hidden extension (e.g., .txt).
  • Also, can you reiterate what exactly the problem is? What exact steps are you taking and what's happening?
  • Did make sure again. Not hidden! Ok, this is what I do: I open the file in FF (directly from the folder or via "Open File" in FF). In a tab appears the content (but also this grey bar saying; there seems to be no style information) and a pop-up, aksing me if I want to install style "test" from .../test.csl. I klick ok, and the pop-up disappears, but nothing else happens. Same when I go via zotero>settings>style tab>"+": pop-up, and so on. Exasperating... J
  • edited May 20, 2009
    Maybe it has to do with the text editor you're using? Try installing this file (save to disk, then drag into a Firefox window): http://gist.github.com/raw/115052/734980fe0a08048780ba08bb6192117e91fc73fd/german-law-style.csl
    This installs the style just fine for me.
  • This could have worked out so fine!! Thanks for the try! But it's exactly the same as before... I'm using notepad, that's not so unusual, is it?

    It has nothing to do with the first line of the file (<?xml version="1.0" encoding="UTF-8"?>), that FF cuts out when I open it (in your file as well), has it?
  • what do you mean by "nothing else happens"?
    Nothing else happens for me, either, but the style is installed after clicking "OK" in the pop-up you mention.
    What happens with the other styles when you install them?
    Are you sure it's not installed, even if you use Rintze's version?
    Notepad is just fine for the task, yes.
  • You might have messed things up by installing a style with no id. Check the 'styles' folder within your Zotero data directory for an existing file, delete it, restart Firefox, and try again.
  • Yes, with other styles, nothing happens, but the style is installed and appears in the style tab, like in your case. When trying to install the test-style, in the style folder doesn't appear anything. Right now there's no style "test" in it, which I could delete. Or is there a style folder that contains files separat from the one under setting>style tab? Seems to be a hard case, but thanks to all so far!!
  • Zotero preferences->Advanced->Reset Translators and Styles

    Then try again.

    If it doesn't work, send in an error report using Report Errors under the gear menu before restarting Firefox and post the Report ID here.
  • This is the ID after Reset and trying to install via style tab: 550380516. Some utterly cryptical stuff in this error report...
  • The spaces around the id value are causing problems. We'll fix this, but remove the extra line breaks and it should work.
  • It works! I removed the extra extra line breaks and could install it without problems.

    When using it in my Word-doc, an "error communicating with zotero" occurred, but fixed that with help from http://www.zotero.org/support/word_processor_plugin_troubleshooting. I tried to insert citation, looked in the error report (rather cryptical, but I understood some key words, so thanks for the hint, Dan!), and it results that I forgot to define one macro... (Should that be validated as correct?) Having done that, it works just as it should! Many many thanks!!
  • I have also had this problem. Simply removing the extra line breaks also fixed the problem and I can see the style in the style manager.
Sign In or Register to comment.