I’m working on trying to set up an NITF feed, which is a feed similar to RSS but is a standard (apparently) for news organizations. I don’t believe I have an option for doing it differently, so NITF it is. I tried creating something similar to the specs for RSS, but without luck. Here’s the template, which I created as an RSS template:
{assign_variable:master_weblog_name="news"}
{exp:rss:feed weblog="{master_weblog_name}"}
<?xml version="1.0" encoding="UTF-8" ?>
<nitf version="-//IPTC//DTD NITF 3.3//EN" xmlns:extra="urn:extra-functions">
<head>
<title>{exp:xml_encode}{weblog_name}{/exp:xml_encode}</title>
<docdata management-status="usable">
<doc-id id-string="{gmt_entry_date format="%H%i%sZ"}" regsrc="ABCD" >
<urgency ed-urg="2" >
<date.issue norm="{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}" >
<date.release norm="{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}" >
<du-key generation="1" key="GN3;52734534997;AA.4" >
<doc.copyright holder="JT Media" >
<key-list>
<keyword key="" >
</key-list>
</docdata>
</head>
<body>
<body.head>{exp:xml_encode}
<hedline>
<hl1>{title}</hl1>
{!-- <hl2 class="kicker">{categories backspace="1"}{category_name}, {/categories}</hl2> --}
<hl2 class="subhead">{summary}</hl2>
</hedline>
<byline>By {stories_author}, {stories_author_title}</byline>
{!-- <dateline>Seattle WA</dateline> --}
<abstract>
{stories_summary}
</abstract>
</body.head>
<body.content>
<block>
{body}
</block>
<block>
<media media-type="image">
<media-producer>{stories_photo_by}</media-producer> <media-caption>{stories_photo_caption}</media-caption> <media-reference
mime-type="image/jpeg">{stories_photo}</media-reference>
</media>
</block>
</body.content>
{/exp:xml_encode}
<body.end />
</body>
</nitf>Here’s the error I get:
XML Parsing Error: not well-formed
Location: <a href="http://www.jtnews.net/index.php?/subscribe/nitf_news/">http://www.jtnews.net/index.php?/subscribe/nitf_news/</a>
Line Number 6, Column 44:<doc-id id-string="{gmt_entry_date format="%H%i%sZ"}" regsrc="ABCD" >
-------------------------------------------^The little up arrow, though you can’t tell from here, with the monospaced text goes up to the EE date formatting.
And here’s the page source when I try to view it:
<?xml version="1.0" encoding="UTF-8" ?>
<nitf version="-//IPTC//DTD NITF 3.3//EN" xmlns:extra="urn:extra-functions">
<head>
<title>{weblog_name}</title>
<docdata management-status="usable">
<doc-id id-string="{gmt_entry_date format="%H%i%sZ"}" regsrc="ABCD" >
<urgency ed-urg="2" >
<date.issue norm="{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}" >
<date.release norm="{gmt_entry_date format="%Y-%m-%dT%H:%i:%s%Q"}" >
<du-key generation="1" key="GN3;52734534997;AA.4" >
<doc.copyright holder="JT Media" >
<key-list>
<keyword key="" >
</key-list>
</docdata>
</head>
<body>
<body.head>{title}
{summary}
By {stories_author}, {stories_author_title}
{stories_summary}
{body}
{stories_photo_by} {stories_photo_caption} {stories_photo}
<body.end />
</body>
</nitf>Thoughts?