123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- Licensed Materials - Property of IBM
- IBM Cognos Products: HTS
- (C) Copyright IBM Corp. 2005, 2010
- US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- -->
- <xts:morphlet version="1.0" xmlns:xts="http://developer.cognos.com/schemas/xts/" messageBase="messages/portal.xml, messages/portalRL.xml">
- <!-- Validate the HTML entered. Only what you can enter from UI editor is valid
- anything outside what is listed in the XSD file will fail vlaidation and will
- not be able to save. Currently the failure is not passed to UI to rollback the
- action, however a yellow Error div is shown.
- -->
- <xts:block id="response" type="exec" mode="interpret" processor="XSLT" condition=".[/root/interactions/param[@name='subject'] or /root/interactions/param[@name='message_HTML']]" mandatory="false">
- <xts:logicsheet path="logicsheets/portal.xsl"/>
- <xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns:xos="http://developer.cognos.com/schemas/xts/output/"
- xmlns:pf="http://developer.cognos.com/schemas/xts/pf"
- xmlns:xtsext="xalan://com.cognos.xts.ext.XTSExt"
- xmlns:encodingUtils="com.cognos.portal.utils.EncodingUtils"
- xmlns:cm="http://developer.cognos.com/schemas/xts-cm/1/"
- exclude-result-prefixes="xsl xos pf xtsext encodingUtils cm">
- <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>
- <pf:variables/>
- <pf:gen-icon/>
- <xsl:template match="/">
- <xts:sequence>
- <xts:transform xmlns:xts="http://developer.cognos.com/schemas/xts/" name="VALIDATE">
- <xts:param name="noNamespaceSchemaLocation">portal/emailOptions/schemas/richEditBodyFull.xsd</xts:param>
- <!-- use the normalizeEmailBody transform to change all element names to uppercase and all atrributes to lowercase -->
- <xts:transform src="portal/emailOptions/transforms/normalizeEmailBody.xslt" processor="XSLT">
- <!-- We need to wrap it with body. The html comming from UI is just a small html fragment.-->
- <body>
- <xsl:value-of select="/root/interactions/param[@name='message_HTML']" disable-output-escaping="yes"/>
- </body>
- </xts:transform>
- </xts:transform>
- <xts:transform xmlns:xts="http://developer.cognos.com/schemas/xts/" name="VALIDATE">
- <xts:param name="noNamespaceSchemaLocation">portal/emailOptions/schemas/richEditBodyFull.xsd</xts:param>
- <!-- use the normalizeEmailBody transform to change all element names to uppercase and all atrributes to lowercase -->
- <xts:transform src="portal/emailOptions/transforms/normalizeEmailBody.xslt" processor="XSLT">
- <!-- We need to wrap it with body. The html comming from UI is just a small html fragment.-->
- <body>
- <xsl:value-of select="/root/interactions/param[@name='subject']" disable-output-escaping="yes"/>
- </body>
- </xts:transform>
- </xts:transform>
- </xts:sequence>
- </xsl:template>
- </xsl:stylesheet>
- </xts:block>
- </xts:morphlet>
|