示例#1
0
文件: html.py 项目: renesugar/pyxl
    def _to_list(self, l):
        l.extend((u'<', self.__tag__))
        for name, value in self.__attributes__.iteritems():
            l.extend((u' ', name, u'="', escape(value), u'"'))
        l.append(u'>')

        for child in self.__children__:
            x_base._render_child_to_list(child, l)

        l.extend((u'</', self.__tag__, u'>'))
示例#2
0
    def _to_list(self, l):
        l.extend((u'<', self.__tag__))
        for name, value in self.__attributes__.iteritems():
            l.extend((u' ', name, u'="', escape(value), u'"'))
        l.append(u'>')

        for child in self.__children__:
            x_base._render_child_to_list(child, l)

        l.extend((u'</', self.__tag__, u'>'))
示例#3
0
    def _to_list(self, l):
        # allow '&', escape everything else from cond
        cond = self.__attributes__.get('cond', '')
        cond = '&'.join(map(escape, cond.split('&')))

        l.extend((u'<!--[if ', cond, u']><!-->'))

        for child in self.__children__:
            x_base._render_child_to_list(child, l)

        l.append(u'<!--<![endif]-->')
示例#4
0
    def _to_list(self, l):
        # allow '&', escape everything else from cond
        cond = self.__attributes__.get('cond', '')
        cond = '&'.join(map(escape, cond.split('&')))

        l.extend((u'<!--[if ', cond, u']>'))

        for child in self.__children__:
            x_base._render_child_to_list(child, l)

        l.append(u'<![endif]-->')
示例#5
0
文件: html.py 项目: jboning/pyxl
    def _to_list(self, l):
        # allow '&', escape everything else from cond
        cond = self.__attributes__.get("cond", "")
        cond = "&".join(map(escape, cond.split("&")))

        l.extend((u"<!--[if ", cond, u"]>"))

        for child in self.__children__:
            x_base._render_child_to_list(child, l)

        l.append(u"<![endif]-->")
示例#6
0
文件: rss.py 项目: bitwisecook/pyxl3
    def _to_list(self, l):
        l.extend(('<', self.__tag__))
        for name, value in self.__attributes__.items():
            name, value = self._handle_attribute(name, value)
            l.extend((' ', name, '="', escape(value), '"'))
        l.append('>')

        for child in self.__children__:
            x_base._render_child_to_list(child, l)

        l.extend(('</', self.__tag__, '>'))
示例#7
0
文件: rss.py 项目: pyxl4/pyxl4
    def _to_list(self, l):
        l.extend(('<', self.__tag__))
        for name, value in self.__attributes__.items():
            name, value = self._handle_attribute(name, value)
            l.extend((' ', name, '="', escape(value), '"'))
        l.append('>')

        for child in self.__children__:
            x_base._render_child_to_list(child, l)

        l.extend(('</', self.__tag__, '>'))
示例#8
0
 def _to_list(self, l):
     l.append(u'<dc:creator>')
     for child in self.__children__:
         x_base._render_child_to_list(child, l)
     l.append(u'</dc:creator>')
示例#9
0
文件: rss.py 项目: renesugar/pyxl
 def _to_list(self, l):
     l.append(u'<dc:creator>')
     for child in self.__children__:
         x_base._render_child_to_list(child, l)
     l.append(u'</dc:creator>')