connection of data (mods or marc) to xml (apa.xml)
How are the data, coming in mods or marc format (or whatever), connected to xml?
Usually you find the data in xml between tags (<name>Miller</name>). But where do they go in an apa.xml (besides the info block there is no space for data).
And where is the csl.rnc located? Is it part of the browser (which browsers?), does it come with an plugin, has ist to be installed separately or what?
Thanks
harald
Usually you find the data in xml between tags (<name>Miller</name>). But where do they go in an apa.xml (besides the info block there is no space for data).
And where is the csl.rnc located? Is it part of the browser (which browsers?), does it come with an plugin, has ist to be installed separately or what?
Thanks
harald
Presumably you are asking about citation formatting (and mean apa.csl, rather than apa.xml).
The Zotero extension (to Firefox) includes a javascript implementation of citeproc. Citeproc takes (1) bibliographic information and (2) a .csl style file to create formatted citations.
For (1), the Zotero implementation of citeproc uses zotero item objects (stored in your database) directly. Other implementations uses MODS XML and/or other bibliographic files/databases.
For (2), the CSL style file is an XML document that adheres to the csl.rnc schema (on sourceforge, as part of the xbiblio project). The actual code that zotero uses to follow the instructions for formatting given in a CSL style file are part of zotero in e.g. /chrome/content/zotero/xpcom/csl.js
Part1: I mean definitely apa.xml. How then are the 'zotero item objects' connected to apa.xml. In a 'normal' xml one could fill or change the data in the xml (<name>Miller</name>) via javascript (DOM or just replace certain strings (Miller to Smith)). But where are the data, or how can I connect new data to the apa.xml. Is there a way to connect data to an apa.xml, or how is the apa.xml applied to the data?
I would like to test it with a small javascript (outside of zotero) to understand the procedure.
Sorry for my ambigues description.
harald
Harald: You mean apa.csl.
(For comparison, Safari uses the end of the URL for initial right-click, apa.csl.xml if you do a right-click after previously loading the page, and apa.xml if you load the page, choose Save As, and select XML. IE 7 uses apa.csl for right-click and apa.xml for Save As. Camino gets both right.)
I suppose we could add explicit download links, but that seems a little excessive. In any case, apa.csl.xml is an improvement over apa.xml. I'll adjust Zotero to import local *.csl.xml files as well as *.csl.
first lines:
<?xml version="1.0" encoding="UTF-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" xml:lang="en">
<info>
<title>American Medical Association</title>
<id>http://www.zotero.org/styles/ama</id>
<link href="http://www.zotero.org/styles/ama"/>
<author>
Later it goes this way:
<macro name="author-short">
<names variable="author">
<name form="short" and="symbol" delimiter=", " initialize-with="."/>
<substitute>
<names variable="editor"/>
<names variable="translator"/>
<text macro="anon"/>
</substitute>
</names>
</macro>
Compared to normal xml: <name>Miller</name> (the data is 'miller') my question is: where or how come the data (Name or Author Miller) into that csl/xml file, where there is the 'author' in a macro as a variable and not between tags. I do not want citeproc to do it for me nor zotero, I just want to do it myself in a simple javascript (as I said I would do it in a normal xml with DOM etc.)
Perhaps my question is too simple but I would like to understand the basic procedure.
Thanks a lot
harald
See the XBib site for more (if somewhat outdated) info on CSL.
The CSL file only provides instructions on how to format a citation. It does not store raw data.
The raw data that is used in the citation ("Miller", in your example) has nothing to do with CSL. It is part (1) in my previous description and is labeled "BibDB" in the figure. As above, this raw data is stored in a database for Zotero (but other implementations of citeproc use different storage).
I am a bit lost now. Most of the cited texts I have read before, I am afraid I have to read them once more and more carefully. I will study the mentioned codes as well. That will take some time and I will see how far it takes me. Meanwhile I will enjoy the weekend (beautiful automn full of colors).
harald