KDocTools
xslt.cpp
59static xmlParserInputPtr xsltprocExternalEntityLoader(const char *_URL, const char *ID, xmlParserCtxtPtr ctxt)
134QString KDocTools::transform(const QString &pat, const QString &tss, const QList<const char *> ¶ms)
146 replaceURLList[QLatin1String("http://www.oasis-open.org/docbook/xml/4.5")] = QString("file:///%1").arg(DOCBOOK_XML_CURRDTD);
150 xsltStylesheetPtr style_sheet = xsltParseStylesheetFile((const xmlChar *)QFile::encodeName(tss).constData());
170 xmlDocPtr doc = xmlCtxtReadFile(pctxt, QFile::encodeName(pat).constData(), nullptr, XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_NONET);
257 // qCDebug(KDocToolsLog) << "FILENAME " << startindex << " " << endindex << " " << inside << " " << parsed.mid(startindex + 18, 15)<< " " <<
303 output.replace(QLatin1String("<?xml version=\"1.0\"?>"), QLatin1String("<?xml version=\"1.0\" encoding=\"utf-8\"?>"));
352QString KDocTools::locateFileInDtdResource(const QString &file, const QStandardPaths::LocateOptions option)
358QStringList locateFilesInDtdResource(const QString &file, const QStandardPaths::LocateOptions option)
380 QStringList result = QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, fileName, option);
383 const QFileInfo fileInInstallDataDir(QStringLiteral(KDOCTOOLS_INSTALL_DATADIR_KF) + QStringLiteral("/kdoctools/") + file);
394 qCDebug(KDocToolsLog) << "Could not locate file" << fileName << "in" << QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
403 const QStringList dirNames = locateFilesInDtdResource(QStringLiteral("customization"), QStandardPaths::LocateDirectory);
411 const QFileInfoList catalogInfoFiles = customizationDir.entryInfoList(catalogFileFilters, QDir::Files, QDir::Name);
428 return QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("doc/HTML"), QStandardPaths::LocateDirectory);
QString i18n(const char *text, const TYPE &arg...)
Utility methods to generate documentation in various format from DocBook files.
KDOCTOOLS_EXPORT QString transform(const QString &file, const QString &stylesheet, const QList< const char * > ¶ms=QList< const char * >())
Transform and return the content of file with the specified XSLT stylesheet (both already in memory) ...
Definition xslt.cpp:134
KDOCTOOLS_EXPORT QString locateFileInDtdResource(const QString &file, const QStandardPaths::LocateOptions option=QStandardPaths::LocateFile)
Find a specified file amongst the resource shipped with KDocTools.
Definition xslt.cpp:352
KDOCTOOLS_EXPORT QByteArray extractFileToBuffer(const QString &content, const QString &filename)
Extract the content of a single file from the content string generated by the transformation scripts.
Definition xslt.cpp:306
KDOCTOOLS_EXPORT QStringList documentationDirs()
Returns the directories which can contain documentation.
Definition xslt.cpp:425
KGuiItem test()
const char * constData() const const
Files
Name
QFileInfoList entryInfoList(Filters filters, SortFlags sort) const const
QByteArray encodeName(const QString &fileName)
bool exists() const const
const_iterator constBegin() const const
const_iterator constEnd() const const
void append(QList< T > &&value)
T & first()
bool isEmpty() const const
void prepend(parameter_type value)
LocateOptions
GenericDataLocation
QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options)
QStringList standardLocations(StandardLocation type)
QString arg(Args &&... args) const const
const QChar at(qsizetype position) const const
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
QString fromUtf8(QByteArrayView str)
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype lastIndexOf(QChar ch, Qt::CaseSensitivity cs) const const
QString left(qsizetype n) const const
QString mid(qsizetype position, qsizetype n) const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
bool startsWith(QChar c, Qt::CaseSensitivity cs) const const
QByteArray toLatin1() const const
QByteArray toUtf8() const const
QUrl fromLocalFile(const QString &localFile)
QByteArray toEncoded(FormattingOptions options) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:55:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:55:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.