bwanders / dokuwiki-strata

Strata - a Semi-Structured Data plugin for Dokuwiki
https://www.dokuwiki.org/plugin:strata
17 stars 8 forks source link

<table> tag not working properly #42

Closed maauzer closed 7 years ago

maauzer commented 7 years ago

I'm currently experimenting with the strata plugin. Data blocks and queries inside the <list> tag are working fine. However it seems that the <table> tag is not working properly. The text inside <table></table> is left as is in the final render version.

Am I missing something ? Or is strata conflicting with some other plugin ?

Dokuwiki version: 2017-02-19 “Frusterick Manners” Plugins installed that might conflict : wrap, styling, mathjax, filelis, ckg edit, cell background, caption

bwanders commented 7 years ago

Hi! Nice to hear that you are interested in the strata plugin.

The most common thing that happens is that the table syntax between < and > is not recognized by strata, which will then leave the whole <table ...> block alone. You could try to simplify the fields in your opening tag, or use the alternative notation of using a fields group instead of putting the selected fields in your opening tag (https://www.dokuwiki.org/plugin:strata:reference_guide#variable_projection):

<table>
fields {
  ?name: Full Name
  ?address
}
-- Rest of query
</table>

instead of

<table ?name "Full Name" ?address>
-- Rest of query
</table>

I think that github did something strange with your example. If you want us to have a look at your example, could you edit your post so it shows up?

(Note: if you surround the example with ``` it will be shown as a code block, like my examples above.)

maauzer commented 7 years ago

Thanks for you quick reply. Edited my original post to show the actual tags. For now I tried a very simple example (based on the quick reference guide) as follows :

Full Name: Jane Maria Doe
Birthday [date]: 1982-7-23
</data>

<data person>
Full Name: Jimmy Smith
Birthday [date]: 1990-6-15
</data>

<data person>
Full Name: Joe Borg
Birthday [date]: 1951-12-5
</data>

<data person>
Full Name: Marie Claire Samtec
Birthday [date]: 2001-2-1
</data>

<table ?p "Person" ?b "Birthday">
?p is a: person
?p Birthday [date]: ?b
?b < 1990-1-1
</table>

This is the result preview of the code image

Please note that with <list> </list> the results show up. Once again thanks for your help and apologies for my delay.

bwanders commented 7 years ago

Hi there,

I tried your example in a test wiki, and what you do should work!

Since it does not for you, I suspect that one of the other plugins is conflicting. You can determine which pluygin causes the problem by disabling them one-by-one and retrying (i.e., editting a small thing and saving the page with the <table>) after every disabled plugin.

After looking into the plugins you have active, I think that the best one to test for first is ckgedit... (By the way, have you tried ckgedit's multi-line plugin support?)

Please, let us know what you discovered, so others can learn from you!

maauzer commented 7 years ago

Tried to weed out the conflicting plugin ....and finally managed to find out the culprit. Its the caption plugin by Till Biskup : https://www.dokuwiki.org/plugin:caption

bwanders commented 7 years ago

Good catch!

(I have updated the strata plugin page with this information)