10 #ifndef _STRUS_ANALYZER_ATTRIBUTE_TAGS_LIB_HPP_INCLUDED
11 #define _STRUS_ANALYZER_ATTRIBUTE_TAGS_LIB_HPP_INCLUDED
14 #include "strus/reference.hpp"
25 class ErrorBufferInterface;
27 class TextProcessorInterface;
42 const std::string&
selectexpr()
const {
return m_selectexpr;}
46 :m_markup(markup_),m_selectexpr(selectexpr_)
48 if (!m_markup.get())
throw std::bad_alloc();
50 DocumentTagMarkupDef(
const strus::Reference<TagAttributeMarkupInterface>& markup_,
const std::string& selectexpr_)
51 :m_markup(markup_),m_selectexpr(selectexpr_)
53 if (!m_markup.get())
throw std::bad_alloc();
57 :m_markup(o.m_markup),m_selectexpr(o.m_selectexpr){}
60 strus::Reference<TagAttributeMarkupInterface> m_markup;
61 std::string m_selectexpr;
73 std::string
markupDocumentTags(
const analyzer::DocumentClass& documentClass,
const std::string& content,
const std::vector<DocumentTagMarkupDef>& markups,
const TextProcessorInterface* textproc, ErrorBufferInterface* errorhnd);
DocumentTagMarkupDef(TagAttributeMarkupInterface *markup_, const std::string &selectexpr_)
Constructor.
Definition: markup_document_tags.hpp:45
virtual ~TagAttributeMarkupInterface()
Definition: markup_document_tags.hpp:32
Structure describing the MIME type plus some attributes that could be relevant for analysis of a docu...
const TagAttributeMarkupInterface * markup() const
implementation of the markup generation
Definition: markup_document_tags.hpp:40
const std::string & selectexpr() const
expression selecting the tag or sibling attribute to markup with a new attribute
Definition: markup_document_tags.hpp:42
Definition: markup_document_tags.hpp:36
DocumentTagMarkupDef(const DocumentTagMarkupDef &o)
Copy constructor.
Definition: markup_document_tags.hpp:56
Structure describing a document attribute.
Definition: documentAttribute.hpp:20
DocumentTagMarkupDef(const strus::Reference< TagAttributeMarkupInterface > &markup_, const std::string &selectexpr_)
Definition: markup_document_tags.hpp:50
std::string markupDocumentTags(const analyzer::DocumentClass &documentClass, const std::string &content, const std::vector< DocumentTagMarkupDef > &markups, const TextProcessorInterface *textproc, ErrorBufferInterface *errorhnd)
Analyze a content and put markups on every tag matching an expression.
virtual strus::analyzer::DocumentAttribute synthesizeAttribute(const std::string &tagname, const std::vector< strus::analyzer::DocumentAttribute > &attributes) const =0
Definition: markup_document_tags.hpp:29
Structure describing a document attribute.