trans += t + "\n";
}
- // qDebug()<<trans;
- trans=tr("<?xml version=\"1.0\" encoding=\"UTF-8\"?>") + tr("\n <ar>") + trans + tr("\n </ar>");
+ trans=tr("<?xml version=\"1.0\" encoding=\"UTF-8\"?>") + tr("\n <ar>") + trans + tr("\n </ar>");
+// trans.replace("&","&");
trans=XslConversion(trans);
+ qDebug()<<trans;
+// trans.replace("&","&");
textEdit->insertHtml(trans);
- // textEdit->setPlainText(trans);
+ // textEdit->setPlainText(trans);
textEdit->repaint(this->rect());
{
QXmlQuery myQuery(QXmlQuery::XSLT20);
myQuery.setFocus(translation);
-// qDebug()<<translation;
+
QFile file(":/xsl/xsl.xsl");
if(!file.open(QFile::ReadOnly)){
qDebug()<<"can't open a xslt file";
QString result("");
// qDebug()<<xdxfPlugin->search(_key);
result+="<dict>" + _dictionaryInfo + "<key>" + _key + "</key>" +xdxfPlugin->search(_key) + "</dict>";
+ result.replace("&","&");
+
// qDebug()<<result;
return result;
}
QXmlStreamReader reader(&dictionaryFile);
+
QString a;
bool match =false;
temp= temp + tr(" c=\"") + reader.attributes().value(tr("c")).toString() + tr("\"");
temp+=tr(">");
}
- temp+= reader.text().toString();
+ temp+= reader.text().toString().replace("<","<").replace(">",">");
reader.readNext();
}
if(temp.at(0)==QChar('\n'))
temp= temp + tr(" c=\"") + reader.attributes().value(tr("c")).toString() + tr("\"");
temp+=tr(">");
}
- temp+= reader.text().toString();
+ temp+= reader.text().toString().replace("<","<").replace(">",">");;
reader.readNext();
}
if(temp.at(0)==QChar('\n'))
void XdxfTest::stop() {
XdxfPlugin xdxfPluginB(this);
-// xdxfPlugin.setPatch("dict.xdxf");
Settings *settings=new Settings;
settings->setValue("path","../tests/dict.xdxf");