@@ -1001,7 +1001,7 @@ namespace Tokenizer {
1001
1001
// there is already text at thus level, bail out.
1002
1002
return ;
1003
1003
}
1004
- if ( root->isSubClass ( folia::Linebreak_t ) ){
1004
+ if ( root->isSubClass < folia::Linebreak>( ) ){
1005
1005
// exception
1006
1006
return ;
1007
1007
}
@@ -1218,7 +1218,7 @@ namespace Tokenizer {
1218
1218
}
1219
1219
else {
1220
1220
const folia::FoliaElement *par = el->parent ();
1221
- if ( par->element_id () == folia::BASE ){
1221
+ if ( par->isinstance < folia::FoLiA>() ){
1222
1222
// we went all up without avail...
1223
1223
return " " ;
1224
1224
}
@@ -1308,7 +1308,7 @@ namespace Tokenizer {
1308
1308
}
1309
1309
else if ( (tok.role & BEGINOFSENTENCE)
1310
1310
&& root != sent
1311
- && root->element_id () == folia::Sentence_t ){
1311
+ && root->isinstance < folia::Sentence>() ){
1312
1312
// Ok, another Sentence in a quote
1313
1313
if ( i > 0 && !(toks[i-1 ].role & BEGINQUOTE) ){
1314
1314
// close the current one, and start a new one.
@@ -1434,7 +1434,7 @@ namespace Tokenizer {
1434
1434
args[" set" ] = root->doc ()->default_set ( folia::AnnotationType::PARAGRAPH );
1435
1435
args[" xml:id" ] = root->doc ()->id () + " .p." + TiCC::toString (++p_count);
1436
1436
folia::Paragraph *p = new folia::Paragraph ( args, root->doc () );
1437
- if ( root->element_id () == folia::Text_t ){
1437
+ if ( root->isinstance < folia::Text>() ){
1438
1438
if ( tokDebug > 5 ){
1439
1439
DBG << " append_to_folia, add paragraph to Text" << endl;
1440
1440
}
@@ -1801,7 +1801,7 @@ namespace Tokenizer {
1801
1801
// multiple sentences. We need an extra Paragraph.
1802
1802
// But first check if this is allowed!
1803
1803
folia::FoliaElement *rt;
1804
- if ( e->acceptable ( folia::Paragraph_t ) ){
1804
+ if ( e->acceptable < folia::Paragraph>( ) ){
1805
1805
folia::KWargs args;
1806
1806
string e_id = e->id ();
1807
1807
if ( !e_id.empty () ){
0 commit comments