Hello Jerome,
I am trying to use citeproc-php, but the script complains that it cannot
find “./locale/locales-en-US.xml”. Can I find the file somewhere else? It
might be helpful if you publish the whole project …
Thanks for your work on this…
Christian–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5135456.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.
Ok, I found the locale files in the old sourceforge SVN repository.
But now I am facing other issues which I should probably communicate
off-list with Jerome since they have to do with the php implementation…
C.–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5135521.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.
It
might be helpful if you publish the whole project …
Sorry, I had hoped to get back to this sooner, but life sometimes get in the way
Ron.
No problem, there are more important things in life that citations (or isn’t
there?)
Anyways, I have it working, sort-of, it is formatting, but the author names
are missing.
Will look into this tomorrow or on the weekend!
C.–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5137226.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.
Locale files for CSL 1.0 can be found at
http://bitbucket.org/bdarcus/csl-locales/src/tip/trunk/. I think the
SourceForge SVN only holds CSL 0.8 locale files (which can also be found at
http://bitbucket.org/bdarcus/csl-locales/src/tip/branches/0.8/).
Rintze
Hello Ron,
sorry for calling you “Jerome”, thought that was your first name.
I have your code working in a plugin of my app (will showcase it when
everything’s in order). However, somehow the author field is not parsed
correctly. For example, the following JSON input:
Array
(
[ITEM-0] => stdClass Object
(
[type] => book
[id] => ITEM-0
[author] => Array
(
[0] => stdClass Object
(
[family] => Adams
[given] => Kirstine
[parse-names] => true
)
[1] => stdClass Object
(
[family] => Byrnes
[given] => Andrew
[parse-names] => true
)
)
[issued] => stdClass Object
(
[date-parts] => Array
(
[0] => 1999
)
)
[title] => Gender Equality and the Judiciary: Using
International Human Rights Standards to Promote the Human Rights of Women
and the Girl-Child at the National Level
[publisher-place] => London
[publisher] => Commonwealth Secretariat
[keyword] => Array
(
[0] => Antidiskriminierungsrecht
)
[note] => 429
)
)
produces the following result:
1AD. Gender Equality and the Judiciary: Using International Human Rights
Standards to Promote the Human Rights of Women and the Girl-Child at the
National Level. London: Commonwealth Secretariat.
Any idea what could be wrong?
Thanks,
C.–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5139707.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.
Looks like it should work, if you send me the json & csl files, I’ll run it in the debugger and see what’s happening.
Ron.> -----Original Message-----
Hi Ron,
I have put up a live example:
http://quit.rewi.hu-berlin.de/bibliograph-dev/build/#datasource~lsbaer^folderId~185^modelId~2745^modelType~reference
If you click on a reference and then on “formatted view”, you’ll get the
full debug information: var_export()'ed reference data, the result, and the
CSL used.
Thanks!
Christian–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5140369.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.
Just realized need the full URL to have the reference automatically loaded.-
here is a screenshot how it should look like:
Cheers,
C.–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5140375.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.
Hi Christian,
I’ve found the problem… It seems that I posted a version that was somewhat oriented to my own code, and thus in the csl_name->render() function the name parts are referenced in my notation rather than the “csl” notation.
i.e.
$name->firstname should be $name->given
$name->lastname should be $name->family
Sorry about that, my bad
Ron.> -----Original Message-----
Ok, I updated the demo with your latest code, with a few changes (which I
sent to you off-list). Now it is possible to select more than one reference
and get the formatted citations…
http://quit.rewi.hu-berlin.de/bibliograph-dev/build/#modelType~reference^itemView~formattedView^sessionId~8e294fd884d9da0d87bfe3d9475f5a10^datasource~lsbaer^folderId~182^selectedIds~12581%2C24689%2C7827%2C11649^modelId~12581
Demo link
As you can see, there are still some small glitches, including the date
formatting, but it all might be due to incorrect input data.
Thanks for having a look!
Christian–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5142973.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.
Ok, I solved the date problem - it was a missing Array level, so my fault.
Found out that date-parts takes an array of arrays, I had only one-level
array. Fixed that.
This is, btw, an example for why it would be good to have some sort of
validation to the input data. There are a few JSON schema validators around
(see, for example http://ajaxian.com/archives/cernyjs-schema-for-json), but
no standard (and thus no implementations in other languages). Converting the
json data into xml and then validating it seems too expensive. Any ideas
that you might have already discussed? Bruce seems to like YAML, maybe there
are ways of creating a schema validator?
Thanks,
C.–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5144091.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.
Hi Ron,
did you get the patch that I sent to you off-list? If I have changes, how
would you like me to get them to you (I don’t know Mercurial very well - I
am more a SVN person).
Thanks,
C.–
View this message in context: http://xbiblio-devel.2463403.n2.nabble.com/citeproc-php-Missing-locales-en-US-xml-tp5135456p5153255.html
Sent from the xbiblio-devel mailing list archive at Nabble.com.