Quantcast

[ED] Question about formats in fields

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

[ED] Question about formats in fields

Jeremy Dover
What are the rules about how text returned from an external database is
formatted? If I include Wiki formatting such as ''S'', it is rendered by
the #for_external_data call correctly as italics. However, if I try to
include either HTML markup, or template transclusion, only the actual
strings (e.g., <math>blah</math> or {{Matrix2x2|1|0|0|1}}) are included.

Basically I'm looking for a way to render a (mathematical) matrix as part
of a VARCHAR in my database, and none of the solutions I've tried have
worked. My preference would be to use <math> tags directly, but willing to
do this with a template as well.

Many thanks in advance for any help you can provide!

Best,
Jeremy
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ED] Question about formats in fields

Yaron Koren-2
Hi Jeremy,

That's a tricky one. I don't think I've heard before of someone using
External Data to access a data store that holds wikitext, and I don't know
if it's doable. If I may ask - why bother with the external database, and
why not just put the text directly in the wiki?

-Yaron

On Thu, Mar 23, 2017 at 12:37 AM, Jeremy Dover <[hidden email]>
wrote:

> What are the rules about how text returned from an external database is
> formatted? If I include Wiki formatting such as ''S'', it is rendered by
> the #for_external_data call correctly as italics. However, if I try to
> include either HTML markup, or template transclusion, only the actual
> strings (e.g., <math>blah</math> or {{Matrix2x2|1|0|0|1}}) are included.
>
> Basically I'm looking for a way to render a (mathematical) matrix as part
> of a VARCHAR in my database, and none of the solutions I've tried have
> worked. My preference would be to use <math> tags directly, but willing to
> do this with a template as well.
>
> Many thanks in advance for any help you can provide!
>
> Best,
> Jeremy
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>



--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ED] Question about formats in fields

Jeremy Dover
Hi Yaron,

Thanks for your response! That's a good question, and there's a strong
chance I'll end up there, but there is a reason. I have a database of
combinatorial objects, which can be constructed in various different
ways...many of them in more than one way. Each object has its own wiki
page, and on that wiki page I want to provide a list of all the different
construction techniques that can be used to create that object. If that
were the only use case, then obviously I would just put the text in the
wiki.

But now suppose I want to run a query that says "Show me all of the objects
constructed using method X that have Y points." (where the number of points
is stored in the database, and is naturally brought into the Wiki with
ExternalData...thanks!). The Wiki doesn't easily permit that query, but
that would be easy in the database. But if I put this construction
information in the database, then I need to either a.) Maintain the
information in both the database and the Wiki, or b.) Pull the information
into the wiki from the database. Option a is pretty unattractive, so I
wanted to try option b, but the information about the construction does not
lend itself to being written as fields which can be formatted with a Wiki
template. Hence I end up storing presentation information in the database,
which when I put it that way is also a pretty terrible idea.

Now that I'm thinking a little clearer, you are right that putting the
wikitext in the DB is just a bad idea. Time to refactor!

Thanks so much for your reply!

Best regards,
Jeremy

On Thu, Mar 23, 2017 at 11:38 AM, Yaron Koren <[hidden email]> wrote:

> Hi Jeremy,
>
> That's a tricky one. I don't think I've heard before of someone using
> External Data to access a data store that holds wikitext, and I don't know
> if it's doable. If I may ask - why bother with the external database, and
> why not just put the text directly in the wiki?
>
> -Yaron
>
> On Thu, Mar 23, 2017 at 12:37 AM, Jeremy Dover <[hidden email]>
> wrote:
>
>> What are the rules about how text returned from an external database is
>> formatted? If I include Wiki formatting such as ''S'', it is rendered by
>> the #for_external_data call correctly as italics. However, if I try to
>> include either HTML markup, or template transclusion, only the actual
>> strings (e.g., <math>blah</math> or {{Matrix2x2|1|0|0|1}}) are included.
>>
>> Basically I'm looking for a way to render a (mathematical) matrix as part
>> of a VARCHAR in my database, and none of the solutions I've tried have
>> worked. My preference would be to use <math> tags directly, but willing to
>> do this with a template as well.
>>
>> Many thanks in advance for any help you can provide!
>>
>> Best,
>> Jeremy
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Semediawiki-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>
>
>
>
> --
> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ED] Question about formats in fields

Yaron Koren-2
Hi,

But now suppose I want to run a query that says "Show me all of the objects
> constructed using method X that have Y points." (where the number of points
> is stored in the database, and is naturally brought into the Wiki with
> ExternalData...thanks!). The Wiki doesn't easily permit that query, but
> that would be easy in the database.


Are you familiar with the Semantic MediaWiki and/or Cargo extensions? (I
would think so, since you're on this mailing list, but who knows.) If that
database doesn't serve any purpose other than as a data store for your
wiki, it seems to me that the best approach would be to move *all* of this
information into the wiki, then store it with either SMW or Cargo (or
both), and query it directly in the wiki. Or is there something that would
make that difficult?

-Yaron

--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Loading...