Olá, tentei, mas deu erro conforme traceback[1]. Tá dificil colocar
esse corpo da noticia dentro do XSL do RSS...

Vejam como estou fazendo o rss_template:

<!-- *************************************************** -->
<?xml version="1.0"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
  xmlns:dc="http://purl.org/dc/elements/1.1/";
  xmlns:syn="http://purl.org/rss/1.0/modules/syndication/";
  xmlns="http://purl.org/rss/1.0/";
  xmlns:tal="http://xml.zope.org/namespaces/tal";
  xmlns:i18n="http://xml.zope.org/namespaces/i18n";
  xmlns:metal="http://xml.zope.org/namespaces/metal";
 >

<metal:block 
    define-macro="master" 
    tal:define="
                    syn context/portal_syndication; 
                    max max_items|python:syn.getMaxItems(here);
                    objects python: objectList[:max]"
    >

<metal:block tal:define="dummy
python:request.RESPONSE.setHeader('Content-Type',
'text/xml;;charset='+context.plone_utils.getSiteEncoding())" />

<channel rdf:about="" tal:attributes="rdf:about request/URL" >
  <title tal:content="context/pretty_title_or_id">The title</title>
  <link tal:content="context/portal_url">http://url.to.portal</link>
  
  <description>
    <metal:block define-slot="description">
       <tal:block content="context/Description">
        Default rss description goes here
        </tal:block>
       </metal:block>
  </description>
  
  
  <tal:comment replace="nothing">
    The syndication tool is pretty brain dead and won't let you access
the variables
    you need for this from something like search_rss, unless you've
enable site syndication
    it really needs rewriting.
  </tal:comment>
  <metal:block define-slot="syndication" />
  
  <image
    rdf:resource=""
    tal:attributes="rdf:resource
string:${context/portal_url}/${context/base_properties/logoName}" />

  <items>
    <rdf:Seq>
        <tal:block repeat="obj_item python: objects">
            <rdf:li rdf:resource=""
                tal:attributes="rdf:resource
obj_item/getURL|obj_item/absolute_url" />
        </tal:block>
    </rdf:Seq>
  </items>

</channel>

<tal:block repeat="brain python: objects">
    <item rdf:about="" tal:attributes="rdf:about
obj_item/getURL|obj_item/absolute_url" tal:define="obj_item
brain/getObject|nocall:brain">        
    <title tal:content="obj_item/pretty_title_or_id">Title</title>
    <link tal:content="obj_item/Identifier">Identifier</link>
    <description
tal:content="obj_item/Description">Description</description>
    
    <!-- AQUI TENTO MOSTRAR O CORPO DA NOTICIA -->
        <body>
        <metal:block define-slot="body">
                <tal:block content="python:obj_item.CookedBody(stx_level2)">
                Default rss corpo goes here
                </tal:block>
        </metal:block>
        </body>

    <dc:publisher
tal:content="obj_item/Publisher">Publisher</dc:publisher>
    <dc:creator tal:content="obj_item/Creator">Creator</dc:creator>
    <dc:rights tal:content="obj_item/Rights">Rights</dc:rights>
    <tal:block tal:repeat="item obj_item/Subject">    
    <dc:subject tal:content="item">Item</dc:subject>
</tal:block>        

    <dc:date tal:content="python:
obj_item.modified().HTML4()">Modification date</dc:date>
    <dc:type tal:content="obj_item/Type">Type</dc:type>
</item>

</tal:block>

</metal:block>
</rdf:RDF>


<!-- *************************************************** -->

[1] TRACEBACK:

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Shared.DC.Scripts.Bindings, line 306, in __call__
  Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 195, in _exec
  Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
  Module Products.PageTemplates.PageTemplate, line 96, in pt_render
   - <FSPageTemplate at /Plone/search_rss used for
/Plone/gerencias/pasta-teste>
  Module TAL.TALInterpreter, line 190, in __call__
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 671, in do_useMacro
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 613, in do_loop_tal
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 702, in do_defineSlot
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 409, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in do_optTag
  Module TAL.TALInterpreter, line 389, in no_tag
  Module TAL.TALInterpreter, line 234, in interpret
  Module TAL.TALInterpreter, line 484, in do_insertText_tal
  Module Products.PageTemplates.TALES, line 227, in evaluateText
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: /Plone/rss_template
   - Expression: <PythonExpr obj_item.CookedBody(stx_level2)>
   - Names:
      {'container': <PloneSite instance at 029DD080>,
       'context': <ATFolder instance at 1158C200>,
       'default': <Products.PageTemplates.TALES.Default instance at
0x00F2CA08>,
       'here': <ATFolder instance at 1158C200>,
       'loop': <SafeMapping instance at 081EE210>,
       'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0x00F32DA0>,
       'nothing': None,
       'options': {'args': ()},
       'repeat': <SafeMapping instance at 081EE210>,
       'request': <HTTPRequest,
URL=http://cliquecagece/gerencias/pasta-teste/search_rss>,
       'root': <Application instance at 0390A140>,
       'template': <FSPageTemplate at /Plone/search_rss used for
/Plone/gerencias/pasta-teste>,
       'traverse_subpath': [],
       'user': admin}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: obj_item.CookedBody(stx_level2)
  Module Python expression "obj_item.CookedBody(stx_level2)", line 1,
in <expression>
NameError: name 'stx_level2' is not defined

******************************************************************
Abraços,

Robson Virino





--- Em zope-pt@yahoogrupos.com.br, "Wilton Alencar" <[EMAIL PROTECTED]>
escreveu
>
>  <corpo>
> <metal:block define-slot="corpo">
> <tal:block content="python:context.CookedBody(stx_level2)">
> Default rss corpo goes here
> </tal:block>
> </metal:block>
> </corpo>
> 
> Taí,
> cheque se pode usar tags customizadas no RSS padrão rdf, talvez
tenha que
> usar algo como body ou content na tag ao invés de corpo, observe
também se
> está com item na mão, senão o cookedbody não funcionará.
> Abraços
> TOM
> Em 27/06/07, Robson Virino <[EMAIL PROTECTED]> escreveu:
> >
> >   Olá amigos,
> >
> > Quando crio, por exemplo, três notícias em uma pasta, e mando gerar um
> > XML pelo link RSS, vêm tags XML contendo o titulo da noticia,
> > descrição e seu link.
> >
> > Gostaria de neste XML, poder colocar mais uma tag <corpo> contendo o
> > conteúdo completo da notícia...
> >
> > Lá no Rss_template, tem para a criação da tag <description>:
> > ...
> > <description>
> > <metal:block define-slot="description">
> > <tal:block content="context/Description">
> > Default rss description goes here
> > </tal:block>
> > </metal:block>
> > </description>
> > ...
> > <description
tal:content="obj_item/Description">Description</description>
> > ...
> >
> > O que eu faço para entrar uma tag <corpo>?
> > Lembrando que na noticia, o corpo é chamado por
> > python:CookedBody(stx_level2)...
> >
> > Obrigado, amigos!
> >
> >  
> >
> 
> 
> 
> -- 
> Cordialmente,
> Wilton Souza Alencar
> www.tom.pro.br
>


Responder a