Ok, now I've been searching the life out of myself for a solution to this in the archives, so I hope you forgive me for posting this question. My very basic problem is that I don't understand ho to access the values of XML attributes from "inside" a template handling the presentation of it.
I have a feed with XML from this (test) source:
http://publish.ne.cision.com/Release/ListReleasesSortedByPublishDate/?pageSize=5&feedUniqueIdentifier=de922714f9 resulting in this output:
<[b]Releases[/b] xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://publish.ne.cision.com/Schemas/releaselist.xsd" PageIndex="1" PageSize="5" TotalHits="24" SearchTime="0">
<[b]Release[/b] Id="355323" InformationType="PRM" PublishDateUtc="2011-06-07T15:04:39" LastChangeDateUtc="2011-06-07T15:04:54" LanguageCode="sv" CountryCode="se" [b]DetailUrl[/b]="http://publish.ne.cision.com/Release/GetDetail/CCD08C8DD62DBB54" [b]CisionWireUrl[/b]="http://news.cision.com/se/test-it-leverans/r/test-rubrik,c9131635" LogoUrl="" SourceId="42255" [b]RawHtmlUrl[/b]="http://publish.ne.cision.com/Release/ViewReleaseHtml/CCD08C8DD62DBB54">
<SyndicatedUrl><![CDATA[]]></SyndicatedUrl>
<[b]SourceName[/b]><![CDATA[Test_IT_Leverans]]></SourceName>
<SeOrganizationNumber></SeOrganizationNumber>
<SourceIsListed>false</SourceIsListed>
<IptcCode>00000000</IptcCode>
<CustomerReference><![CDATA[]]></CustomerReference>
<[b]Title[/b]><![CDATA[Test Rubrik]]></Title>
<[b]Intro[/b]><![CDATA[Testutskick med bilder, videor, kategorier och taggar]]></Intro>
<LanguageVersions CommonId="895055" />
...
</Release>
</Releases>
My very basic problem is that I don't understand ho to access the values of XML attributes (like DetailUrl, CisionWireUrl and RawHtmlUrl) from within the template of Release.
Inside of Release.tpl, I can access Title, Intro, SourceName and the other XML values (using [+TITLE+], etc), but what is the syntax for accessing the XML attributes? Can it be done?
I *can* access the XML attributes from the template scope enclosing the Release.tpl, by using [+RELEASE.DETAILURL+], [+RELEASE.1.CISIONWIREURL+], etc.
I was hoping to do this quite declaratively without coding.
My Releases.tpl looks like this:
<H2>(Releases.tpl)</h2>
<li> <b>ATTRIBUTES 1</b>
<li>RELEASE.INFORMATIONTYPE: [+RELEASE.INFORMATIONTYPE+]
<li>RELEASE.LASTCHANGEDATEUTC: [+RELEASE.LASTCHANGEDATEUTC+]
<li>RELEASE.TITLE: [+RELEASE.TITLE+]
<li>RELEASE.SOCIALMEDIAPITCH: [+RELEASE.SOCIALMEDIAPITCH+]
<li>RELEASE.DETAILURL: [+RELEASE.DETAILURL+]
<li>RELEASE.CISIONWIREURL: [+RELEASE.CISIONWIREURL+]
<li>RELEASE.RAWHTMLURL: [+RELEASE.RAWHTMLURL+]
{{RELEASE->Release}}
And Release.tpl looks like this:
<li> (Release.tpl)RELEASE.PUBLISHDATEUTC: [+RELEASE.PUBLISHDATEUTC+]
<ul>
<li> <b>VALUES</b>
<li> TITLE: [+TITLE+]
<li> <b>ATTRIBUTES 1</b>
<li>RELEASE.DETAILURL: [+RELEASE.DETAILURL+]
<li>RELEASE.CISIONWIREURL: [+RELEASE.CISIONWIREURL+]
<li>RELEASE.RAWHTMLURL: [+RELEASE.RAWHTMLURL+]
</ul>
And the result is something like this:
(RELEASES.TPL)
ATTRIBUTES 1
RELEASE.INFORMATIONTYPE: PRM
RELEASE.LASTCHANGEDATEUTC: 2011-06-07T15:04:54
RELEASE.TITLE:
RELEASE.SOCIALMEDIAPITCH:
RELEASE.DETAILURL: http://publish.ne.cision.com/Release/GetDetail/CCD08C8DD62DBB54
RELEASE.CISIONWIREURL: http://news.cision.com/se/test-it-leverans/r/test-rubrik,c9131635
RELEASE.RAWHTMLURL: http://publish.ne.cision.com/Release/ViewReleaseHtml/CCD08C8DD62DBB54
(Release.tpl)RELEASE.PUBLISHDATEUTC:
VALUES
TITLE: Test Rubrik
LINK:
ATTRIBUTES 1
RELEASE.DETAILURL:
RELEASE.CISIONWIREURL:
RELEASE.RAWHTMLURL:
And as you see, the values of for instance [+RELEASE.DETAILURL+] works fine in Releases.tpl, but is empty in Release.tpl.
Is there a way to access it from Release.tpl? What is the syntax for that?
Many thanks in advance for any hints.