Rx 5.7 create snippet w/o psx markup

looking to create a snippet using xsl only with no psx markup. (see code below)


<!-- begin XSL -->
<xsl:output method="xml" omit-xml-declaration="yes" />
<!-- end XSL -->
<html>
<head>
<title>psx-window_title</title>
<link psx-href="$rxs_navbase/css/Tourist.css" rel="stylesheet" href="css/Tourist.css" type="text/css" />
</head>
<body>
<span class="ContextualHelp">
	<!-- begin XSL -->
	<xsl:value-of select="concat(header,' - ',shared/body)" />
	</xsl:attribute>
	<!-- end XSL -->
</span>
</body>
</html>

I get the following error
An exception occurred while processing the whitebox XML document through the file:PO_freetext_cas/s_FreeTextToolTips.xsl style sheet: org.xml.sax.SAXParseException: The element type “span” must be terminated by the matching end-tag “</span>”. [Error data in range: <xsl:value-of select=“concat(header,’ - ',shared/body)” /> </xsl:attribute> <!-- end XSL -->]

Any ideas how I can get around this?

One obvious problem is that you have a closing xsl:attribute element, but not an opening one inside the span tag. This might cause the error you are seeing.

Opps :wink:
With that corrected and previewed nothing is displayed (although the header and body items are shown in the preview xml). Frustratingly the title tag is closing but not opening.


<html>
<head>
<meta content="Percussion Rhythmyx" name="generator"/>
<title/>
<link href="../web_resources/POTourist/css/Tourist.css" rel="stylesheet" type="text/css"/>
</head>
<body>

Hi Nicki

I think the title tag is the problem as some browsers will not display content without a title tag.

Check that window_title is definitely in the mappings. You can also try using psx-sys_title as an alternative.

Cheers
James

Thanks James
psx-window_title seemed to be the culprit. By changing it to psx-sys_title didn’t solve the entire problem tho.
The only way we got it to work was by adding text outside of the xsl but still within the span.

Hi Nicki

I’ve had this before. If your snippet template only contains XSL code then add a psx-dummy at the end of the template just before the end of body tag eg

<body>
<span class="ContextualHelp">
	<!-- begin XSL -->
	<xsl:value-of select="concat(header,' - ',shared/body)" />
	<!-- end XSL -->
</span>
psx-dummy
</body>

Cheers
James