xsl help please

hi all

would be grateful for any help - have been trying to get this to work for 2 days - think it is probably something simple but have been looking at it for too long. i have the following code

		<xsl:variable name="article" select="document(landing-page)/*/body//a[1]/@href"/>
      	<xsl:variable name="articleXML">
	      	<xsl:call-template name="replace">
			<xsl:with-param name="string" select="$article" />
			<xsl:with-param name="pattern">.html</xsl:with-param>
			<xsl:with-param name="replacement">.xml</xsl:with-param>
	        </xsl:call-template>
	      </xsl:variable>
		<xsl:value-of select="document($articleXML)//teaser" />

This gets the 1st href in the body of the landing page, then replaces the html in href with xml so that i can get at the xml elements of the page. I have testing by outputting the value of each variable to the page and they are identical except for html/xml. The last line is meant to look at the xml document and give me the value of the teaser element. However, this line causes a StringIndexOutOfBoundsException. I just can’t work this out and see what is wrong.

would be grateful for any help.

thanks
michelle

Hi Michelle

What’s the format of the teaser node? Is it just text or structured XML?

Can you provide an example?

Cheers
James

Hi james

teaser is like this

<teaser>Travelling between Dover and Calais is simple and convenient, with up to 46 sailings a day.</teaser>

thanks
michelle

Hi Michelle

Can you let me know the values of $article, $articleXML and also the backend XML for $articleXML please?

Cheers
James

hi jimbo

$article=
http://chs85ecm.dover.poits.net:9992/Rhythmyx/PO_article_cas/page_assembler.html?sys_revision=46&sys_siteid=309&sys_context=0&sys_authtype=0&sys_contentid=1392&sys_variantid=693

$articleXML=
http://chs85ecm.dover.poits.net:9992/Rhythmyx/PO_article_cas/page_assembler.xml?sys_revision=46&sys_siteid=309&sys_context=0&sys_authtype=0&sys_contentid=1392&sys_variantid=693

xml=

<?xml version="1.0" encoding="utf-8"?>
<whitebox classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,2,4" implementation_version="1.4.2_04" query="http://127.0.0.1:9992/Rhythmyx/PO_pressrelease_auto/po_PressReleases.xml?sys_siteid=309&sys_authtype=0&sys_variantid=462&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_context=0" search_engine_available="no" selective_view_refresh="yes" version_type="version" xml:lang="en-us">
   <sys_AssemblerInfo previewurl="/Rhythmyx/PO_article_cas/page_assembler.txt" pssessionid="7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed" psxglobaltemplate="NEWPOTouristGlobalTemplate" sys_authtype="0" sys_contentid="1392" sys_context="0" sys_folderid="1050" sys_originalsiteid="309" sys_revision="46" sys_siteid="309" sys_variantid="693">
      <RelatedContent>
         <infourls UserAgent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)" actionlisturl="http://127.0.0.1:9992/Rhythmyx/sys_uiSupport/ActionList.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_mode=Site+Centric" activeiteminfourl="http://127.0.0.1:9992/Rhythmyx/sys_rcSupport/activeitem.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed" contentstatusurl="http://127.0.0.1:9992/Rhythmyx/sys_uiSupport/contentstatus.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed" rxinboxurl="http://127.0.0.1:9992/Rhythmyx/sys_ComponentSupport/componentabslink.xml?sys_componentname=cx_main&sys_debug=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed" userstatusurl="http://127.0.0.1:9992/Rhythmyx/sys_ceSupport/UserStatus.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed"/>
         <linkurl contentid="5337" relateditemid="106235" rxcontext="0" slotid="324" slotname="Panel 3 Across" sys_authtype="0" sys_folderid="" sys_originalSiteid="309" sys_siteid="" variantid="740">
            <Value current="http://127.0.0.1:9992/Rhythmyx/PO_freetext_cas/snippet_assembler.html?relateditemid=106235&sys_revision=43&sys_siteid=309&sys_authtype=0&sys_activeitemid=&sys_contentid=5337&sys_variantid=740&sys_command=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_originalsiteid=309&sys_folderid=&sys_context=0&sys_assemblylevel=1"/>
         </linkurl>
         <linkurl contentid="4665" relateditemid="106237" rxcontext="0" slotid="326" slotname="Image 208x380" sys_authtype="0" sys_folderid="" sys_originalSiteid="309" sys_siteid="" variantid="429">
            <Value current="http://127.0.0.1:9992/Rhythmyx/PO_image_cas/snippet_assembler.html?relateditemid=106237&sys_revision=1&sys_siteid=309&sys_authtype=0&sys_activeitemid=&sys_contentid=4665&sys_variantid=429&sys_command=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_originalsiteid=309&sys_folderid=&sys_context=0&sys_assemblylevel=1"/>
         </linkurl>
         <linkurl contentid="14989" relateditemid="106236" rxcontext="0" slotid="325" slotname="CrossRef" sys_authtype="0" sys_folderid="" sys_originalSiteid="309" sys_siteid="" variantid="687">
            <Value current="http://127.0.0.1:9992/Rhythmyx/PO_freetext_cas/snippet_assembler.html?relateditemid=106236&sys_revision=1&sys_siteid=309&sys_authtype=0&sys_activeitemid=&sys_contentid=14989&sys_variantid=687&sys_command=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_originalsiteid=309&sys_folderid=&sys_context=0&sys_assemblylevel=1"/>
         </linkurl>
         <linkurl contentid="15102" relateditemid="106238" rxcontext="0" slotid="325" slotname="CrossRef" sys_authtype="0" sys_folderid="" sys_originalSiteid="309" sys_siteid="" variantid="428">
            <Value current="http://127.0.0.1:9992/Rhythmyx/PO_freetext_cas/snippet_assembler.html?relateditemid=106238&sys_revision=4&sys_siteid=309&sys_authtype=0&sys_activeitemid=&sys_contentid=15102&sys_variantid=428&sys_command=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_originalsiteid=309&sys_folderid=&sys_context=0&sys_assemblylevel=1"/>
         </linkurl>
         <linkurl contentid="1196" rxcontext="0" slotid="387" slotname="nav_leftNEW" variantid="689">
            <Value current="http://127.0.0.1:9992/Rhythmyx/rxs_Navon_cas/navontree.html?sys_revision=2&nav_theme=ei&sys_siteid=309&sys_authtype=0&sys_contentid=1196&sys_variantid=689&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_context=0"/>
         </linkurl>
         <linkurl contentid="1196" rxcontext="0" slotid="312" slotname="nav_breadcrumb" variantid="445">
            <Value current="http://127.0.0.1:9992/Rhythmyx/rxs_Navon_cas/navontree.html?sys_revision=2&nav_theme=ei&sys_siteid=309&sys_authtype=0&sys_contentid=1196&sys_variantid=445&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_context=0"/>
         </linkurl>
         <linkurl contentid="1196" rxcontext="0" slotid="388" slotname="nav_TopPONew" variantid="692">
            <Value current="http://127.0.0.1:9992/Rhythmyx/rxs_Navon_cas/navontree.html?sys_revision=2&nav_theme=ei&sys_siteid=309&sys_authtype=0&sys_contentid=1196&sys_variantid=692&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_context=0"/>
         </linkurl>
      </RelatedContent>
      <AssemblerProperties>
   
         <Property name="PO Tourist">
      
            <Value current="../web_resources/POTourist"/>
   
         </Property>
   
         <Property name="rxs_navbase">
      
            <Value current="../web_resources/POTourist"/>
   
         </Property>

      </AssemblerProperties>
      <InlineLink url="http://127.0.0.1:9992/Rhythmyx/sys_casSupport/PublicationUrl.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_context=0"/>
      <VariantURL url="http://127.0.0.1:9992/Rhythmyx/sys_ceInlineSearch/varianturl.xml?sys_authtype=0&sys_context=0&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed"/>
   </sys_AssemblerInfo>
   <sys_title>timetable DOCA</sys_title>
   <teaser_clickthrough>timetable</teaser_clickthrough>
   <sys_reminderdate/>
   <teaser>Travelling between Dover and Calais is simple and convenient, with up to 46 sailings a day.</teaser>
   <sys_communityid>1010</sys_communityid>
   <sys_workflowid>8</sys_workflowid>
   <strapline>Travelling between Dover and Calais is simple and convenient - with up to 46 sailings a day, there's a cross channel ferry at a time that's right for you</strapline>
   <sys_lang>en-us</sys_lang>
   <page_title>Cross channel ferries - P&O channel ferry timetable</page_title>
   <sys_contentexpirydate/>
   <shared>
      <description>Channel ferry crossing with P&amp;O Ferries; we make travelling between Dover and Calais simple and convenient.  With up to 46 sailings a day, there’s a cross channel ferry at a time that's right for you.</description>
      <keywords>Timetable</keywords>
      <default_variantid>693</default_variantid>
      <body>
         <div class="rxbodyfield">
            <p>If you are looking for channel ferry crossing to France, our extensive timetable will allow you to choose a time and price that's right for you. To find the best value cross Channel ferry for you, you can <a href="/tourist/bookJourney.html">get a quote now »</a>
            </p>
            <p>
               <b>Crossing time:</b> 90 minutes<br/>
               <b>Vehicle check-in:</b> closes 30 mins before departure<br/>
               <b>Foot passenger check-in:</b> closes 45 mins before departure</p>
            <p>For the most accurate timetable and schedule information on the Dover-Calais route, please use our <a href="/tourist/bookJourney.html?routesOut=doca">quick quote</a> facility and select your preferred dates and times of travel.</p>
            <p>
               <span style=" font-size: xx-small;">No sailings on Christmas Day, restricted sailings on Christmas Eve and Boxing Day.<br/>All timetables are subject to change.</span>
            </p>
         </div>
      </body>
      <displaytitle>timetable</displaytitle>
   </shared>
   <sys_contentstartdate>2006-04-07 00:00:00.0</sys_contentstartdate>
   <link>http://chs85ecm.dover.poits.net:9992/Rhythmyx/PO_article_cas/page_assembler.html?sys_revision=46&sys_siteid=309&sys_authtype=0&sys_contentid=1392&sys_variantid=693&sys_folderid=1050&sys_context=0</link>
   <PO_CT_ARTICLE_TANDCSSet>
      <PO_CT_ARTICLE_TANDCS>
         <CONTENTID/>
         <HEADING/>
         <REVISIONID/>
         <SORTRANK/>
         <SYSID/>
         <TEXT/>
      </PO_CT_ARTICLE_TANDCS>
   </PO_CT_ARTICLE_TANDCSSet>
</whitebox>

thanks
michelle

Hi Michelle

Try using:

<xsl:value-of select="document($articleXML)/*/teaser/text()" />

Cheers
James

Hi james

no that didn’t work - still same error. i don’t understand it as i have this working in other areas of my site. The only difference being that i don’t use the document function to the first url. for example, i have this, which works

<xsl:variable name="document_link"><xsl:value-of select="/*/sys_AssemblerInfo/RelatedContent/linkurl[@slotname='ArticleLink']/Value/@current" /></xsl:variable>
      <xsl:variable name="document_link_xml">
      	<xsl:call-template name="replace">
		<xsl:with-param name="string" select="$document_link" />
		<xsl:with-param name="pattern">.html</xsl:with-param>
		<xsl:with-param name="replacement">.xml</xsl:with-param>
        </xsl:call-template>
      </xsl:variable>
      <xsl:variable name="Link"><xsl:value-of select="document($document_link_xml)//link" /></xsl:variable>

cheers
Michelle

Hi Michelle

I think I know what the problem is. You’re using the landing page which is normally populated by a snippet or shared snippet which might not contain your teaser node. Your teaser node might only be assigned to the full page template.

What happens when you preview the $articleXML variable? do you see the correct list of nodes?

Cheers
James

hi james

yes landing page gives me a shared variant but am using the document function to get the html of that and getting the url of the actual page.

the xml below is the xml of $articleXML - so does container the teaser node

cheers
michelle

Hi Michelle

Although this should work in preview it wont work in public/publish. The reason for this is that the href in the landing page snippet template will be transformed to the published url and not a Rhythmyx url.

Cheers
James

hi james

but this doesn’t work in preview either. but are you saying that i cannot do what i am trying to do?

thanks
michelle

Hi Michelle

You can but you have to do it a different way.

Create a node in the backend xml of your snippet template which uses the sys_MakeIntLink (you might also be able to use sys_casGenerateAssemblerLink) and base your $article variable on that. If your snippet is shared then use the default_variantid as the variant. You also shouldn’t need to do the replace either as this link will be XML.

Using sys_casGeneratePubLocation generates the published URL when publishing.

Cheers
James

thanks James

i’ll give that a go now

cheers
michelle

hi james

it seems i already have this node in the shared variant (link in the xml below) - however, i can’t work out how to access it - whatever i try i still get the same StringOutOfBoundsException error. here is the xml from my shared variant.

thanks
michelle

<?xml version="1.0" encoding="utf-8"?>
<s_titlelink classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,2,4" implementation_version="1.4.2_04" search_engine_available="no" selective_view_refresh="yes" version_type="version" xml:lang="en-us">
   <sys_AssemblerInfo previewurl="/Rhythmyx/rxs_Shared_cas/s_shared.txt" pssessionid="7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed" psxglobaltemplate="NEWPOTouristGlobalTemplate" shared_variantid="4" sys_authtype="0" sys_contentid="1392" sys_context="0" sys_originalsiteid="309" sys_revision="46" sys_siteid="309" sys_variantid="449">
      <RelatedContent>
         <infourls UserAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.1.20) Gecko/20081217 Firefox/2.0.0.20" actionlisturl="http://127.0.0.1:9992/Rhythmyx/sys_uiSupport/ActionList.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_mode=Site+Centric" activeiteminfourl="http://127.0.0.1:9992/Rhythmyx/sys_rcSupport/activeitem.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed" contentstatusurl="http://127.0.0.1:9992/Rhythmyx/sys_uiSupport/contentstatus.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed" rxinboxurl="http://127.0.0.1:9992/Rhythmyx/sys_ComponentSupport/componentabslink.xml?sys_componentname=cx_main&sys_debug=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed" userstatusurl="http://127.0.0.1:9992/Rhythmyx/sys_ceSupport/UserStatus.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed"/>
         <linkurl contentid="5337" relateditemid="106235" rxcontext="0" slotid="324" slotname="Panel 3 Across" sys_authtype="0" sys_folderid="" sys_originalSiteid="309" sys_siteid="" variantid="740">
            <Value current="http://127.0.0.1:9992/Rhythmyx/PO_freetext_cas/snippet_assembler.html?relateditemid=106235&sys_revision=43&sys_siteid=309&sys_authtype=0&sys_activeitemid=&sys_contentid=5337&sys_variantid=740&sys_command=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_originalsiteid=309&sys_folderid=&sys_context=0&sys_assemblylevel=1"/>
         </linkurl>
         <linkurl contentid="4665" relateditemid="106237" rxcontext="0" slotid="326" slotname="Image 208x380" sys_authtype="0" sys_folderid="" sys_originalSiteid="309" sys_siteid="" variantid="429">
            <Value current="http://127.0.0.1:9992/Rhythmyx/PO_image_cas/snippet_assembler.html?relateditemid=106237&sys_revision=1&sys_siteid=309&sys_authtype=0&sys_activeitemid=&sys_contentid=4665&sys_variantid=429&sys_command=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_originalsiteid=309&sys_folderid=&sys_context=0&sys_assemblylevel=1"/>
         </linkurl>
         <linkurl contentid="14989" relateditemid="106236" rxcontext="0" slotid="325" slotname="CrossRef" sys_authtype="0" sys_folderid="" sys_originalSiteid="309" sys_siteid="" variantid="687">
            <Value current="http://127.0.0.1:9992/Rhythmyx/PO_freetext_cas/snippet_assembler.html?relateditemid=106236&sys_revision=1&sys_siteid=309&sys_authtype=0&sys_activeitemid=&sys_contentid=14989&sys_variantid=687&sys_command=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_originalsiteid=309&sys_folderid=&sys_context=0&sys_assemblylevel=1"/>
         </linkurl>
         <linkurl contentid="15102" relateditemid="106238" rxcontext="0" slotid="325" slotname="CrossRef" sys_authtype="0" sys_folderid="" sys_originalSiteid="309" sys_siteid="" variantid="428">
            <Value current="http://127.0.0.1:9992/Rhythmyx/PO_freetext_cas/snippet_assembler.html?relateditemid=106238&sys_revision=4&sys_siteid=309&sys_authtype=0&sys_activeitemid=&sys_contentid=15102&sys_variantid=428&sys_command=&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_originalsiteid=309&sys_folderid=&sys_context=0&sys_assemblylevel=1"/>
         </linkurl>
      </RelatedContent>
      <AssemblerProperties>
   
         <Property name="PO Tourist">
      
            <Value current="../web_resources/POTourist"/>
   
         </Property>
   
         <Property name="rxs_navbase">
      
            <Value current="../web_resources/POTourist"/>
   
         </Property>

      </AssemblerProperties>
      <InlineLink url="http://127.0.0.1:9992/Rhythmyx/sys_casSupport/PublicationUrl.xml?pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed&sys_context=0"/>
      <VariantURL url="http://127.0.0.1:9992/Rhythmyx/sys_ceInlineSearch/varianturl.xml?sys_authtype=0&sys_context=0&pssessionid=7d9c1a058546d0fed1d1b45f78c930eb8ef8f7ed"/>
   </sys_AssemblerInfo>
   <shared>
      <callout/>
      <displaytitle>timetable</displaytitle>
   </shared>
   <link>http://chs85ecm.dover.poits.net:9992/Rhythmyx/PO_article_cas/page_assembler.html?sys_revision=46&sys_siteid=309&sys_context=0&sys_authtype=0&sys_contentid=1392&sys_variantid=693</link>
</s_titlelink>

Hi Michelle,

The link in your shared variant still contained a domain name, so it was an external link. This can lead to authentication problems when trying to access that page’s data. Try either changing the shared variant such that it outputs an internal link, or do something like this instead:

<xsl:variable name="articleXML">
    <xsl:if test="contains($article, 'Rhythmyx')">
        <xsl:text>http://127.0.0.1:9992/Rhythmyx</xsl:text>
    </xsl:if>
    <xsl:call-template name="replace">
        <xsl:with-param name="string">
            <xsl:choose>
                <xsl:when test="contains($article, 'Rhythmyx')">
                    <xsl:value-of select="substring-after($article, 'Rhythmyx')"/>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="$article"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:with-param>
        <xsl:with-param name="pattern">.html</xsl:with-param>
        <xsl:with-param name="replacement">.xml</xsl:with-param>
    </xsl:call-template>
</xsl:variable>

Even so, I can’t see how we can expect this to work in Publish, since the article links should not be links back to the CMS server at all. I will give this a tad more thought. Perhaps puting this together with what James suggested would help.

ok i know it has been some time since i opened this thread. however, my previous problem went away as the design i was building changed. however, the problem has cropped up again.

i used the replace function below to change the external link to an internal link and this worked in preview. i was able to access the xml of the page i am interested in and extract the relevant information. however, as predicted when i publish it doesn’t work.

can anyone help with this please? and also explain why it doesn’t work in publish as this is beyond me. perhaps if i understood why it didn’t work i would be more useful in finding a solution.

thanks
michelle

so… let me see if i have this all straight:

  1. you are using page_assembler template.
  2. this content type has a relationship to a second content type / template which you use to create a link to landing-page.
  3. the landing-page link was created by using one of the XML mapper exits like sys_GenerateIntLink().
  4. the data on the rendered landing page has a link containing a reference to a 3rd content item (article) whose data you need to access.

Assumptions I’m making:
A. the landing page link contains a sys_contentid param
B. the content type and template used by the article item are constant (always the same).

Given all this, perhaps your best solution is to create a snippet template for your landing page that outputs the lead article’s teaser. You may additionally need a snippet template for articles that outputs the teaser info by itself as flat text.

So the questions you need to answer are:

  1. How is the body of the landing page generated? Is the article in a slot or is it an inline variant? A slotted item should be relatively easy to pull data from, where an inline variant is more tricky.
  2. How is the link to the landing page generated and is it used anywhere else in this or any of the templates attached to the same query resource (if there are more than one)? Can you change this link or create a new one that changes the sys_context to preview (0)?

See if you can generate a link to a snippet variant for the landing page and use that instead, and have that snippet, similarly output the article’s teaser snippet’s content.

I would need more details (all 3 content types, the 3 existing templates, and the associated db-to-xml mappings) to be able to formulate an exact solution.

hi rushing

thanks for your post - i am going to go through it in more detail but thought i would try to explain what i am trying to do.

my foundation is the navon. I have a navon that does not have a landing page - it is merely being used to create a label for lower level navigation. I need to access the first child of this navon - i then use

<xsl:variable name="linkURL" select="document(navon[1]/landing-page)/*/body//a[1]/@href" />

to get the link to the full landing page - the above “document” is the shared title link variant.

i then use this as suggested in the post below

<xsl:variable name="localLink">
    <xsl:if test="contains($linkURL, 'Rhythmyx')">
        <xsl:text>http://127.0.0.1:9992/Rhythmyx</xsl:text>
    </xsl:if>
    <xsl:call-template name="replace">
        <xsl:with-param name="string">
            <xsl:choose>
                <xsl:when test="contains($linkURL, 'Rhythmyx')">
                    <xsl:value-of select="substring-after($linkURL, 'Rhythmyx')"/>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="$linkURL"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:with-param>
        <xsl:with-param name="pattern">.html</xsl:with-param>
        <xsl:with-param name="replacement">.xml</xsl:with-param>
    </xsl:call-template>
</xsl:variable>

and finally this to get the part of the page i am interested in

<xsl:variable name="strapline" select="document($localLink)//strapline" />
					<xsl:value-of select="$strapline" />

this all works in preview but not in publish. my biggest problem is that i have no understanding of why it works in preview and not in publish. my understanding of the labyrinth that is rx 5.7 is not that great. so i have no way of working this out for myself as i don’t know what the problem is!!!

thanks
michelle

this all works in preview but not in publish. my biggest problem is that i have no understanding of why it works in preview and not in publish. my understanding of the labyrinth that is rx 5.7 is not that great. so i have no way of working this out for myself as i don’t know what the problem is!!!

We are running 6.5.2 so I don’t know if there is a difference in 5.7 but the navon relationship is only published if it is in public and has a page associated with the landing page. Page 300 of the implementation guide states, “If the Navon being processed does not have a landing page, the macro terminates.”

You could test this by assigning a marco and previewing the item and changing the sys_itemfilter parameter to: sys_itemfilter=public.

I’ve never used Navons, myself… so I can’t help you there…

The reason why I initially said it wouldn’t work in prod is because the link on the landing page would no longer point to Rhythmyx data, but to a public location instead… no longer containing enough information to pull the data from a Rhythmyx XML resource.

Check the other attributes and elements of the navon… they may contain a content id. or some other useful data that you can use to directly link to the desired data.