Project work this weekend

5 views
Skip to first unread message

Chris Maloney

unread,
Jun 1, 2012, 5:46:10 PM6/1/12
to jats-to-...@googlegroups.com
Hi Jeremy, 

I'm hoping to work on this project some over the weekend, and I'm not sure where you are with your code right now.  Do you think you could commit and push?  (Daniel also mentioned he would like to try to use the code in a hackathon over the weekend).  

I was thinking that I would spend some time reviewing the Mediawiki specification to see what our target format is, and I was also thinking of going back to the preview stylesheets that I originally suggested, to remind myself what they do and how they work.  You started from scratch, I know, but I'm not sure that the preview stylesheets mightn't still provide some benefit -- at least because they will have considered a lot of the variability in the content that we might expect to see.

Do you have any other ideas where I might best spend my effort, to jibe with what you're doing?

Cheers!

Jeremy Morse

unread,
Jun 2, 2012, 12:37:58 AM6/2/12
to jats-to-...@googlegroups.com
Working on images right now.  It's a bit tricky; the JATS schema is a little too flexible!  I'll push my code within the hour.

I'm sure there are some useful ideas in the preview stylesheets have some wisdom to share, but I work best by organizing my XSLT around the target format, so I'm actually going through all the features supported in wikicode, then finding the JATS/NLM features that can translate into that.  My next steps will be to skim through the JATS tag library to find any analogues I missed, then check the NLM 3.0 and 2.3 for anything additional that needs supporting.

As for what you might want to work on... Tables are up next after I finish Figures, but the two are a bit entangled, as in JATS, tables can exist inside of figures and vice versa... so maybe best to let me tackle that.

I don't know the first thing about TaxPub yet, so if you can see how to handle that, that might be good.  Otherwise, I have a few "TODO" items in comments sprinkled throughout the XSLT.

--
You received this message because you are subscribed to the Google Groups "JATS-to-MediaWiki" group.
To post to this group, send email to jats-to-...@googlegroups.com.
To unsubscribe from this group, send email to jats-to-mediaw...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jats-to-mediawiki?hl=en.

Chris Maloney

unread,
Jun 2, 2012, 1:03:13 AM6/2/12
to jats-to-...@googlegroups.com
Thanks! I think, if I get so far, I will start working on a Perl
script that uses https://github.com/mikelifeguard/MediaWiki-Bot to do
the import. So, that's why I've started to try to investigate the
format for the output of your XSLTs, so that I can have something to
work with.

Jeremy Morse

unread,
Jun 2, 2012, 1:27:46 AM6/2/12
to jats-to-...@googlegroups.com
Okay.  I just pushed my latest commit to github.  There is an issue with initial whitespace in each line of the wikicode messing up the formatting once you import it into WikiMedia.  I'll try to figure that out tomorrow; for now I need some sleep!

Daniel Mietchen

unread,
Jun 2, 2012, 7:01:45 AM6/2/12
to jats-to-...@googlegroups.com
The event that I am at is
http://www.mediawiki.org/wiki/Berlin_Hackathon_2012 .
The things I am working on here are linked from
http://www.mediawiki.org/wiki/Talk:Berlin_Hackathon_2012#Topics_people_will_be_working_on_.28Edit.2C_improve.2C_expand_this_list.29_15905
.
If there are any issues/ features that I should show to the people
here (over 100 developers around all software projects in use at the
Wikimedia Foundation), please let me know.

Daniel

Jeremy Morse

unread,
Jun 2, 2012, 7:48:39 AM6/2/12
to jats-to-...@googlegroups.com
Hi Daniel,

  I just pushed an important update to the XSLT that fixes the major whitespace problems (while leaving some minor ones), the wikicode now displays pretty well, so I think it's ready for presentation.  Let me know if there are any quick changes you'd like; I'll have a small time window today when I might be able to address them.

  Have a good Hackathon!

-Jeremy

Daniel Mietchen

unread,
Jun 2, 2012, 8:11:15 AM6/2/12
to jats-to-...@googlegroups.com
Dummy question: Hi do I actually present what we have right now?

Can you give me a sequence of commands (or clicks) that would be
useful to highlight any particular issue or feature?

Or a PMC page and its wiki equivalent?

Daniel

Jeremy Morse

unread,
Jun 2, 2012, 9:26:02 AM6/2/12
to jats-to-...@googlegroups.com

I'm just manually running the XSLT, with xslt proc on the command line, against XML exported from PMC, and importing into mediawiki.

Chris Maloney

unread,
Jun 2, 2012, 11:05:21 AM6/2/12
to jats-to-...@googlegroups.com
Daniel, I don't know if Jeremy's answer was detailed enough for you to
get it working. I encountered two hiccups. Here's what I did:

- Update your github working directory (obviously)

- Run scripts/fetch-samples.sh

- Run the xslt against one of the documents with this command (name
the output whatever you want):
xsltproc --novalid jats-to-mediawiki.xsl
samples/PMC3003633/1475-2859-9-89.nxml > PMC3003633.mediawiki
The "--novalid" prevents xsltproc from trying to load the DTD.

- There's a bug in the output, that I pointed out before, but didn't
get fixed. You have to edit it to remove the duplicate xmlns=...
pseudo-attribute on the top-level element. Otherwise, my media
importer complains that it is not valid.

- Import it to your wiki of choice. I imported it to my test wiki,
and you can see it here:
http://chrisbaloney.com/wiki/index.php/Physiological_characteristics_of_the_extreme_thermophile_Caldicellulosiruptor_saccharolyticus:_an_efficient_hydrogen_cell_factory

It looks very nice -- good work, Jeremy!

Chris Maloney

unread,
Jun 2, 2012, 11:09:48 AM6/2/12
to jats-to-...@googlegroups.com
I fixed the xmlns bug in the stylesheet, and pushed it up to github.
Reply all
Reply to author
Forward
0 new messages