Preference for encoding of tables?

5 views
Skip to first unread message

Jeremy Morse

unread,
May 30, 2012, 10:12:25 PM5/30/12
to jats-to-...@googlegroups.com
Any strong preference whether tabular data in JATS gets transformed to XHTML or wikicode?  MediaWiki supports either.

quoting http://www.mediawiki.org/wiki/Help:Tables
"Tables may be authored in wiki pages using either XHTML table elements directly, or using wikicode formatting to define the table. XHTML table elements and their use are well described on various web pages and will not be discussed here. The benefit of wikicode is that the table is constructed of character symbols which tend to make it easier to perceive the table structure in the article editing view compared to XHTML table elements."

Chris Maloney

unread,
May 30, 2012, 11:32:24 PM5/30/12
to jats-to-...@googlegroups.com
I'd suggest XHTML.  Most tables in JATS are already coded in XHTML.  You might want to compare the set of elements and attributes supported by both JATS vs. MediaWiki, and make adjustments for anything that's not supported in MediaWiki.  But unless there's a compelling reason, it doesn't make sense to transform them out of their source format if MediaWiki also supports it.

But some tables in JATS are coded in the OASIS CALS table model (http://dtd.nlm.nih.gov/options/OASIS/tag-library/19990315/n-j000.html).  I don't know what percentage (it might be 0%).  None of the baseline sample articles use it.



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

Daniel Mietchen

unread,
May 30, 2012, 11:58:11 PM5/30/12
to jats-to-...@googlegroups.com
I agree. If XHTML is a problem, there are tools like
http://toolserver.org/~magnus/html2wiki.php to help fix that.

Daniel

Jeremy Morse

unread,
May 31, 2012, 8:38:22 AM5/31/12
to jats-to-...@googlegroups.com

Great, I'll work on tables and embedded images (using Daniel's file-renaming algorithm) tonight.

Daniel Mietchen

unread,
May 31, 2012, 9:29:24 AM5/31/12
to jats-to-...@googlegroups.com
Sounds good. I'll be attending a Wikimedia hackathon over the weekend.
Any chance that I could demo the converter there?

Daniel

Jeremy Morse

unread,
May 31, 2012, 10:33:44 AM5/31/12
to jats-to-...@googlegroups.com
I don't see why not, except: if I've implemented the Links code to use your renaming algorithm, and you haven't applied the same algorithm to the filenames in the sample data, then the images won't display correctly in your demo.

Now that I think about it: is you want this XSLT to be generally useful for any JATS to MediaWiki transformation anyone might want to do, you might want to consider whether this renaming algorithm is generally useful.  An "out of the box" solution might preferably use the filenames as-is.  Thoughts?

Daniel Mietchen

unread,
May 31, 2012, 4:51:29 PM5/31/12
to jats-to-...@googlegroups.com
I currently don't see any other projects in need of JATS-to-MediaWiki
conversion incl. file names, but yes, a generic solution is generally
preferable.

The reasoning behind the proposed naming scheme is mainly
compatibility with naming policies on Wikimedia Commons, where the
files will end up. But this could be achieved by a simple script that
runs after the generic XSLT.

d.

Jeremy Morse

unread,
May 31, 2012, 5:04:52 PM5/31/12
to jats-to-...@googlegroups.com
That might be the best approach; it's also an easy problem to solve while post-processing (or pre-processing) the XML in Perl or Python, a fair but trickier (but not impossible!) in XSLT.
Reply all
Reply to author
Forward
0 new messages