Skip to content

Commit

Permalink
Use TüBa-D/Z DTD when opening TüBa-D/Z.
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldk committed Dec 18, 2014
1 parent 30526d1 commit c1d130d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/StatisticsWindow.cpp
Expand Up @@ -374,7 +374,10 @@ void StatisticsWindow::closeEvent(QCloseEvent *event)

void StatisticsWindow::readNodeAttributes()
{
QFile dtdFile(":/dtd/alpino_ds.dtd"); // XXX - hardcode?
QString dtdPath = (d_corpusReader && d_corpusReader->type() == "tueba_tree") ?
":/dtd/tueba_tree.dtd" : ":/dtd/alpino_ds.dtd"; // XXX - hardcode?
QFile dtdFile(dtdPath);

if (!dtdFile.open(QFile::ReadOnly)) {
qWarning() << "StatisticsWindow::readNodeAttributes(): Could not read DTD.";
return;
Expand Down
5 changes: 4 additions & 1 deletion src/XPathValidator.cpp
Expand Up @@ -421,7 +421,10 @@ XPathValidator::XPathValidator(QSharedPointer<DactMacrosModel> macrosModel, QObj

void XPathValidator::parseDTD()
{
QFile dtdFile(":/dtd/alpino_ds.dtd"); // XXX - hardcode?
QString dtdPath = (d_corpusReader && d_corpusReader->type() == "tueba_tree") ?
":/dtd/tueba_tree.dtd" : ":/dtd/alpino_ds.dtd"; // XXX - hardcode?
QFile dtdFile(dtdPath);

if (!dtdFile.open(QFile::ReadOnly)) {
qWarning() << "StatisticsWindow::readNodeAttributes(): Could not read DTD.";
return;
Expand Down

0 comments on commit c1d130d

Please sign in to comment.