[citeproc-php] Missing locales-en-US.xml

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[citeproc-php] Missing locales-en-US.xml

panyasan
Administrator
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Missing locales-en-US.xml

panyasan
Administrator
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Missing locales-en-US.xml

Jerome, Ron
In reply to this post by panyasan
> 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.

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Missing locales-en-US.xml

panyasan
Administrator
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.  
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Missing locales-en-US.xml

Rintze Zelle-2
In reply to this post by panyasan
On Thu, Jun 3, 2010 at 5:06 PM, panyasan <[hidden email]> wrote:

Ok, I found the locale files in the old sourceforge SVN repository.

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

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Missing locales-en-US.xml

panyasan
Administrator
In reply to this post by Jerome, Ron
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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Missing locales-en-US.xml

Jerome, Ron
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-----
> From: panyasan [mailto:[hidden email]]
> Sent: June 4, 2010 10:46 AM
> To: [hidden email]
> Subject: Re: [xbiblio-devel] [citeproc-php] Missing locales-en-US.xml
>
>
> 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.
>
> -----------------------------------------------------------------------
> -------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Formatting problems. Was:Missing locales-en-US.xml

panyasan
Administrator
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Formatting problems. Was:Missing locales-en-US.xml

panyasan
Administrator
Just realized need the full URL to have the reference automatically loaded.- here is a screenshot how it should look like:



Cheers,
C.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Formatting problems. Was:Missing locales-en-US.xml

Jerome, Ron
In reply to this post by panyasan
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-----
> From: panyasan [mailto:[hidden email]]
> Sent: June 4, 2010 1:18 PM
> To: [hidden email]
> Subject: Re: [xbiblio-devel] [citeproc-php] Formatting problems.
> Was:Missing locales-en-US.xml
>
>
> 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~refere
> nce
>
> 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.
>
> -----------------------------------------------------------------------
> -------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit.  See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Formatting problems. Was:Missing locales-en-US.xml

panyasan
Administrator
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...

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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Formatting problems. Was:Missing locales-en-US.xml

panyasan
Administrator
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.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Formatting problems. Was:Missing locales-en-US.xml

panyasan
Administrator
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [citeproc-php] Patches

panyasan
Administrator
In reply to this post by Jerome, Ron
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.
Loading...