Jump to content

Extension talk:TEITags

About this board

Parser problem TEITags

4
Loman87 (talkcontribs)

Hi,

I know this is an old extension, however I find it very useful for digital humanities projects (and my wiki is one of these). I installed this extension on:

MediaWiki 1.27.1

PHP 7.0.13-0ubuntu0.16.04.1 (apache2handler)

MySQL 5.7.17-0ubuntu0.16.04.1

ICU 55.1

Lua 5.1.5

The issue occurs when I use a tei tag inside another one, like <head>test <add>text</add></head>. The result is something like

test '"`UNIQ--add-00000004-QINU`"'

I found this and I guess it is certainly related to my issue. My problem is that I am not a devoleper, so I am not sure where to edit the extension code.

In TEITags.body.php I see this:

public function ParserFirstCallInit ( Parser $parser ){

global $wgOut;

$parser->setHook( 'tei'    , array( $this , 'RenderTei' ) );

$parser->setHook( 'lb'     , array( $this , 'RenderLb' ));

$parser->setHook( 'pb'     , array( $this , 'RenderPb' ));

$parser->setHook( 'del'    , array( $this , 'RenderDel' ));

$parser->setHook( 'add'    , array( $this , 'RenderAdd' ));

$parser->setHook( 'gap'    , array( $this , 'RenderGap' ));

$parser->setHook( 'unclear', array( $this , 'RenderUnclear' ));

$parser->setHook( 'note'   , array( $this , 'RenderNote' ));

$parser->setHook( 'hi'     , array( $this , 'RenderHi' ));

$parser->setHook( 'head'   , array( $this , 'RenderHead' ));

$parser->setHook( 'sic'    , array( $this , 'RenderSic' ));

$parser->setHook( 'foreign', array( $this , 'RenderForeign' ));

$wgOut->addModules( 'ext.TEITags' );

I guess I have to edit somehow the bold text, but I have no idea how :(

Can anyone help me, please?

Thanks!

Lorenzo

Loman87 (talkcontribs)

@Cavila could you help in any way? I tried to reach Richard Davis and Ben Parish but they do not use their Cambridge emails anymore.

Any help would be really appreciated.

Thanks,

Lorenzo

Cavila (talkcontribs)

Hi Lorenzo - sounds like it is time for a special interest group focussing on interaction between TEI XML and MediaWiki. Anyway, I share your interests in this extension and will have a go at it when I can find the time but I probably won't be of much help. The extension itself is relatively simple but I'd need to gain a better understanding of MediaWiki's parsing mechanisms.

Loman87 (talkcontribs)

Hi Cavila,

many thanks for your answer. Yes, I think it's a vey good idea to create a TEI/Mediawiki interest group. Mediawiki is always more used (at least in Italy) within libraries, archives and museums and TEI represents a widespread 'standard' for this communities. I would be happy to give my contribution to such group. I am not really a huge fan of TEI, however I think it's very useful to guarantee data exchange and reuse.

If you should succeed to update TEITags please give me notice!

Best wishes,

Lorenzo

Reply to "Parser problem TEITags"
There are no older topics