Implement content declaration.
422671
def do_content(self, element, decl, pseudo):
        """"""
        # FIXME Need?: link(id)
        step = self.state[self.state['current_step']]
        actions = step['actions']

        wastebin = []
        elem = self.current_target().tree
        if elem == element.etree_element or pseudo == 'inside':
            actions.append(('clear', elem))

        if pseudo:
            current_actions = len(actions)
        # decl.value is parsed representation: loop over it
        # if a string, to pending elem - either text, or tail of last child
        # if a string(x) retrieve value from state and attach as tail
        # if a pending(x), do the target/extend dance
        # content() attr(x), link(x,y) etc.
        for term in decl.value:
            if type(term) is ast.WhitespaceToken:
                continue

            elif type(term) is ast.StringToken:
                actions.append(('string', term.value))

            elif type(term) is ast.LiteralToken:
                actions.append(('string', term.value))

            elif type(term) is ast.FunctionBlock:
                if term.name == 'string':
                    str_args = split(term.arguments, ',')
                    str_name = self.eval_string_value(element,
                                                      str_args[0])[0]
                    val = self.lookup('strings', str_name)
                    if val == '':
                        if len(str_args) > 1:
                            val = self.eval_string_value(element,
                                                         str_args[1])[0]
                        else:
                            log(WARN, u"{} blank string"
                                .format(str_name).encode('utf-8'))
                    if val != '':
                        actions.append(('string', val))

                elif term.name == 'counter':
                    counterargs = [serialize(t).strip(" \'")
                                   for t in split(term.arguments, ',')]
                    count = self.lookup('counters', counterargs)
                    actions.append(('string', (count,)))

                elif term.name.startswith('target-'):
                    target_args = split(term.arguments, ',')
                    vref = self.eval_string_value(element,
                                                  target_args[0])[0]
                    vname = self.eval_string_value(element,
                                                   target_args[1])[0]

                    vtype = term.name[7:]+'s'
                    actions.append(('string', [TargetVal(self, vref[1:],
                                                         vname, vtype)]))

                elif term.name == u'attr':
                    att_args = split(term.arguments, ',')
                    att_name = self.eval_string_value(element,
                                                      att_args[0])[0]
                    att_def = ''
                    if len(att_args) > 1:
                        att_def = self.eval_string_value(element,
                                                         att_args[1])[0]
                    if '|' in att_name:
                        ns, att = att_name.split('|')
                        try:
                            ns = self.css_namespaces[ns]
                        except KeyError:
                            log(WARN, u"Undefined namespace prefix {}"
                                .format(ns).encode('utf-8'))
                            continue
                        att_name = etree.QName(ns, att)
                    att_val = element.etree_element.get(att_name, att_def)
                    actions.append(('string', att_val))

                elif term.name == u'uuid':
                    actions.append(('string', self.generate_id()))

                elif term.name == u'first-letter':
                    tmpstr = self.eval_string_value(element, term.arguments)
                    if tmpstr:
                        actions.append(('string', tmpstr[0]))

                elif term.name == u'content':
                    if pseudo in ('before', 'after'):
                        mycopy = copy_w_id_suffix(element.etree_element)
                        actions.append(('content', mycopy))
                    elif pseudo == 'outside':
                        actions.append(('move', element.etree_element))
                    else:
                        actions.append(('content', None))

                elif term.name == 'pending':
                    target = serialize(term.arguments)
                    val, val_step = self.lookup('pending', target)
                    if val is None:
                        log(INFO, u"{} empty bucket".format(
                            target).encode('utf-8'))
                        continue
                    actions.extend(val)
                    del self.state[val_step]['pending'][target]

                elif term.name == 'nodes':
                    target = serialize(term.arguments)
                    val, val_step = self.lookup('pending', target)
                    if val is None:
                        log(INFO, u"{} empty bucket".format(
                            target).encode('utf-8'))
                        continue
                    for action in val:
                            if action[0] == 'move':
                                actions.append(('nodeset', action[1]))
                            else:
                                actions.append(action)

                elif term.name == u'clear':
                    target = serialize(term.arguments)
                    val, val_step = self.lookup('pending', target)
                    if val is None:
                        log(INFO, u"{} empty bucket".format(
                            target).encode('utf-8'))
                        continue
                    wastebin.extend(val)
                    del self.state[val_step]['pending'][target]

                else:
                    log(WARN, u"Unknown function {}".format(
                        term.name).encode('utf-8'))
            else:
                log(WARN, u"Unknown term {}".format(
                    term).encode('utf-8'))

        if pseudo:
            if len(actions) == current_actions:
                wastebin.append(('move', elem))

        if len(wastebin) > 0:
            trashbucket = etree.Element('div',
                                        attrib={'class': 'delete-me'})
            if actions[-1][0] == 'target':
                actions.pop()
            actions.append(('target', Target(trashbucket)))
            actions.extend(wastebin)
            wastebin = []
1032769
def p_content(self, content):
        ''''''
        content[0] = self.doctype(content[1], content[3], content[4], content[5])
        if self.toc:
            self.toc.set_articles([a for a in content[0].sections if isinstance(a, Article)])
825904
def content(self, value):
        
        value = self._prepend_seperator(value)
        self._content = value
967221
public function sendContent()
    {
        if (!is_null($this->contentCallback)) {
            $callback = new Callback($this->contentCallback);
            $callback->execute();
        }
        echo $this->content;
    }
631555
public void setContent(IContent content)
	{
		this.content = content;
		content.setParent(this);
		content.setPosition(Position.middleCenter(content).plus(offsetPosition));
	}
798427
function commitContent()
		{
			var args = arguments;
			var inlineStyleField = this.getContentElement( 'advanced', 'txtdlgGenStyle' );
			inlineStyleField && inlineStyleField.commit.apply( inlineStyleField, args );

			this.foreach( function( widget )
			{
				if ( widget.commit &&  widget.id != 'txtdlgGenStyle' )
					widget.commit.apply( widget, args );
			});
		}
1167604
def add_content(self, text=None, *markdown_files):
        """"""
        for markdown_file in markdown_files:
            self.markdown_text += self._text_file(markdown_file)

        if text:
            self.markdown_text += text
18450
@JsonIgnore
    public void encodeAndSetContent(String content) {
        encodeAndSetContent(content != null ? content.getBytes() : null);
    }
440668
public function initializeContentAreas()
    {
        $content = $this->_getContent();

        foreach ($content as $contentAreaDefintion)
        {
            $contentArea = new ContentArea($contentAreaDefintion);

            $this->_contentAreas[$contentArea->id] = $contentArea;
        }
    }
477221
def content(self, contents):
        
        if isinstance(contents, list):
            for c in contents:
                self.add_content(c)
        else:
            self.add_content(contents)
477086
def setContentFor(self, widget):
        """"""
        for i in range(self.count()):
            item = self.widget(i)
            if widget.isStatic:
                item.setStaticContent(widget)
            else:
                item.setContent(widget)
316824
def setContent(self, type_, value):
        

        if type_ in [self.CONTENT_TYPE_TXT, self.CONTENT_TYPE_URL,
                     self.CONTENT_TYPE_FILE]:
            if type_ == self.CONTENT_TYPE_FILE:
                self._file = {}
                self._file = {'doc': open(value, 'rb')}
            else:
                self.addParam(type_, value)
1200028
public final void setContent(byte[] content)
    {
        //clear non relevant flags
        this.contentString=null;
        this.contentParts=null;
        this.contentType=ContentType.BINARY;

        if(content==null)
        {
            this.contentBinary=null;
        }
        else
        {
            this.contentBinary=content.clone();
        }
    }
563443
def write(self, content):
        """"""
        with io.open(self.target, 'w', encoding='utf-8') as fp:
            fp.write(content)
            if not content.endswith(u'\n'):
                fp.write(u'\n')
867526
function(id, file, content, fm) {
				initImgTag.call(this, id, file, content, fm);
			}
85764
void addLiteral(Token literalContent) {
    checkArgument(literalContent.kind == SoyFileParserConstants.LITERAL_RAW_TEXT_CONTENT);

    maybeFinishBasic();
    // Note: the LITERAL_RAW_TEXT_CONTENT already has the correct image content (it matches the
    // closing {/literal} but excludes the actual closing tag).
    if (!literalContent.image.isEmpty()) {
      append(literalContent, literalContent.image);
    }
    discontinuityReason = Reason.LITERAL;
  }
610586
def content_tag(tag, content, **options)
      attrs = options.map { |kind, value| %{ #{kind}="#{value}"} }.join
      "<#{tag}#{attrs}>#{content}</#{tag}>"
    end