 |
 |
 |
Hi,
I am trying to extend OWA 2003 to display custom icons for certain message
classes.
In particular, I am trying to catch non-delivery reports, which may have the
message class "Report.<original msg class>.NDR", e.g. "Report.IPM.Note.NDR".
If I could use the http://www.w3.org/1999/XSL/Transform namespace I'd be
able to use "<xsl: when test="contains(m, 'Report') and contains(m,
'NDR')">", but the OWA 2003 namespace is
'xmlns:xsl="http://www.w3.org/TR/WD-xsl"', so I am stuck with rolling my own
Javascript function to do the test.
However, being completely new to XSL, I am having real problems getting the
syntax right. My Javascript is contained in the following script block
which contains other functions that where written by the Exchange OWA team
that work fine.
<xsl:element name="xsl:script">
...
function IsReportNDR(szMsgClass)
{
szMsgClass = szMsgClass.toUpperCase();
if ( szMsgClass.indexOf("REPORT") != 0 ) // test for "REPORT" at start
of string
return false;
if ( szMsgClass.indexOf("NDR") == -1 ) // "NDR" anywhere, but
probably at the end
return false;
return true;
}
</xsl:element>
I am having difficulty with the syntax in the following choose/when block,
where the IsReportNDR() is intended to take the value of the XML document
property <m> which contains the message class value.
The 'when' block that calls IsReportNDR() causes IE to display the error
"Error: Expression does not return a DOM node." followed by a blank line and
"<--". If I comment out the block, the error goes away and the document
loads OK.
I am clearly breaking some syntax, but I just can't figure it out.
<xsl:element name="xsl:choose">
...
<xsl:element name="xsl:when">
<!-- This one works fine, so 'm' is good! -->
<xsl:attribute
name="test">m[.='IPM.Note.MSP4.Signed.SF']</xsl:attribute>
<IMG>
<xsl:attribute
name="src">/exchweb/img/signed.gif</xsl:attribute>
</IMG>
</xsl:element>
<xsl:element name="xsl:when">
<!-- This one doesn't work! -->
<xsl:attribute name="test">
<xsl:element name="xsl:eval">IsReportNDR("<xsl:value-of
select='m' />")</xsl:element>
</xsl:attribute>
<IMG>
<xsl:attribute
name="src">/exchweb/img/icon-report-ndr.gif</xsl:attribute>
</IMG>
</xsl:element>
</xsl:element>
...
</xsl:element>
The typical XML input to the above extract is as follows. I have only
included the first response block for brevity.
<a:multistatus xmlns:b="urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/"
xmlns:c="xml:" xmlns:a="DAV:">
<a:contentrange>0-19</a:contentrange>
<a:response>
<a:href>http://194.72.164.111/exchange/mike/Inbox/from%20outlook.EML</a:href>
<a:propstat>
<a:status>HTTP/1.1 200 OK</a:status>
<a:prop>
<p1 b:dt="int">1</p1>
<p2>/exchweb/img/icon-msg-unread.gif</p2>
<p4 b:dt="boolean">0</p4>
<p5>Mike</p5>
<p6>from outlook</p6>
<p7 b:dt="dateTime.tz">2004-11-30T17:40:49.349Z</p7>
<p8 b:dt="int">508</p8>
<r b:dt="boolean">0</r>
<m>IPM.Note</m>
</a:prop>
</a:propstat>
</a:response>
Any ideas?
Thanks,
MikeC
|
 | 

|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |