Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<table> under <floats-group> excluded, breaks references #48

Open
wrought opened this issue Sep 16, 2014 · 5 comments
Open

<table> under <floats-group> excluded, breaks references #48

wrought opened this issue Sep 16, 2014 · 5 comments

Comments

@wrought
Copy link
Member

wrought commented Sep 16, 2014

10.3897/BDJ.2.e1161
log
wikisource
PMC4092324
NXML source

From nxml:

<table-wrap id="T581008" orientation="portrait" position="float"><label>Table 1.</label><caption><p>Island and mainland records for <italic><named-content content-type="taxon-name"><named content content-type="genus">Johngarthia</named-content>
@wrought wrought changed the title Table 1 <table-wrap> tag excluded from <table-wrap> tag (Table 1) excluded from 10.3897/BDJ.2.e1161 Sep 16, 2014
@wrought
Copy link
Member Author

wrought commented Sep 17, 2014

Table works fine when run through xsltproc with jats-to-mediawiki.xsl, issue must be the table in context of rest of article. Here's the successfully transformed output of the table:

==Table 1.==
:"Island and mainland records for ''Johngarthia planata'' obtained from the literature (L) and photographs (P); new records highlighted by (*)."&lt;table frame="hsides" rules="all" border="1"&gt;&lt;tr&gt;&lt;th rowspan="1" colspan="1"&gt;Location&lt;/th&gt;&lt;th rowspan="1" colspan="1"&gt;Source&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;'''Colombia'''&lt;/td&gt;&lt;td rowspan="1" colspan="1"/&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Gorgona Island&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Prahl 1983 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;'''Costa Rica'''&lt;/td&gt;&lt;td rowspan="1" colspan="1"/&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Colorada Island&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Perger et al. 2013 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Caño Island&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Perger et al. 2013 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Nairita Island&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Perger et al. 2013 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;'''Panama'''&lt;/td&gt;&lt;td rowspan="1" colspan="1"/&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Iguana Island*&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;María Elena Valencia 2006; Julio Larish 2013 (P)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;'''Mexico, islands'''&lt;/td&gt;&lt;td rowspan="1" colspan="1"/&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Clipperton Island&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Lenz 1901, Rathbun 1918, Garth 1965 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Pájaros Island, Michoacán&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;García-Madrigal 2000 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Isabela Island, Nayarit&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Rathbun 1899 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Maria Cleofa Island, Nayarit&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Rathbun 1899 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Pájaros Island, Sinaloa&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Arzola-González et al. 2010 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;San Pedro Nolasco Island, Gulf of California&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Felger et al. 2011 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Socorro Island&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Rodriguez et al. 1996, Ortega-Rubio et al. 1997 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;San Benedicto Island&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Brattstrom and Howell 1956 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Clarion Island&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Hernández-Aguilera et al. 1986 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Bacochibampo Bay, Sonora (small reef)&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Manrique 1981 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;'''Mexico, Baja California Peninsula'''&lt;/td&gt;&lt;td rowspan="1" colspan="1"/&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Cabo San Lucas&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Stimpson 1860 (L)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;'''Mexico, mainland'''&lt;/td&gt;&lt;td rowspan="1" colspan="1"/&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Mazatlán, Sinaloa*&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Lisa Brettschneider 2008 (P)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Sayulita, Nayarit*&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Lisa Johnston 2005; Tania Beagley-Brown 2007; Daniel Brewer 2010; Madeline Milne 2013 (P)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Mismaloya, Jalisco*&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Darin Williams 2007 (P)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Manzanillo, Colima*&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Derek Zoebelein 2004 (P)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Ixtapa, Guerrero*&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Miguel Angel Morales 2012 (P)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Mazunte, Oaxaca *&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Gustavo A. Zambrano Cabrera 2008 (P)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Escondido Beach, Oaxaca*&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Mike Gardiner 2010 (P)&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td rowspan="1" colspan="1"&gt;Zapotengo Beach, Oaxaca*&lt;/td&gt;&lt;td rowspan="1" colspan="1"&gt;Claudia Glechner 2011 (P)&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

@wrought
Copy link
Member Author

wrought commented Sep 17, 2014

Ah, issue seems related to #23 and <floats-group> which was also an issue for <fig> elements, like the two present here: 10.3897/BDJ.2.e1161.

This table appears inside of a <floats-group> tag as well. perhaps a generalized solution is needed here to handle any content inside of these tags? Otherwise, at least handling <table-wrap> and table elements, etc is necessary.

@wrought wrought changed the title <table-wrap> tag (Table 1) excluded from 10.3897/BDJ.2.e1161 <table-wrap> and <table> tags excluded under <floats-group> from 10.3897/BDJ.2.e1161 Sep 17, 2014
@wrought wrought changed the title <table-wrap> and <table> tags excluded under <floats-group> from 10.3897/BDJ.2.e1161 <table> under <floats-group> excluded from 10.3897/BDJ.2.e1161 Sep 17, 2014
@wrought wrought changed the title <table> under <floats-group> excluded from 10.3897/BDJ.2.e1161 <table> under <floats-group> excluded from 10.3897/BDJ.2.e1161 Sep 17, 2014
@wrought wrought changed the title <table> under <floats-group> excluded from 10.3897/BDJ.2.e1161 <table> under <floats-group> excluded from 10.3897/BDJ.2.e1161 Sep 17, 2014
@wrought wrought changed the title <table> under <floats-group> excluded from 10.3897/BDJ.2.e1161 <table> under <floats-group> excluded Sep 17, 2014
@wrought wrought changed the title <table> under <floats-group> excluded <table> under <floats-group> excluded, breaks references Sep 17, 2014
@Klortho
Copy link
Member

Klortho commented Sep 17, 2014

Good detective work. Yes, the , which is at the top-level of the article, is not processed at all.

@wrought
Copy link
Member Author

wrought commented Sep 17, 2014

I tried to take a pass at processing the <floats-group> but no luck. As far as I can tell, this element is a child of <article> and a sibling of <sec> elements. What would be the best way to handle the contents of a <floats-group> element as though it were another <sec>?

@Klortho
Copy link
Member

Klortho commented Sep 18, 2014

Off the top of my head, I'd think we'd want to find and process the float-group items when they are referenced from the body of the article. So, when the XSLT encounters a figure in the body that references the item that exists inside the floats-group, then do a call-template to process that item. I will try to take a look this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants