XML形式で受信したメールの処理例
例 1: 1 つのメールをインポートする
この例には次の内容が含まれます。
- 顧客から送信された電子メールの例。 以下を参照してください:
<INCIDENT>
<DESCRIPTION>xml 電子メール処理</DESCRIPTION>
<SERVICE>デスクトップ サービス</SERVICE>
<CATEGORY>パフォーマンスの問題</CATEGORY>
<OWNER>品質保証</OWNER>
<OWNERTEAM>それ</OWNERTEAM>
<URGENCY>中</URGENCY>
<IMPACT>中</IMPACT>
<SOURCE>メール</SOURCE>
<PROFILELINK>ケリー・ヤオ</PROFILELINK>
</INCIDENT>- 元の電子メールから生成されたが、階層型 XML 形式ではない XML ファイルの例。 ファイルを表示するには、 Ex1-インポート-生成された電子メール.xml にアクセスしてください。
- 適用する XSLT ファイルの例。 ファイルを表示するには、 Ex1-インポート-スクリプト.xslt にアクセスしてください。
- XSLT ファイルを適用した後の最終的な XML ファイルの例。 XSLT ファイルを適用した後の最終的な XML ファイルの例を確認するには、 Ex1-インポート-最終-Email.xml にアクセスしてください。
例2: インシデントと サービス申請を同じ受信トレイにインポートする
この例では、インシデントと サービス申請を同じ受信トレイにインポートする方法を示しており、次の内容が含まれています。
- インシデントをインポートするために顧客から送信された電子メールの例と、 サービス申請をインポートするために顧客から送信された電子メールの例。 インシデントをインポートするために顧客から送信された電子メールの例:
<INCIDENT>
<DESCRIPTION>テスト XML </DESCRIPTION>
<SERVICE>デスクトップ サービス</SERVICE>
<CATEGORY>パフォーマンスの問題</CATEGORY>
<OWNERTEAM>オペレーション</OWNERTEAM>
<OWNER>管理者 管理者</OWNER>
<URGENCY>中</URGENCY>
<IMPACT>中</IMPACT>
<SOURCE>メール</SOURCE>
<PROFILELINK>管理者 管理者</PROFILELINK>
</INCIDENT>- サービス申請をインポートするために顧客から送信された電子メールの例:
部門$IT
依頼者$Alan Taylor
電子メール[email protected]- 元の電子メールから生成されたが、階層型 XML 形式ではない XML ファイルの例。 インシデントをインポートするために生成された XML 電子メール ファイルの例を確認するには、 Ex2 インポートで生成されたメール.xml にアクセスしてください。 サービス申請をインポートするために生成された XML 電子メール ファイルの例を確認するには、 Ex2 インポートで生成された Email2.xml にアクセスしてください。
- 適用する XSLT ファイルの例。 インシデントおよび サービス申請の両方をインポートする XSLT ファイルの例については、 Ex2-インポート-スクリプト3.xslt を参照してください。インシデントをインポートする XSL ファイルの例については、 Ex2-インポート-スクリプト.xslt を参照してください。 サービス申請をインポートする XSL ファイルの例については、 Ex2-インポート-スクリプト2.xsl を参照してください。
- インシデントをインポートする場合 (XSL および XSLT ファイルを適用した後の最終的な XML ファイルの例については、 Ex2-インポート-最終-Email.xml を参照してください)、または サービス申請をインポートする場合 (XSL および XSLT ファイルを適用した後の最終的な XML ファイルの例については、 Ex2-インポート-最終-Email2.xml を参照してください)、XSLT ファイルを適用した後の最終的な XML ファイルの例については、インシデント ...インシデントをインポートする場合)。
<?xml version="1.0" encoding="UTF-8"?><BusinessObjectList xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SchemaVersion="1.0"><BusinessObject Name=""><EmailMessage><MessageID>a6354f29-4771-4095-a6d4-e5c8d318ea8e</MessageID><From>[email protected]</From><Header>Return-Path: <[email protected]> Delivered-To: [email protected] Received: from smtp28.gate.ord1a (smtp28.gate.ord1a.rsapps.net [10.130.4.28]) by store114a.mail.ord1b (SMTP Server) with ESMTP id A631D1700BB for <[email protected]>; Tue, 10 Feb 2015 16:59:44 -0500 (EST) X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-MessageSniffer-Scan-Result: 0 X-MessageSniffer-Rules: 0-0-0-6469-c X-CMAE-Scan-Result: 0 X-CNFS-Analysis: v=2.1 cv=cbzr8BzM c=1 sm=0 tr=0 a=LsHV51zzIncP4I3293WPhQ==:117 a=LsHV51zzIncP4I3293WPhQ==:17 a=3hggNd4wljYA:10 a=8kQvQK_AAAAA:8 a=-jBlUN_C1od1TIktrMEA:9 a=CjuIK1q_8ugA:10 a=y8dZ710oujAA:10 a=ZG0p_6W2l6MA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=vZHfknC3XJGfoCVC:21 a=gKO2Hq4RSVkA:10 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10 a=frz4AuCg-hUA:10 X-Orig-To: [email protected] X-Originating-Ip: [206.104.144.248] Received: from [206.104.144.248] ([206.104.144.248:7847] helo=mx.frontrange.com) by smtp28.gate.ord1a.rsapps.net (envelope-from <[email protected]>) (ecelerity 2.2.3.49 r(42060/42061)) with ESMTPS (cipher=AES128-SHA) id 87/E6-07842-05F7AD45; Tue, 10 Feb 2015 16:59:44 -0500 From: Kelly Yao <[email protected]> To: "[email protected]" <[email protected]> Subject: RE: test xml email 2 Thread-Topic: test xml email 2 Thread-Index: AdBFfNwNr8mS8AqRR+if/GWc7ATR2w== Date: Tue, 10 Feb 2015 21:59:42 +0000 Message-ID: <[email protected]> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: multipart/alternative; boundary="_000_31AC186C71B83241A869D7FDEBCDE12928BF3438CSMBX03nafrs_" MIME-Version: 1.0</Header><ReplyTo/><Sender/><To>[email protected]</To><CC/><BCC/><TimeStamp>02/10/2015 21:59:42</TimeStamp><BlockCount>0</BlockCount><Subject>RE: テスト XML メール 2</Subject><SubjectID/><Body><INCIDENT> <DESCRIPTION>xml email processing</DESCRIPTION> <SERVICE>Desktop Service</SERVICE> <CATEGORY>Performance Issue</CATEGORY> <OWNER>Quality Assurance</OWNER> <OWNERTEAM>IT</OWNERTEAM> <URGENCY>Medium</URGENCY> <IMPACT>Medium</IMPACT> <SOURCE>Email</SOURCE> <PROFILELINK>Kelly Yao</PROFILELINK> </INCIDENT></Body><BodyHTML><html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> <meta name="Generator" content="Microsoft Word 14 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:LucidaConsole; panose-1:0 0 0 0 0 0 0 0 0 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:windowtext;} span.EmailStyle18 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:8.5in 11.0in; margin:1.0in 1.0in 1.0in 1.0in;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> </head> <body lang="EN-US" link="blue" vlink="purple"> <div class="WordSection1"> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><INCIDENT><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><DESCRIPTION>xml email processing</DESCRIPTION><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><SERVICE>Desktop Service</SERVICE><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><CATEGORY>Performance Issue</CATEGORY><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><OWNER>Quality Assurance</OWNER><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><OWNERTEAM>IT</OWNERTEAM><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><URGENCY>Medium</URGENCY><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><IMPACT>Medium</IMPACT><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><SOURCE>Email</SOURCE><o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"><PROFILELINK>Kelly Yao</PROFILELINK><o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222"></INCIDENT></span><o:p></o:p></p> </div> </body> </html></BodyHTML></EmailMessage><RelatedBusinessObjectList><RelatedBusinessObject Relationship=""><BusinessObject Name="Employee"><Transaction>なし</Transaction><LinkTransaction>なし</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="PrimaryEmail"/></UniqueKey></UniqueKeyList><FieldList><Field Name="RecId">74142674F0E947849A940FDCCA63B501/>Field><Field Name="PrimaryEmail">[email protected]</Field></FieldList></BusinessObject></RelatedBusinessObject><RelatedBusinessObject Relationship=""><BusinessObject Name="Journal.Email"><Transaction>なし</Transaction><LinkTransaction>リンク</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="RecId">C712701E07F94B00A40CE48F97C8511F</Field></FieldList></BusinessObject></RelatedBusinessObject></RelatedBusinessObjectList></BusinessObject></BusinessObjectList><?xml version="1.0" encoding="UTF-8"?>
<!--
この XSLT サンプルは、電子メール サービスによって生成された XML 形式の次の電子メール本文を、スキーマ バージョン "1.0" を使用して統合サーバーで使用できる階層型 XML に変換します。
<INCIDENT>
<DESCRIPTION>PCがとても遅いです</DESCRIPTION>
<SERVICE>デスクトップ サービス</SERVICE>
<CATEGORY>パフォーマンスの問題</CATEGORY>
<OWNER>品質保証</OWNER>
<OWNERTEAM>それ</OWNERTEAM>
<URGENCY>中</URGENCY>
<IMPACT>中</IMPACT>
<SOURCE>メール</SOURCE>
</INCIDENT>
-->
<xsl:stylesheet version="2.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:user="urn:schemas-microsoft-com:xslt">
<xsl:variable name="ebody"/>
<!--Transform to XML fragment-->
<xsl:variable name="params"select="msxsl:node-set($ebody)/tag[@name='INCIDENT']/tag"/>
<xsl:template match="/">
<BusinessObjectList SchemaVersion="1.0"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd">
<!-- Find the profile link RecID of the email sender -->
<xsl:variable name="profilelink_recid">
<!--For each related business object -->
<xsl:for-each select="BusinessObjectList/BusinessObject/RelatedBusinessObjectList/RelatedBusinessObject/BusinessObject">
<xsl:choose>
<xsl:when test="@Name = 'Employee'">
<xsl:for-each select="./FieldList/Field">
<xsl:choose>
<xsl:when test="@Name = 'RecId'">
<xsl:value-of select="."/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<!--Find the profile link category of the email sender -->
<xsl:variable name="profilelink_cat">
<!--For each RelatedBusinessObject-->
<xsl:for-each select="BusinessObjectList/BusinessObject/RelatedBusinessObjectList/RelatedBusinessObject/BusinessObject">
<xsl:choose>
<xsl:when test="@Name = 'Employee'">
<xsl:value-of select="'Employee'"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<!--For each business object-->
<xsl:for-each select="BusinessObjectList/BusinessObject">
<!-- Set the business object name -->
<xsl:element name="BusinessObject">
<!-- Set the business object name to 'Incident'-->
<xsl:attribute name="Name">
<xsl:value-of select="'Incident'"/>
</xsl:attribute>
<!--Set transaction to 'Insert'-->
<xsl:element name="Transaction">Insert</xsl:element>
<!--Unique key list-->
<xsl:element name="UniqueKeyList">
<xsl:element name="UniqueKey">
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:value-of select="'IncidentNumber'"/></xsl:attribute>
</xsl:element>
</xsl:element>
</xsl:element>
<!-- Field list-->
<FieldList>
<!--Fields -->
<xsl:for-each select="EmailMessage/node()">
<xsl:choose>
<xsl:when test="name() = 'Subject'">
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:value-of select="'Subject'"/>
</xsl:attribute>
<xsl:attribute name="Type">System.String</xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
</xsl:when>
<xsl:when test="name() = 'Body'">
<xsl:variable name="emailbody">
<xsl:choose>
<xsl:when test="starts-with(normalize-space(.), '<INCIDENT>')">
<xsl:call-template name="StringToXML">
<!--Remove CRLF-->
<xsl:with-param name="text"select="translate(., '
', '')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'Email body does not contain XML for Incident'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<!--Transform to XML fragment-->
<xsl:variable name="parameters"select="msxsl:node-set($emailbody)/tag[@name='INCIDENT']/tag"/>
<xsl:variable name="symptom"select="$parameters[@name='DESCRIPTION']/text()"/>
<xsl:variable name="service"select="$parameters[@name='SERVICE']/text()"/>
<xsl:variable name="category"select="$parameters[@name='CATEGORY']/text()"/>
<xsl:variable name="owner"select="$parameters[@name='OWNER']/text()"/>
<xsl:variable name="ownerteam"select="$parameters[@name='OWNERTEAM']/text()"/>
<xsl:variable name="impact"select="$parameters[@name='IMPACT']/text()"/>
<xsl:variable name="urgency"select="$parameters[@name='URGENCY']/text()"/>
<xsl:variable name="source"select="$parameters[@name='SOURCE']/text()"/>
<!-- Symptom
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>Symptom</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($symptom) > 0">
<xsl:value-of select="$symptom"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>Default Symptom goes here</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!--Service -->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>Service</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($service) > 0">
<xsl:value-of select="$service"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>Service Desk</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!--Category -->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>Category</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($category) > 0">
<xsl:value-of select="$category"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>Service Desk</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!--Owner -->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>Owner</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($owner) > 0">
<xsl:value-of select="$owner"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>Admin</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!--Owner team-->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>OwnerTeam</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($ownerteam) > 0">
<xsl:value-of select="$ownerteam"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>Service Desk</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!--Impact -->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>Impact</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($impact) > 0">
<xsl:value-of select="$impact"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>2</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!--Urgency -->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>Urgency</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($urgency) > 0">
<xsl:value-of select="$urgency"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>2</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!-- Source -->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>Source</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($source) > 0">
<xsl:value-of select="$source"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>Email</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!--Profile link category-->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>ProfileLink_Category</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($profilelink_cat) > 0">
<xsl:value-of select="$profilelink_cat"/>
</xsl:when>
<xsl:otherwise>
<!-- Set as 'Employee' -->
<xsl:text>Employee</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
<!-- Profile link RecID -->
<xsl:element name="Field">
<xsl:attribute name="Name">
<xsl:text>ProfileLink_RecID</xsl:text>
</xsl:attribute>
<xsl:choose>
<xsl:when test="string-length($profilelink_recid) > 0">
<xsl:value-of select="$profilelink_recid"/>
</xsl:when>
<xsl:otherwise>
<!--Set as admin RecID-->
<xsl:text>FB884D18F7B746A0992880F2DFFE749C</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:element>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</FieldList>
<!--Copy the RelatedBusinessObjectList element-->
<RelatedBusinessObjectList>
<xsl:for-each select="RelatedBusinessObjectList/RelatedBusinessObject">
<xsl:element name="RelatedBusinessObject">
<xsl:attribute name="Relationship">
<xsl:choose>
<xsl:when test="BusinessObject/@Name = 'Employee'">
<xsl:value-of select="'IncidentOwnerEmployee'"/>
</xsl:when>
<xsl:when test="BusinessObject/@Name = 'Journal.Email'">
<xsl:value-of select="'IncidentContainsJournal'"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:copy-of select="node()"/>
</xsl:element>
</xsl:for-each>
</RelatedBusinessObjectList>
</xsl:element>
</xsl:for-each>
</BusinessObjectList>
</xsl:template>
<xsl:template name="StringToXML">
<xsl:param name="text"/>
<xsl:choose>
<!--Check if $text is an XML fragment-->
<xsl:when test="contains($text, '<')">
<xsl:variable name="tmp1"select="substring-after($text, '<')"/>
<xsl:variable name="tmp2"select="substring-after($tmp1, '>')"/>
<xsl:variable name="tagName"select="substring-before($tmp1, '>')"/>
<xsl:variable name="endTag"select="concat(concat('<', concat('/', $tagName)), '>')"/>
<xsl:value-of select="substring-before($text, '<')"/>
<!--Create the tag-->
<xsl:element name="tag">
<xsl:attribute name="name">
<xsl:value-of select="translate($tagName, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
</xsl:attribute>
<!--Create the children tree-->
<xsl:call-template name="StringToXML">
<xsl:with-param name="text"select="substring-before($tmp2, $endTag)"/>
</xsl:call-template>
</xsl:element>
<!-- Create the following siblings tree -->
<xsl:call-template name="StringToXML">
<xsl:with-param name="text"select="substring-after($tmp2, $endTag)"/>
</xsl:call-template>
</xsl:when>
<!--$text is not an XML fragment, so just print the text itself-->
<xsl:otherwise>
<xsl:choose>
<xsl:when test="$text !=''">
<xsl:value-of select="$text"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'Invalid XML. 空の文字列'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?>
<BusinessObjectListxmlns:msxsl="urn:schemas-microsoft-com:xslt"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"SchemaVersion="1.0">
<BusinessObject Name="Incident">
<Transaction>Insert</Transaction>
<UniqueKeyList>
<UniqueKey>
<Field Name="IncidentNumber"/>
</UniqueKey>
</UniqueKeyList>
<FieldList>
<Field Name="Subject" Type="System.String">RE: test xml email 2</Field>
<Field Name="Symptom">xml email processing</Field>
<Field Name="Service">Desktop Service</Field>
<Field Name="Category">Performance Issue</Field>
<Field Name="Owner">Quality Assurance</Field>
<Field Name="OwnerTeam">IT</Field>
<Field Name="Impact">Medium</Field>
<Field Name="Urgency">Medium</Field>
<Field Name="Source">Email</Field>
<Field Name="ProfileLink_Category">Employee</Field>
<Field Name="ProfileLink_RecID">74142674F0E947849A940FDCCA63B501</Field>
</FieldList>
<RelatedBusinessObjectList>
<RelatedBusinessObject Relationship="IncidentOwnerEmployee">
<BusinessObject Name="Employee">
<Transaction>None</Transaction>
<LinkTransaction>None</LinkTransaction>
<UniqueKeyList>
<UniqueKey>
<Field Name="PrimaryEmail"/>
</UniqueKey>
</UniqueKeyList>
<FieldList>
<Field Name="RecId">74142674F0E947849A940FDCCA63B501</Field>
<Field Name="PrimaryEmail">[email protected]</Field>
</FieldList>
</BusinessObject>
</RelatedBusinessObject>
<RelatedBusinessObject Relationship="IncidentContainsJournal">
<BusinessObject Name="Journal.Email">
<Transaction>None</Transaction>
<LinkTransaction>Link</LinkTransaction>
<UniqueKeyList>
<UniqueKey>
<Field Name="RecId"/>
</UniqueKey>
</UniqueKeyList>
<FieldList>
<Field Name="RecId">C712701E07F94B00A40CE48F97C8511F</Field>
</FieldList>
</BusinessObject>
</RelatedBusinessObject>
</RelatedBusinessObjectList>
</BusinessObject>
</BusinessObjectList>
<?xml version="1.0" encoding="UTF-8"?>
<BusinessObjectList xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"SchemaVersion="1.0"><BusinessObject Name=""><EmailMessage><MessageID>99289f20-ceac-4c7f-93e1-b5f18068eb8f</MessageID><From>[email protected]</From><Header>Return-Path: <[email protected]> Delivered-To: [email protected] Received: from smtp42.gate.ord1c (smtp42.gate.ord1c.rsapps.net [172.28.146.42]) by store202a.mail.ord1a (SMTP Server) with ESMTP id 1AA4437000D for <[email protected]>; Mon, 20 Apr 2015 20:11:53 -0400 (EDT) X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-MessageSniffer-Scan-Result: 0 X-MessageSniffer-Rules: 0-0-0-7144-c X-CMAE-Scan-Result: 0 X-CNFS-Analysis: v=2.1 cv=O6MA4nNW c=1 sm=0 tr=0 a=LsHV51zzIncP4I3293WPhQ==:117 a=LsHV51zzIncP4I3293WPhQ==:17 a=RzHtgV3JE18A:10 a=pJT6Aq2jAAAA:8 a=ndkwzLzXJv5S2N3pvSMA:9 a=CjuIK1q_8ugA:10 a=HpScuoJWMcoA:10 a=NLW3_BR1ZZwA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=LL-MDLJ3K_IVoXNy9PIA:9 a=O-B0_aSyQqhQW31Y:21 a=gKO2Hq4RSVkA:10 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10 a=frz4AuCg-hUA:10 X-Orig-To: [email protected] X-Originating-Ip: [206.104.144.248] Received: from [206.104.144.248] ([206.104.144.248:29357] helo=mx.frontrange.com) by smtp42.gate.ord1c.rsapps.net (envelope-from <[email protected]>) (ecelerity 2.2.3.49 r(42060/42061)) with ESMTPS (cipher=AES128-SHA) id A5/AB-18970-8C595355; Mon, 20 Apr 2015 20:11:52 -0400 From: Olga Pasternak <[email protected]> To: "[email protected]" <[email protected]> Subject: RE: Test XML 3 Thread-Topic: Test XML 3 Thread-Index: AdB7x8KvLa1rCv1DRFuDEKolkLj8ng== Date: Tue, 21 Apr 2015 00:11:49 +0000 Message-ID: <[email protected]> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: multipart/alternative; boundary="_000_3DC74DF0B4F8894F867A5A929A825F2D10A68604CSMBX03nafrs_" MIME-Version: 1.0</Header><ReplyTo/><Sender/><To>[email protected]</To><CC/><BCC/><TimeStamp>04/21/2015 00:11:49</TimeStamp><BlockCount>0</BlockCount><Subject>RE: Test XML 3 </Subject><SubjectID/><Body><INCIDENT> <DESCRIPTION>test XML Email </DESCRIPTION> <SERVICE>Desktop Service</SERVICE> <CATEGORY>Performance Issue</CATEGORY> <OWNERTEAM>IT</OWNERTEAM> <OWNER>Quality Assurance</OWNER> <URGENCY>Medium</URGENCY> <IMPACT>Medium</IMPACT> <SOURCE>Email</SOURCE> <PROFILELINK>Quality Assurance </PROFILELINK> </INCIDENT> </Body><BodyHTML><html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> <meta name="Generator" content="Microsoft Word 14 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} p.MsoPlainText, li.MsoPlainText, div.MsoPlainText {mso-style-priority:99; mso-style-link:"Plain Text Char"; margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {mso-style-priority:99; mso-style-link:"Balloon Text Char"; margin:0in; margin-bottom:.0001pt; font-size:8.0pt; font-family:"Tahoma","sans-serif";} span.PlainTextChar {mso-style-name:"Plain Text Char"; mso-style-priority:99; mso-style-link:"Plain Text"; font-family:"Calibri","sans-serif";} span.BalloonTextChar {mso-style-name:"Balloon Text Char"; mso-style-priority:99; mso-style-link:"Balloon Text"; font-family:"Tahoma","sans-serif";} span.EmailStyle21 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle22 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle23 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle24 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle25 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle26 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle27 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle28 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle29 {mso-style-type:personal; font-family:"Calibri","sans-serif"; color:#1F497D;} span.EmailStyle30 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @page WordSection1 {size:8.5in 11.0in; margin:56.7pt 42.5pt 56.7pt 85.05pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> </head> <body lang="EN-US" link="blue" vlink="purple"> <div class="WordSection1"> <p class="MsoPlainText"><INCIDENT><span style="color:#1F497D"><o:p></o:p></span></p> <p class="MsoPlainText"><span style="color:#1F497D"> </span><DESCRIPTION>test <span style="color:#1F497D"> XML Email</span> </DESCRIPTION><o:p></o:p></p> <p class="MsoPlainText"> <SERVICE>Desktop Service</SERVICE><o:p></o:p></p> <p class="MsoPlainText"> <CATEGORY>Performance Issue</CATEGORY><o:p></o:p></p> <p class="MsoPlainText"> <OWNERTEAM>IT</OWNERTEAM><o:p></o:p></p> <p class="MsoPlainText"> <OWNER>Quality Assurance</OWNER><o:p></o:p></p> <p class="MsoPlainText"> <URGENCY>Medium</URGENCY><o:p></o:p></p> <p class="MsoPlainText"> <IMPACT>Medium</IMPACT><o:p></o:p></p> <p class="MsoPlainText"> <SOURCE>Email</SOURCE><o:p></o:p></p> <p class="MsoPlainText"> <PROFILELINK>Quality Assurance </PROFILELINK> <span style="color:#1F497D"> <o:p></o:p></span></p> <p class="MsoPlainText"></INCIDENT><o:p></o:p></p> </div> </body> </html></BodyHTML></EmailMessage><RelatedBusinessObjectList><RelatedBusinessObject Relationship=""><BusinessObject Name="Employee"><Transaction>None</Transaction><LinkTransaction>None</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="PrimaryEmail"/></UniqueKey></UniqueKeyList><FieldList><Field Name="RecId">3734B48625D043B0939456EBF5B07F43</Field><Field Name="PrimaryEmail">[email protected]</Field></FieldList></BusinessObject></RelatedBusinessObject><RelatedBusinessObject Relationship=""><BusinessObject Name="Journal.Email"><Transaction>None</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="RecId">68360EB2755F4B4084E45F65FCA73162</Field></FieldList></BusinessObject></RelatedBusinessObject></RelatedBusinessObjectList></BusinessObject></BusinessObjectList><?xml version="1.0" encoding="UTF-8"?>
<BusinessObjectList xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"SchemaVersion="1.0"><BusinessObject Name=""><EmailMessage><MessageID>40d0f80d-50f5-4dc5-a468-4f861106ecdc</MessageID><From>[email protected]</From><Header>Return-Path: <[email protected]> Delivered-To: [email protected] Received: from smtp41.gate.ord1c (smtp41.gate.ord1c.rsapps.net [172.28.146.41]) by store202a.mail.ord1a (SMTP Server) with ESMTP id 5B31D37004C for <[email protected]>; Mon, 20 Apr 2015 20:17:06 -0400 (EDT) X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-MessageSniffer-Scan-Result: 0 X-MessageSniffer-Rules: 0-0-0-4141-c X-CMAE-Scan-Result: 0 X-CNFS-Analysis: v=2.1 cv=ZZskaKlA c=1 sm=0 tr=0 a=LsHV51zzIncP4I3293WPhQ==:117 a=LsHV51zzIncP4I3293WPhQ==:17 a=RzHtgV3JE18A:10 a=pJT6Aq2jAAAA:8 a=Z9YDj5p0AAAA:8 a=0YBUe0dz5XustnX3RcYA:9 a=CjuIK1q_8ugA:10 a=0j5UJdqgBkUA:10 a=EIPZIosEz_EA:10 a=mItjn0crm-wA:10 a=bjFNvA4ZG3sA:10 a=fVpclg_jv2oA:10 a=yMhMjlubAAAA:8 a=SSmOFEACAAAA:8 a=jgiXcwD34PFGoSuQ0XQA:9 a=gKO2Hq4RSVkA:10 a=UiCQ7L4-1S4A:10 a=hTZeC7Yk6K0A:10 a=frz4AuCg-hUA:10 X-Orig-To: [email protected] X-Originating-Ip: [206.104.144.248] Received: from [206.104.144.248] ([206.104.144.248:29386] helo=mx.frontrange.com) by smtp41.gate.ord1c.rsapps.net (envelope-from <[email protected]>) (ecelerity 2.2.3.49 r(42060/42061)) with ESMTPS (cipher=AES128-SHA) id B4/CD-10843-20795355; Mon, 20 Apr 2015 20:17:06 -0400 From: Olga Pasternak <[email protected]> To: "[email protected]" <[email protected]> Subject: Request - Domain Password Reset Thread-Topic: Request - Domain Password Reset Thread-Index: AdB7yFhM2NnJIEQuSfCc0VpfmBEB4g== Date: Tue, 21 Apr 2015 00:17:03 +0000 Message-ID: <[email protected]> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: multipart/alternative; boundary="_000_3DC74DF0B4F8894F867A5A929A825F2D10A68614CSMBX03nafrs_" MIME-Version: 1.0</Header><ReplyTo/><Sender/><To>[email protected]</To><CC/><BCC/><TimeStamp>04/21/2015 00:17:03</TimeStamp><BlockCount>0</BlockCount><Subject>Request - Domain Password Reset </Subject><SubjectID/><Body>Department$IT Requester$Alan Taylor [email protected] </Body><BodyHTML><html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii"> <meta name="Generator" content="Microsoft Word 14 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Calibri","sans-serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri","sans-serif"; color:windowtext;} .MsoChpDefault {mso-style-type:export-only; font-family:"Calibri","sans-serif";} @page WordSection1 {size:8.5in 11.0in; margin:56.7pt 42.5pt 56.7pt 85.05pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> </head> <body lang="EN-US" link="blue" vlink="purple"> <div class="WordSection1"> <p class="MsoNormal">Department$IT<o:p></o:p></p> <p class="MsoNormal">Requester$Alan Taylor<o:p></o:p></p> <p class="MsoNormal">[email protected]<o:p></o:p></p> </div> </body> </html></BodyHTML></EmailMessage><RelatedBusinessObjectList><RelatedBusinessObject Relationship=""><BusinessObject Name="Employee"><Transaction>None</Transaction><LinkTransaction>None</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="PrimaryEmail"/></UniqueKey></UniqueKeyList><FieldList><Field Name="RecId">3734B48625D043B0939456EBF5B07F43</Field><Field Name="PrimaryEmail">[email protected]</Field></FieldList></BusinessObject></RelatedBusinessObject><RelatedBusinessObject Relationship=""><BusinessObject Name="Journal.Email"><Transaction>None</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="RecId">93B33BDCFCCB45F18AC165718208420E</Field></FieldList></BusinessObject></RelatedBusinessObject></RelatedBusinessObjectList></BusinessObject></BusinessObjectList><?xml version="1.0" encoding="UTF-8"?>
<!--この XSLT サンプルは、電子メール XML を、インシデントおよび サービス申請のスキーマ バージョン「1.0」を使用して統合サーバーで使用できる階層型 XML に変換します。件名に「Request」という用語が含まれている場合、定義されたタイプの サービス申請であると見なされます。それ以外の場合はインシデントとみなされます。--><xsl:stylesheet version="2.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:user="urn:my-scripts"><xsl:import href="SR_import.xsl"/><xsl:import href="Incident_import.xsl"/><xsl:output method="xml"version="1.0"encoding="UTF-8"indent="yes"/><xsl:template match="/"><xsl:variable name="Subject"select= "BusinessObjectList/BusinessObject/EmailMessage/Subject"/><xsl:choose><xsl:when test="contains($Subject,'Request')"><xsl:call-template name="SR_import"/></xsl:when><xsl:otherwise><xsl:call-template name="Incident_import"/></xsl:otherwise></xsl:choose></xsl:template></xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?><!--この XSLT サンプルは、電子メール XML を、インシデントおよび サービス申請の SchemaVersion "1.0" を使用して統合サーバーで使用できる階層型 XML に変換します。受信メールの本文は次の形式であると想定します。<INCIDENT><DESCRIPTION>PCがとても遅いです</DESCRIPTION><SERVICE>デスクトップ サービス</SERVICE><CATEGORY>パフォーマンスの問題</CATEGORY><OWNER>品質保証</OWNER><OWNERTEAM>それ</OWNERTEAM><URGENCY>中</URGENCY><IMPACT>中</IMPACT><SOURCE>メール</SOURCE></INCIDENT>または<REQUEST><TEMPLATE>ドメインパスワードのリセット</TEMPLATE><DESCRIPTION>PCがとても遅いです</DESCRIPTION><SERVICE>デスクトップ サービス</SERVICE><CATEGORY>パフォーマンスの問題</CATEGORY><OWNER>品質保証</OWNER><OWNERTEAM>それ</OWNERTEAM><URGENCY>中</URGENCY><IMPACT>中</IMPACT><SOURCE>メール</SOURCE></REQUEST>本文が変更される場合は、それに応じて SRimport.xsl および/または Incidentimport.xsl を変更する必要があります。--><xsl:stylesheet version="2.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xs="http://www.w3.org/2001/XMLSchema"><!--import xslt for: CI.Computer|CI.Server, etc--><xsl:import href="SR_import.xsl"/><xsl:import href="Incident_import.xsl"/><xsl:output method="xml"version="1.0"encoding="UTF-8"indent="yes"/><xsl:template match="/"><xsl:choose><xsl:when test="BusinessObjectList/BusinessObject/EmailMessage/Body/REQUEST"><xsl:call-template name="SR_import"/></xsl:when><xsl:otherwise><xsl:call-template name="SR_import"/></xsl:otherwise></xsl:choose></xsl:template></xsl:stylesheet><?xml version="1.0" encoding="UTF-8"?>
<!-- This XSLT sample will convert the following email generated by the Email Service to hierarchical XML Subject: Request - Domain Password Reset Body: Department$IT Requester$Alan Taylor [email protected]><xsl:stylesheetxmlns:msxsl="urn:schemas-microsoft-com:xslt"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"version="2.0"><xsl:template name="SR_import"match="/"><!-- サービス申請のヘッダー XML 。 これらはすべてのタイプで一貫しています。 --><BusinessObjectListxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"SchemaVersion="1.0"><BusinessObject Name="ServiceReq"><Transaction>Insert</Transaction><UniqueKeyList><UniqueKey><Field Name="ServiceReqNumber"/></UniqueKey></UniqueKeyList><!--First, we will load variables so we can use them easily later--><xsl:variable name="Subject"select="BusinessObjectList/BusinessObject/EmailMessage/Subject"/><xsl:variable name="Body"select="BusinessObjectList/BusinessObject/EmailMessage/Body"/><!--Find the profile link RecID of the email sender, they will be the service requester--><xsl:variable name="ProfileRecId"><xsl:for-each select="BusinessObjectList/BusinessObject/RelatedBusinessObjectList/RelatedBusinessObject/BusinessObject"><xsl:choose><xsl:when test="@Name = 'Employee'"><xsl:for-each select="./FieldList/Field"><xsl:choose><xsl:when test="@Name = 'RecId'"><xsl:value-of select="."/></xsl:when></xsl:choose></xsl:for-each></xsl:when></xsl:choose></xsl:for-each></xsl:variable><!--switch ステートメントは、各テンプレート タイプの処理をメールの件名に基づいて分離します。 この例では、「ドメイン パスワードのリセット」という 1 つの申請項目のみをサポートしています。 --><xsl:choose><!--There will be a separate when section for each type of service request supported --><xsl:when test="contains($Subject,'Domain Password Reset')"><!-- Now let's parse the body for the fields we want for a domain password reset --><!--Department:--><xsl:variable name="dept"select="substring-after($Body,'Department$')"/><!--Stop at the newline character --><!--Requester:--><xsl:variable name="requestor"select="substring-after($Body,'Requester$')"/><!--Email: --><xsl:variable name="email"select="substring-after($Body,'Email$')"/><!--Fill in the necessary fields and related business objects for a domain password reset--><FieldList><Field Name="SvcReqTmplLink" Type="System.String">Domain Password Reset</Field><!--Replace this subscription RecID with the valid one for your system:--><Field Name="SvcReqSubscLink_RecID"Type="System.String">BDF2D75B420C438E9468BC613E6AB369</Field><Field Name="Price">150.00</Field><Field Name="ProfileLink_RecID"Type="System.String"><xsl:value-of select="$ProfileRecId"/></Field></FieldList><RelatedBusinessObjectList><RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam"><BusinessObject Name="ServiceReqParam"><Transaction>Insert</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="ParameterName"Type="System.String">RequesterDepartment</Field><Field Name="ParameterValue"Type="System.String"><xsl:choose><xsl:when test="contains($dept, ' ')"><xsl:value-of select="substring-before($dept,' ')"/></xsl:when><xsl:otherwise><xsl:value-of select="$dept"/></xsl:otherwise></xsl:choose></Field><Field Name="DisplayType"Type="System.String">text</Field></FieldList></BusinessObject></RelatedBusinessObject><RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam"><BusinessObject Name="ServiceReqParam"><Transaction>Insert</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="ParameterName"Type="System.String">Requester</Field><Field Name="ParameterValue"Type="System.String"><xsl:choose><xsl:when test="contains($requestor, ' ')"><xsl:value-of select="substring-before($requestor,' ')"/></xsl:when><xsl:otherwise><xsl:value-of select="$requestor"/></xsl:otherwise></xsl:choose></Field><Field Name="DisplayType"Type="System.String">text</Field></FieldList></BusinessObject></RelatedBusinessObject><RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam"><BusinessObject Name="ServiceReqParam"><Transaction>Insert</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="ParameterName"Type="System.String">Email</Field><Field Name="ParameterValue"Type="System.String"><xsl:choose><xsl:when test="contains($email, ' ')"><xsl:value-of select="substring-before($email,' ')"/></xsl:when><xsl:otherwise><xsl:value-of select="$email"/></xsl:otherwise></xsl:choose></Field><Field Name="DisplayType" Type="System.String">text</Field></FieldList></BusinessObject></RelatedBusinessObject></RelatedBusinessObjectList></xsl:when><!--Next service request type would placed here in its own xsl:when block--><xsl:otherwise><other/></xsl:otherwise></xsl:choose><!--Now close the service request XML--></BusinessObject></BusinessObjectList></xsl:template></xsl:stylesheet><?xml version="1.0" encoding="UTF-8"?>
<BusinessObjectListxmlns:msxsl="urn:schemas-microsoft-com:xslt"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"SchemaVersion="1.0"><BusinessObject Name="Incident"><Transaction>Insert</Transaction><UniqueKeyList><UniqueKey><Field Name="IncidentNumber"/></UniqueKey></UniqueKeyList><FieldList><Field Name="Subject" Type="System.String">RE: Test XML 3</Field><Field Name="Symptom">test XML Email</Field><Field Name="Service">Desktop Service</Field><Field Name="Category">Performance Issue</Field><Field Name="Owner">Quality Assurance</Field><Field Name="OwnerTeam">IT</Field><Field Name="Impact">Medium</Field><Field Name="Urgency">Medium</Field><Field Name="Source">Email</Field><Field Name="ProfileLink_Category">Employee</Field><Field Name="ProfileLink_RecID">3734B48625D043B0939456EBF5B07F43</Field></FieldList><RelatedBusinessObjectList><RelatedBusinessObject Relationship=""><BusinessObject Name="Employee"><Transaction>None</Transaction><LinkTransaction>None</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="PrimaryEmail"/></UniqueKey></UniqueKeyList><FieldList><Field Name="RecId">3734B48625D043B0939456EBF5B07F43</Field><Field Name="PrimaryEmail">[email protected]</Field></FieldList></BusinessObject></RelatedBusinessObject><RelatedBusinessObject Relationship=""><BusinessObject Name="Journal.Email"><Transaction>None</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="RecId">68360EB2755F4B4084E45F65FCA73162</Field></FieldList></BusinessObject></RelatedBusinessObject></RelatedBusinessObjectList></BusinessObject></BusinessObjectList>
<?xml version="1.0" encoding="UTF-8"?><BusinessObjectListxmlns:msxsl="urn:schemas-microsoft-com:xslt"xmlns:xs="http://www.w3.org/2001/XMLSchema"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"SchemaVersion="1.0"><BusinessObject Name="ServiceReq"><Transaction>Insert</Transaction><UniqueKeyList><UniqueKey><Field Name="ServiceReqNumber"/></UniqueKey></UniqueKeyList><FieldList><Field Name="SvcReqTmplLink"Type="System.String">Domain Password Reset</Field><Field Name="SvcReqSubscLink_RecID"Type="System.String">BDF2D75B420C438E9468BC613E6AB369</Field><Field Name="Price">150.00</Field><Field Name="ProfileLink_RecID"Type="System.String">3734B48625D043B0939456EBF5B07F43</Field></FieldList><RelatedBusinessObjectList><RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam"><BusinessObject Name="ServiceReqParam"><Transaction>Insert</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="ParameterName"Type="System.String">RequesterDepartment</Field><Field Name="ParameterValue" Type="System.String">IT</Field><Field Name="DisplayType"Type="System.String">text</Field></FieldList></BusinessObject></RelatedBusinessObject><RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam"><BusinessObject Name="ServiceReqParam"><Transaction>Insert</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="ParameterName"Type="System.String">Requester</Field><Field Name="ParameterValue"Type="System.String">Alan Taylor</Field><Field Name="DisplayType"Type="System.String">text</Field></FieldList></BusinessObject></RelatedBusinessObject><RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam"><BusinessObject Name="ServiceReqParam"><Transaction>Insert</Transaction><LinkTransaction>Link</LinkTransaction><UniqueKeyList><UniqueKey><Field Name="RecId"/></UniqueKey></UniqueKeyList><FieldList><Field Name="ParameterName"Type="System.String">Email</Field><Field Name="ParameterValue"Type="System.String">[email protected]</Field><Field Name="DisplayType"Type="System.String">text</Field></FieldList></BusinessObject></RelatedBusinessObject></RelatedBusinessObjectList></BusinessObject></BusinessObjectList>