Re: [Zope] rss compliant blog
First of all, please let's keep the list in the loop; they may be of help too. On Thu, Oct 30, 2003 at 04:19:50PM -0500, Katie Legere wrote:
I put my site through, thanks for the link. Unfortunately I get this error:
-----
The XML page cannot be displayed Cannot view XML input using XML style sheet. Please correct the error and then click the Refresh button, or try again later.
---------------------------------------------------------------------------- ----
A name contained an invalid character. Line 19, Position 88
<dtml-in expr="objectValues('DTML Document')" sort="bobobase_modification_time" reverse>
----------
This sounds like the template itself, not the processed result is being fed to the validator. Are you sure you are not pointing to the template source?
So I'm assuming that the dtml is what's giving me trouble. I *thought* I was following the Zope instructions for this though - can I not make a xml / rss compliant feed that includes the dtml??
You can make valid RSS output using DTML, if that is what you mean. Do remember that the DTML tags are instructions to Zope DTML objects to do something specific there; DTML tags have no meaning to RSS processors, only the *result* of the tags after DTML processing. Personally, I use ZPT for XML output; it flows more naturally. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
Oops, sorry, I thought I'd cc'd the list. The file I ran through the validator was the xml file (entries xml - below) The file I'm pointing to in my xml document is the one I want to aggregate <?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="2.0"> <channel> <title>KFPL on Zope</title> <link>http://192.168.10.73/kfplsite</link> <description>Kingston Frontenac Public Library Site</description> <language>en-us</language> <image> <title>homepic.JPG</title> <url>http://192.168.10.73/kfplsite/images/homepic.JPG</url> <link>http://192.168.10.73/kfplsite</link> <width>60</width> <height>43</height> </image> <dtml-in expr="objectValues('DTML Document')" sort="bobobase_modification_time" reverse> <item> <title> Central Blog </title> <link> http://192.168.10.73/staffnet/blog </link> <description><dtml-var document_src html_quote> Submitted by: <dtml-var staff_name html_quote null="Anonymous"> on: <dtml-var bobobase_modification_time fmt=aCommon> </description> </item> </dtml-in> </channel> </rss> I *thought* that I would be validating the xml file for rss compliance... Do I put the 'destination file' ( http://192.168.10.73/staffnet/blog ) in the validator? Kate -----Original Message----- From: Martijn Pieters [mailto:mj@zope.com] Sent: October 30, 2003 4:32 PM To: Katie Legere Cc: zope@zope.org Subject: Re: [Zope] rss compliant blog First of all, please let's keep the list in the loop; they may be of help too. On Thu, Oct 30, 2003 at 04:19:50PM -0500, Katie Legere wrote:
I put my site through, thanks for the link. Unfortunately I get this error:
-----
The XML page cannot be displayed Cannot view XML input using XML style sheet. Please correct the error and then click the Refresh button, or try again later.
-------------------------------------------------------------------------- -- ----
A name contained an invalid character. Line 19, Position 88
<dtml-in expr="objectValues('DTML Document')" sort="bobobase_modification_time" reverse>
----------
This sounds like the template itself, not the processed result is being fed to the validator. Are you sure you are not pointing to the template source?
So I'm assuming that the dtml is what's giving me trouble. I *thought* I was following the Zope instructions for this though - can I not make a xml / rss compliant feed that includes the dtml??
You can make valid RSS output using DTML, if that is what you mean. Do remember that the DTML tags are instructions to Zope DTML objects to do something specific there; DTML tags have no meaning to RSS processors, only the *result* of the tags after DTML processing. Personally, I use ZPT for XML output; it flows more naturally. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
On Thu, Oct 30, 2003 at 04:49:42PM -0500, Katie Legere wrote:
Oops, sorry, I thought I'd cc'd the list.
The file I ran through the validator was the xml file (entries xml - below)
The file I'm pointing to in my xml document is the one I want to aggregate
<?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="2.0">
<channel> <title>KFPL on Zope</title> <link>http://192.168.10.73/kfplsite</link> <description>Kingston Frontenac Public Library Site</description> <language>en-us</language>
<image> <title>homepic.JPG</title> <url>http://192.168.10.73/kfplsite/images/homepic.JPG</url> <link>http://192.168.10.73/kfplsite</link> <width>60</width> <height>43</height> </image>
<dtml-in expr="objectValues('DTML Document')" sort="bobobase_modification_time" reverse> <item> <title> Central Blog </title> <link> http://192.168.10.73/staffnet/blog </link> <description><dtml-var document_src html_quote> Submitted by: <dtml-var staff_name html_quote null="Anonymous"> on: <dtml-var bobobase_modification_time fmt=aCommon> </description> </item> </dtml-in>
</channel> </rss>
I *thought* that I would be validating the xml file for rss compliance... Do I put the 'destination file' ( http://192.168.10.73/staffnet/blog ) in the validator?
Again, this code snippet includes the uninterpreted DTML code; RSS validators do not know what to do with it. This is where ZPT has it's strengths; ZPT code is embedded as namespaced attributes, and most, if not all, RSS parsers (including validators) will skip over the ZPT instructions. Not so for DTML though. You XML code contains DTML instructions ('<dtml-in ...>), which is not considered valid RSS. Once Zope has processed the DTML it'll output valid RSS (or so we hope). That *output* should be fed to a RSS validator. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
Ok I give. What am I outputting to in this case? (Once Zope has processed the DTML it'll output valid RSS (or so we hope). That *output* should be fed to a RSS validator.) I know I'm being dense here. Kate -----Original Message----- From: Martijn Pieters [mailto:mj@zope.com] Sent: October 31, 2003 12:10 PM To: Katie Legere Cc: Zope Subject: Re: [Zope] rss compliant blog On Thu, Oct 30, 2003 at 04:49:42PM -0500, Katie Legere wrote:
Oops, sorry, I thought I'd cc'd the list.
The file I ran through the validator was the xml file (entries xml - below)
The file I'm pointing to in my xml document is the one I want to aggregate
<?xml version="1.0" encoding="ISO-8859-1" ?> <rss version="2.0">
<channel> <title>KFPL on Zope</title> <link>http://192.168.10.73/kfplsite</link> <description>Kingston Frontenac Public Library Site</description> <language>en-us</language>
<image> <title>homepic.JPG</title> <url>http://192.168.10.73/kfplsite/images/homepic.JPG</url> <link>http://192.168.10.73/kfplsite</link> <width>60</width> <height>43</height> </image>
<dtml-in expr="objectValues('DTML Document')" sort="bobobase_modification_time" reverse> <item> <title> Central Blog </title> <link> http://192.168.10.73/staffnet/blog </link> <description><dtml-var document_src html_quote> Submitted by: <dtml-var staff_name html_quote null="Anonymous"> on: <dtml-var bobobase_modification_time fmt=aCommon> </description> </item> </dtml-in>
</channel> </rss>
I *thought* that I would be validating the xml file for rss compliance... Do I put the 'destination file' ( http://192.168.10.73/staffnet/blog ) in the validator?
Again, this code snippet includes the uninterpreted DTML code; RSS validators do not know what to do with it. This is where ZPT has it's strengths; ZPT code is embedded as namespaced attributes, and most, if not all, RSS parsers (including validators) will skip over the ZPT instructions. Not so for DTML though. You XML code contains DTML instructions ('<dtml-in ...>), which is not considered valid RSS. Once Zope has processed the DTML it'll output valid RSS (or so we hope). That *output* should be fed to a RSS validator. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
Katie Legere wrote:
Once Zope has processed the DTML it'll output valid RSS (or so we hope). That *output* should be fed to a RSS validator.
Ok I give. What am I outputting to in this case? I know I'm being dense here.
If I understand the situation and your confusion correctly, Zope does not seem to be interpreting the DTML code before delivering it to the validator for analysis. Katie, the code that you posted, is it embedded in a DTML document or method, or is it embedded in a File object? - Michael Bernstein
Hi Michael (and I am really appreciating the help here) The code posted is in a dtml method saved as entries.xml. There is a dtml document index_html which iterates over entries made by users so all can be seen. There is a form (dtml method) by which a user contributed comments. This calls another dtml method (form_action) which calls a python script The script creates a new dtml document for each entry and sets the parameters and content. Then I have a dtml method which is entries.xml which contained the code that is *supposed* to make the whole shebang rss compliant. --- I've noticed in the Zope book that there is a comment : you might want to set the content-type of the response to text/xml which can be done with this DTML code : <dtml-call expr="RESPONSE.setHeader('content-type', 'text/xml')"> I'm not sure if I need to be adding this or, actually, even where. Kate -----Original Message----- From: Michael Bernstein [mailto:webmaven@lvcm.com] Sent: October 31, 2003 2:59 PM To: Katie Legere Cc: Zope Subject: Re: [Zope] rss compliant blog Katie Legere wrote:
Once Zope has processed the DTML it'll output valid RSS (or so we hope). That *output* should be fed to a RSS validator.
Ok I give. What am I outputting to in this case? I know I'm being dense here.
If I understand the situation and your confusion correctly, Zope does not seem to be interpreting the DTML code before delivering it to the validator for analysis. Katie, the code that you posted, is it embedded in a DTML document or method, or is it embedded in a File object? - Michael Bernstein
participants (3)
-
Katie Legere -
Martijn Pieters -
Michael Bernstein