---
title: XML形式で受信したメールの処理例
slug: neurons-for-itsm/admin-user-help/jpn/latest/IS_N-xml
createdAt: 2026-10-29T01:28:12.234Z
---

- [例 1: 1 つのメールをインポートする](docId\:IS_NtHn2D_nwmu1zSdnnp)
- [例2: インシデントと サービス申請を同じ受信トレイにインポートする](docId\:IS_NtHn2D_nwmu1zSdnnp)

## 例 1: 1 つのメールをインポートする

この例には次の内容が含まれます。

- 顧客から送信された電子メールの例。 以下を参照してください：

```bash
<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](docId\:IS_NtHn2D_nwmu1zSdnnp) にアクセスしてください。
- 適用する XSLT ファイルの例。 ファイルを表示するには、 [Ex1-インポート-スクリプト.xslt](docId\:IS_NtHn2D_nwmu1zSdnnp) にアクセスしてください。
- XSLT ファイルを適用した後の最終的な XML ファイルの例。 XSLT ファイルを適用した後の最終的な XML ファイルの例を確認するには、 [Ex1-インポート-最終-Email.xml](docId\:IS_NtHn2D_nwmu1zSdnnp) にアクセスしてください。

## 例2: インシデントと サービス申請を同じ受信トレイにインポートする

この例では、インシデントと サービス申請を同じ受信トレイにインポートする方法を示しており、次の内容が含まれています。

- インシデントをインポートするために顧客から送信された電子メールの例と、 サービス申請をインポートするために顧客から送信された電子メールの例。

  インシデントをインポートするために顧客から送信された電子メールの例:

```bash
<INCIDENT>
<DESCRIPTION>テスト XML </DESCRIPTION>
<SERVICE>デスクトップ サービス</SERVICE>
<CATEGORY>パフォーマンスの問題</CATEGORY>
<OWNERTEAM>オペレーション</OWNERTEAM>
<OWNER>管理者 管理者</OWNER>
<URGENCY>中</URGENCY>
<IMPACT>中</IMPACT>
<SOURCE>メール</SOURCE>
<PROFILELINK>管理者 管理者</PROFILELINK>
</INCIDENT>
```

- サービス申請をインポートするために顧客から送信された電子メールの例:

```bash
部門$IT
依頼者$Alan Taylor
電子メール$alan.taylor@saasitdemo.com
```

- 元の電子メールから生成されたが、階層型 XML 形式ではない XML ファイルの例。 インシデントをインポートするために生成された XML 電子メール ファイルの例を確認するには、 [Ex2 インポートで生成されたメール.xml](docId\:IS_NtHn2D_nwmu1zSdnnp) にアクセスしてください。 サービス申請をインポートするために生成された XML 電子メール ファイルの例を確認するには、 [Ex2 インポートで生成された Email2.xml](docId\:IS_NtHn2D_nwmu1zSdnnp) にアクセスしてください。
- 適用する XSLT ファイルの例。  インシデントおよび サービス申請の両方をインポートする XSLT ファイルの例については、 [Ex2-インポート-スクリプト3.xslt](docId\:IS_NtHn2D_nwmu1zSdnnp) を参照してください。インシデントをインポートする XSL ファイルの例については、 [Ex2-インポート-スクリプト.xslt](docId\:IS_NtHn2D_nwmu1zSdnnp) を参照してください。 サービス申請をインポートする XSL ファイルの例については、 [Ex2-インポート-スクリプト2.xsl](docId\:IS_NtHn2D_nwmu1zSdnnp) を参照してください。
- インシデントをインポートする場合 (XSL および XSLT ファイルを適用した後の最終的な XML ファイルの例については、 [Ex2-インポート-最終-Email.xml](docId\:IS_NtHn2D_nwmu1zSdnnp) を参照してください)、または サービス申請をインポートする場合 (XSL および XSLT ファイルを適用した後の最終的な XML ファイルの例については、 [Ex2-インポート-最終-Email2.xml](docId\:IS_NtHn2D_nwmu1zSdnnp) を参照してください)、XSLT ファイルを適用した後の最終的な XML ファイルの例については、インシデント ...インシデントをインポートする場合)。

:::ExpandableHeading{customAnchorSlug="Ex1-Impo"}
## Ex1-インポート-生成された電子メール.xml

```bash

<?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">
```

```bash
<BusinessObject Name="">
```

```bash
<EmailMessage>
```

```bash
<MessageID>a6354f29-4771-4095-a6d4-e5c8d318ea8e</MessageID>
```

```bash
<From>Kelly.Yao@frontrange.com</From>
```

```bash
<Header>Return-Path: <Kelly.Yao@frontrange.com> Delivered-To: dev-stg-30@saasitdemo.com 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 <dev-stg-30@saasitdemo.com>; 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: dev-stg-30@saasitdemo.com 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 <Kelly.Yao@frontrange.com>) (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 <Kelly.Yao@frontrange.com> To: "dev-stg-30@saasitdemo.com" <dev-stg-30@saasitdemo.com> 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: <31AC186C71B83241A869D7FDEBCDE12928BF3438@CS-MBX03.na.frs> 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>
```

```bash
<ReplyTo/>
```

```bash
<Sender/>
```

```bash
<To>dev-stg-30@saasitdemo.com</To>
```

```bash
<CC/>
```

```bash
<BCC/>
```

```bash
<TimeStamp>02/10/2015 21:59:42</TimeStamp>
```

```bash
<BlockCount>0</BlockCount>
```

```bash
<Subject>RE: テスト XML メール 2</Subject>
```

```bash
<SubjectID/>
```

```bash
<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>
```

```bash
<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">&lt;INCIDENT&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;DESCRIPTION&gt;xml email processing&lt;/DESCRIPTION&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;SERVICE&gt;Desktop Service&lt;/SERVICE&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;CATEGORY&gt;Performance Issue&lt;/CATEGORY&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;OWNER&gt;Quality Assurance&lt;/OWNER&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;OWNERTEAM&gt;IT&lt;/OWNERTEAM&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;URGENCY&gt;Medium&lt;/URGENCY&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;IMPACT&gt;Medium&lt;/IMPACT&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;SOURCE&gt;Email&lt;/SOURCE&gt;<o:p></o:p></span></p> <p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;PROFILELINK&gt;Kelly Yao&lt;/PROFILELINK&gt;<o:p></o:p></span></p> <p class="MsoNormal"><span style="font-size:10.0pt;font-family:LucidaConsole;color:#B32222">&lt;/INCIDENT&gt;</span><o:p></o:p></p> </div> </body> </html></BodyHTML>
```

```bash
</EmailMessage>
```

```bash
<RelatedBusinessObjectList>
```

```bash
<RelatedBusinessObject Relationship="">
```

```bash
<BusinessObject Name="Employee">
```

```bash
<Transaction>なし</Transaction>
```

```bash
<LinkTransaction>なし</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="PrimaryEmail"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="RecId">74142674F0E947849A940FDCCA63B501/>Field>
```

```bash
<Field Name="PrimaryEmail">Kelly.Yao@frontrange.com</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
<RelatedBusinessObject Relationship="">
```

```bash
<BusinessObject Name="Journal.Email">
```

```bash
<Transaction>なし</Transaction>
```

```bash
<LinkTransaction>リンク</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="RecId">C712701E07F94B00A40CE48F97C8511F</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
</RelatedBusinessObjectList>
```

```bash
</BusinessObject>
```

```bash
</BusinessObjectList>
```
:::

:::ExpandableHeading{customAnchorSlug="Ex1-Impo2"}
## Ex1-インポート-スクリプト.xslt

<font color="#0000ff">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</font>

\<!--





<font color="#006400">この XSLT サンプルは、電子メール サービスによって生成された XML 形式の次の電子メール本文を、スキーマ バージョン "1.0" を使用して統合サーバーで使用できる階層型 XML に変換します。</font>



<font color="#006400">&lt;INCIDENT&gt;</font>

<font color="#006400">&lt;DESCRIPTION&gt;PCがとても遅いです&lt;/DESCRIPTION&gt;</font>

<font color="#006400">&lt;SERVICE&gt;デスクトップ サービス&lt;/SERVICE&gt;</font>

<font color="#006400">&lt;CATEGORY&gt;パフォーマンスの問題&lt;/CATEGORY&gt;</font>

<font color="#006400">&lt;OWNER&gt;品質保証&lt;/OWNER&gt;</font>

<font color="#006400">&lt;OWNERTEAM&gt;それ&lt;/OWNERTEAM&gt;</font>

<font color="#006400">&lt;URGENCY&gt;中&lt;/URGENCY&gt;</font>

<font color="#006400">&lt;IMPACT&gt;中&lt;/IMPACT&gt;</font>

<font color="#006400">&lt;SOURCE&gt;メール&lt;/SOURCE&gt;</font>

<font color="#006400">&lt;/INCIDENT&gt;</font>

\-->







<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:stylesheet version</font><font color="#0000ff">="</font>**2.0**<font color="#0000ff">"</font><font color="#ff0000">xmlns\:xsl</font><font color="#0000ff">="</font>**http\://www\.w3.org/1999/XSL/Transform**<font color="#0000ff">"</font><font color="#ff0000">xmlns\:xsi</font><font color="#0000ff">="</font>**http\://www\.w3.org/2001/XMLSchema-instance**<font color="#0000ff">"</font><font color="#ff0000">xmlns\:xs</font><font color="#0000ff">="</font>**http\://www\.w3.org/2001/XMLSchema**<font color="#0000ff">"</font><font color="#ff0000">xmlns\:user</font><font color="#0000ff">="</font>**urn\:schemas-microsoft-com\:xslt**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**ebody**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Transform to XML fragment</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**params**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**msxsl\:node-set($ebody)/tag\[@name='INCIDENT']/tag**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:template match</font><font color="#0000ff">="</font>**/**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">BusinessObjectList SchemaVersion</font><font color="#0000ff">="</font>**1.0**<font color="#0000ff">"</font><font color="#ff0000">xmlns\:xsi</font><font color="#0000ff">="</font>**http\://www\.w3.org/2001/XMLSchema-instance**<font color="#0000ff">"</font><font color="#ff0000"> xsi\:noNamespaceSchemaLocation</font><font color="#0000ff">="</font>**HierarchicalObjects-1.0.xsd**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080"> Find the profile link RecID of the email sender</font><font color="#0000ff"> --&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**profilelink\_recid**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">For each related business object</font><font color="#0000ff"> --&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:for-each select</font><font color="#0000ff">="</font>**BusinessObjectList/BusinessObject/RelatedBusinessObjectList/RelatedBusinessObject/BusinessObject**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**@Name = 'Employee**<font color="#0000ff">'"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:for-each select</font><font color="#0000ff">="</font>**./FieldList/Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**@Name = 'RecId'**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**.**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:for-each</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:for-each</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:variable</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Find the profile link category of the email sender</font><font color="#0000ff"> --&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**profilelink\_cat**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">For each RelatedBusinessObject</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:for-each select</font><font color="#0000ff">="</font>**BusinessObjectList/BusinessObject/RelatedBusinessObjectList/RelatedBusinessObject/BusinessObject**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**@Name = 'Employee'**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**'Employee'**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:for-each</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:variable</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">For each business object</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:for-each select</font><font color="#0000ff">="</font>**BusinessObjectList/BusinessObject**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080"> Set the business object name</font><font color="#0000ff"> --&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**BusinessObject**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;!-- </font><font color="#808080">Set the business object name to 'Incident'</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**'Incident'**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Set transaction to 'Insert'</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Transaction**<font color="#0000ff">"&gt;</font>**Insert**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Unique key list</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**UniqueKeyList**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**UniqueKey**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**'IncidentNumber'**<font color="#0000ff">"/&gt;&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080"> Field list</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">FieldList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Fields</font><font color="#0000ff"> --&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:for-each select</font><font color="#0000ff">="</font>**EmailMessage/node()**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**name() = 'Subject'**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**'Subject'**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Type**<font color="#0000ff">"&gt;</font>**System.String**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**.**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**name() = 'Body'**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**emailbody**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**starts-with(normalize-space(.), '\&lt;INCIDENT\&gt;')**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:call-template name</font><font color="#0000ff">="</font>**StringToXML**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Remove CRLF</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:with-param name</font><font color="#0000ff">="</font>**text**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**translate(., '\&#xA;', '')**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:call-template</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**'Email body does not contain XML for Incident'**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:variable</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Transform to XML fragment</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**parameters**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**msxsl\:node-set($emailbody)/tag\[@name='INCIDENT']/tag**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**symptom**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**$parameters\[@name='DESCRIPTION']/text()**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**service**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**$parameters\[@name='SERVICE']/text()**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**category**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**$parameters\[@name='CATEGORY']/text()**<font color="#0000ff">"/&gt;</font>



<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**owner**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**$parameters\[@name='OWNER']/text()**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**ownerteam**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**$parameters\[@name='OWNERTEAM']/text()**<font color="#0000ff">"/&gt;</font>



<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**impact**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**$parameters\[@name='IMPACT']/text()**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**urgency**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**$parameters\[@name='URGENCY']/text()**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**source**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**$parameters\[@name='SOURCE']/text()**<font color="#0000ff">"/&gt;</font>



\<!-- Symptom <font color="#0000ff">--&gt;</font>





<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Symptom**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($symptom) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$symptom**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Default Symptom goes here**<font color="#0000ff">&lt;/</font>xsl\:text<font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Service </font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Service**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($service) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$service**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Service Desk**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Category </font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Category**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($category) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$category**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Service Desk**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Owner </font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Owner**<font color="#0000ff">&lt;/</font>xsl\:text<font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($owner) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$owner**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Admin**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Owner team</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**OwnerTeam**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($ownerteam) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$ownerteam**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Service Desk**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Impact </font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Impact**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($impact) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$impact**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**2**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Urgency </font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Urgency**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($urgency) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$urgency**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**2**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!-- </font><font color="#808080">Source </font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Source**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($source) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$source**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Email**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Profile link category</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**ProfileLink\_Category**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($profilelink\_cat) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$profilelink\_cat**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!-- </font><font color="#808080">Set as 'Employee' </font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**Employee**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!-- </font><font color="#808080">Profile link RecID</font><font color="#0000ff"> --&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**Field**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**ProfileLink\_RecID**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**string-length($profilelink\_recid) > 0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$profilelink\_recid**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Set as admin RecID</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>**FB884D18F7B746A0992880F2DFFE749C**<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:text</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:for-each</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">FieldList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Copy the RelatedBusinessObjectList element</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">RelatedBusinessObjectList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:for-each select</font><font color="#0000ff">="</font>**RelatedBusinessObjectList/RelatedBusinessObject**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**RelatedBusinessObject**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**Relationship**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**BusinessObject/@Name = 'Employee'**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**'IncidentOwnerEmployee'**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**BusinessObject/@Name = 'Journal.Email'**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**'IncidentContainsJournal'**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:copy-of select</font><font color="#0000ff">="</font>**node()**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:for-each</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">RelatedBusinessObjectList</font><font color="#0000ff">&gt;</font>



<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:for-each</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">BusinessObjectList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:template</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:template name</font><font color="#0000ff">="</font>**StringToXML**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:param name</font><font color="#0000ff">="</font>**text**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Check if $text is an XML fragment</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**contains($text, '\&lt;')**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**tmp1**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**substring-after($text, '\&lt;')**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**tmp2**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**substring-after($tmp1, '\&gt;')**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**tagName**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**substring-before($tmp1, '\&gt;')**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:variable name</font><font color="#0000ff">="</font>**endTag**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**concat(concat('\&lt;', concat('/', $tagName)), '\&gt;')**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**substring-before($text, '\&lt;')**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Create the tag</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:element name</font><font color="#0000ff">="</font>**tag**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:attribute name</font><font color="#0000ff">="</font>**name**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**translate($tagName, 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:attribute</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">Create the children tree</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:call-template name</font><font color="#0000ff">="</font>**StringToXML**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:with-param name</font><font color="#0000ff">="</font>**text**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**substring-before($tmp2, $endTag)**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:call-template</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:element</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!-- </font><font color="#808080">Create the following siblings tree </font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:call-template name</font><font color="#0000ff">="</font>**StringToXML**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:with-param name</font><font color="#0000ff">="</font>**text**<font color="#0000ff">"</font><font color="#b22222">select</font><font color="#0000ff">="</font>**substring-after($tmp2, $endTag)**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:call-template</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;!--</font><font color="#808080">$text is not an XML fragment, so just print the text itself</font><font color="#0000ff">--&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:when test</font><font color="#0000ff">="</font>**$text !=''**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**$text**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:when</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">xsl\:value-of select</font><font color="#0000ff">="</font>**'Invalid XML. 空の文字列'**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:otherwise</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:choose</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:template</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">xsl\:stylesheet</font><font color="#0000ff">&gt;</font>
:::

:::ExpandableHeading{customAnchorSlug="Ex1-Impo3"}
## Ex1-インポート-最終-Email.xml

<font color="#0000ff">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">BusinessObjectList</font><font color="#ff0000">xmlns\:msxsl</font><font color="#0000ff">="</font>**urn\:schemas-microsoft-com\:xslt**<font color="#0000ff">"</font><font color="#ff0000">xmlns\:xs</font><font color="#0000ff">="</font>**http\://www\.w3.org/2001/XMLSchema**<font color="#0000ff">"</font><font color="#ff0000">xmlns\:xsi</font><font color="#0000ff">="</font>**http\://www\.w3.org/2001/XMLSchema-instance**<font color="#0000ff">"</font><font color="#b22222">xsi\:noNamespaceSchemaLocation</font><font color="#0000ff">="</font>**HierarchicalObjects-1.0.xsd**<font color="#0000ff">"</font><font color="#b22222">SchemaVersion</font><font color="#0000ff">="</font>**1.0**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">BusinessObject Name</font><font color="#0000ff">="</font>**Incident**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Transaction</font><font color="#0000ff">&gt;</font>**Insert**<font color="#0000ff">&lt;/</font><font color="#b22222">Transaction</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">UniqueKeyList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">UniqueKey</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**IncidentNumber**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">UniqueKey</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">UniqueKeyList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">FieldList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**Subject**<font color="#0000ff">"</font> Type<font color="#0000ff">="</font>**System.String**<font color="#0000ff">"&gt;</font>**RE: test xml email 2**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**Symptom**<font color="#0000ff">"&gt;</font>**xml email processing**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**Service**<font color="#0000ff">"&gt;</font>**Desktop Service**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**Category**<font color="#0000ff">"&gt;</font>**Performance Issue**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**Owner**<font color="#0000ff">"&gt;</font>**Quality Assurance**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**OwnerTeam**<font color="#0000ff">"&gt;</font>**IT**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**Impact**<font color="#0000ff">"&gt;</font>**Medium**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**Urgency**<font color="#0000ff">"&gt;</font>**Medium**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**Source**<font color="#0000ff">"&gt;</font>**Email**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**ProfileLink\_Category**<font color="#0000ff">"&gt;</font>**Employee**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**ProfileLink\_RecID**<font color="#0000ff">"&gt;</font>**74142674F0E947849A940FDCCA63B501**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">FieldList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">RelatedBusinessObjectList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">RelatedBusinessObject Relationship</font><font color="#0000ff">="</font>**IncidentOwnerEmployee**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">BusinessObject Name</font><font color="#0000ff">="</font>**Employee**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Transaction</font><font color="#0000ff">&gt;</font>**None**<font color="#0000ff">&lt;/</font><font color="#b22222">Transaction</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">LinkTransaction</font><font color="#0000ff">&gt;</font>**None**<font color="#0000ff">&lt;/</font><font color="#b22222">LinkTransaction</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">UniqueKeyList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">UniqueKey</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**PrimaryEmail**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">UniqueKey</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">UniqueKeyList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">FieldList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**RecId**<font color="#0000ff">"&gt;</font>**74142674F0E947849A940FDCCA63B501**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**PrimaryEmail**<font color="#0000ff">"&gt;</font>**Kelly.Yao\@frontrange.com**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">FieldList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">BusinessObject</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">RelatedBusinessObject</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">RelatedBusinessObject Relationship</font><font color="#0000ff">="</font>**IncidentContainsJournal**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">BusinessObject Name</font><font color="#0000ff">="</font>**Journal.Email**<font color="#0000ff">"&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Transaction</font><font color="#0000ff">&gt;</font>**None**<font color="#0000ff">&lt;/</font><font color="#b22222">Transaction</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">LinkTransaction</font><font color="#0000ff">&gt;</font>**Link**<font color="#0000ff">&lt;/</font><font color="#b22222">LinkTransaction</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">UniqueKeyList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">UniqueKey</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**RecId**<font color="#0000ff">"/&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">UniqueKey</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">UniqueKeyList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">FieldList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;</font><font color="#b22222">Field Name</font><font color="#0000ff">="</font>**RecId**<font color="#0000ff">"&gt;</font>**C712701E07F94B00A40CE48F97C8511F**<font color="#0000ff">&lt;/</font><font color="#b22222">Field</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">FieldList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">BusinessObject</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">RelatedBusinessObject</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">RelatedBusinessObjectList</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">BusinessObject</font><font color="#0000ff">&gt;</font>

<font color="#0000ff">&lt;/</font><font color="#b22222">BusinessObjectList</font><font color="#0000ff">&gt;</font>
:::

:::ExpandableHeading{customAnchorSlug="Ex2-Impo"}
## Ex2 インポートで生成されたメール.xml

<font color="#0000ff">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</font>

```bash
<BusinessObjectList xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"SchemaVersion="1.0">
```

```bash
<BusinessObject Name="">
```

```bash
<EmailMessage>
```

```bash
<MessageID>99289f20-ceac-4c7f-93e1-b5f18068eb8f</MessageID>
```

```bash
<From>Olga.Pasternak@heatsoftware.com</From>
```

```bash
<Header>Return-Path: <Olga.Pasternak@heatsoftware.com> Delivered-To: itsm-dev-stg@saasitdemo.com 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 <itsm-dev-stg@saasitdemo.com>; 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: itsm-dev-stg@saasitdemo.com 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 <Olga.Pasternak@heatsoftware.com>) (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 <Olga.Pasternak@heatsoftware.com> To: "itsm-dev-stg@saasitdemo.com" <itsm-dev-stg@saasitdemo.com> Subject: RE: Test XML 3 Thread-Topic: Test XML 3 Thread-Index: AdB7x8KvLa1rCv1DRFuDEKolkLj8ng== Date: Tue, 21 Apr 2015 00:11:49 +0000 Message-ID: <3DC74DF0B4F8894F867A5A929A825F2D10A68604@CS-MBX03.na.frs> 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>
```

```bash
<ReplyTo/>
```

```bash
<Sender/>
```

```bash
<To>itsm-dev-stg@saasitdemo.com</To>
```

```bash
<CC/>
```

```bash
<BCC/>
```

```bash
<TimeStamp>04/21/2015 00:11:49</TimeStamp>
```

```bash
<BlockCount>0</BlockCount>
```

```bash
<Subject>RE: Test XML 3 </Subject>
```

```bash
<SubjectID/>
```

```bash
<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>
```

```bash
<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">&lt;INCIDENT&gt;<span style="color:#1F497D"><o:p></o:p></span></p> <p class="MsoPlainText"><span style="color:#1F497D">&nbsp; </span>&lt;DESCRIPTION&gt;test <span style="color:#1F497D"> XML Email</span> &lt;/DESCRIPTION&gt;<o:p></o:p></p> <p class="MsoPlainText">&nbsp; &lt;SERVICE&gt;Desktop Service&lt;/SERVICE&gt;<o:p></o:p></p> <p class="MsoPlainText">&nbsp; &lt;CATEGORY&gt;Performance Issue&lt;/CATEGORY&gt;<o:p></o:p></p> <p class="MsoPlainText">&nbsp; &lt;OWNERTEAM&gt;IT&lt;/OWNERTEAM&gt;<o:p></o:p></p> <p class="MsoPlainText">&nbsp; &lt;OWNER&gt;Quality Assurance&lt;/OWNER&gt;<o:p></o:p></p> <p class="MsoPlainText">&nbsp; &lt;URGENCY&gt;Medium&lt;/URGENCY&gt;<o:p></o:p></p> <p class="MsoPlainText">&nbsp; &lt;IMPACT&gt;Medium&lt;/IMPACT&gt;<o:p></o:p></p> <p class="MsoPlainText">&nbsp; &lt;SOURCE&gt;Email&lt;/SOURCE&gt;<o:p></o:p></p> <p class="MsoPlainText">&nbsp; &lt;PROFILELINK&gt;Quality Assurance &lt;/PROFILELINK&gt; <span style="color:#1F497D"> <o:p></o:p></span></p> <p class="MsoPlainText">&lt;/INCIDENT&gt;<o:p></o:p></p> </div> </body> </html></BodyHTML>
```

```bash
</EmailMessage>
```

```bash
<RelatedBusinessObjectList>
```

```bash
<RelatedBusinessObject Relationship="">
```

```bash
<BusinessObject Name="Employee">
```

```bash
<Transaction>None</Transaction>
```

```bash
<LinkTransaction>None</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="PrimaryEmail"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="RecId">3734B48625D043B0939456EBF5B07F43</Field>
```

```bash
<Field Name="PrimaryEmail">Olga.Pasternak@heatsoftware.com</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
<RelatedBusinessObject Relationship="">
```

```bash
<BusinessObject Name="Journal.Email">
```

```bash
<Transaction>None</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="RecId">68360EB2755F4B4084E45F65FCA73162</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
</RelatedBusinessObjectList>
```

```bash
</BusinessObject>
```

```bash
</BusinessObjectList>
```
:::

:::ExpandableHeading{customAnchorSlug="Ex2-Impo2"}
## Ex2 インポートで生成された Email2.xml

<font color="#0000ff">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</font>

```bash
<BusinessObjectList xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"SchemaVersion="1.0">
```

```bash
<BusinessObject Name="">
```

```bash
<EmailMessage>
```

```bash
<MessageID>40d0f80d-50f5-4dc5-a468-4f861106ecdc</MessageID>
```

```bash
<From>Olga.Pasternak@heatsoftware.com</From>
```

```bash
<Header>Return-Path: <Olga.Pasternak@heatsoftware.com> Delivered-To: itsm-dev-stg@saasitdemo.com 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 <itsm-dev-stg@saasitdemo.com>; 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: itsm-dev-stg@saasitdemo.com 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 <Olga.Pasternak@heatsoftware.com>) (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 <Olga.Pasternak@heatsoftware.com> To: "itsm-dev-stg@saasitdemo.com" <itsm-dev-stg@saasitdemo.com> 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: <3DC74DF0B4F8894F867A5A929A825F2D10A68614@CS-MBX03.na.frs> 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>
```

```bash
<ReplyTo/>
```

```bash
<Sender/>
```

```bash
<To>itsm-dev-stg@saasitdemo.com</To>
```

```bash
<CC/>
```

```bash
<BCC/>
```

```bash
<TimeStamp>04/21/2015 00:17:03</TimeStamp>
```

```bash
<BlockCount>0</BlockCount>
```

```bash
<Subject>Request - Domain Password Reset </Subject>
```

```bash
<SubjectID/>
```

```bash
<Body>Department$IT Requester$Alan Taylor Email$alan.taylor@saasitdemo.com </Body>
```

```bash
<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$alan.taylor@saasitdemo.com<o:p></o:p></p> </div> </body> </html></BodyHTML>
```

```bash
</EmailMessage>
```

```bash
<RelatedBusinessObjectList>
```

```bash
<RelatedBusinessObject Relationship="">
```

```bash
<BusinessObject Name="Employee">
```

```bash
<Transaction>None</Transaction>
```

```bash
<LinkTransaction>None</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="PrimaryEmail"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="RecId">3734B48625D043B0939456EBF5B07F43</Field>
```

```bash
<Field Name="PrimaryEmail">Olga.Pasternak@heatsoftware.com</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
<RelatedBusinessObject Relationship="">
```

```bash
<BusinessObject Name="Journal.Email">
```

```bash
<Transaction>None</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="RecId">93B33BDCFCCB45F18AC165718208420E</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
</RelatedBusinessObjectList>
```

```bash
</BusinessObject>
```

```bash
</BusinessObjectList>
```
:::

:::ExpandableHeading{customAnchorSlug="Ex2-Impo3"}
## Ex2-インポート-スクリプト3.xslt

<font color="#0000ff">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</font>

```bash
<!--
```

```bash
この XSLT サンプルは、電子メール XML を、インシデントおよび サービス申請のスキーマ バージョン「1.0」を使用して統合サーバーで使用できる階層型 XML に変換します。
```

```bash
```

```bash
件名に「Request」という用語が含まれている場合、定義されたタイプの サービス申請であると見なされます。
```

```bash
それ以外の場合はインシデントとみなされます。
```

```bash
-->
```

```bash
<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">
```

```bash
<xsl:import href="SR_import.xsl"/>
```

```bash
<xsl:import href="Incident_import.xsl"/>
```

```bash
<xsl:output method="xml"version="1.0"encoding="UTF-8"indent="yes"/>
```

```bash
<xsl:template match="/">
```

```bash
<xsl:variable name="Subject"select= "BusinessObjectList/BusinessObject/EmailMessage/Subject"/>
```

```bash
<xsl:choose>
```

```bash
<xsl:when test="contains($Subject,'Request')">
```

```bash
<xsl:call-template name="SR_import"/>
```

```bash
</xsl:when>
```

```bash
<xsl:otherwise>
```

```bash
<xsl:call-template name="Incident_import"/>
```

```bash
</xsl:otherwise>
```

```bash
</xsl:choose>
```

```bash
</xsl:template>
```

```bash
</xsl:stylesheet>
```
:::

:::ExpandableHeading{customAnchorSlug="Ex2-Impo4"}
## Ex2-インポート-スクリプト.xslt

```bash

<?xml version="1.0" encoding="UTF-8"?>
```

```bash
<!--
```

```bash
この XSLT サンプルは、電子メール XML を、インシデントおよび サービス申請の SchemaVersion "1.0" を使用して統合サーバーで使用できる階層型 XML に変換します。
```

```bash
```

```bash
受信メールの本文は次の形式であると想定します。
```

```bash
```

```bash
<INCIDENT>
```

```bash
<DESCRIPTION>PCがとても遅いです</DESCRIPTION>
```

```bash
<SERVICE>デスクトップ サービス</SERVICE>
```

```bash
<CATEGORY>パフォーマンスの問題</CATEGORY>
```

```bash
<OWNER>品質保証</OWNER>
```

```bash
<OWNERTEAM>それ</OWNERTEAM>
```

```bash
<URGENCY>中</URGENCY>
```

```bash
<IMPACT>中</IMPACT>
```

```bash
<SOURCE>メール</SOURCE>
```

```bash
</INCIDENT>
```

```bash
```

```bash
または
```

```bash
```

```bash
<REQUEST>
```

```bash
<TEMPLATE>ドメインパスワードのリセット</TEMPLATE>
```

```bash
<DESCRIPTION>PCがとても遅いです</DESCRIPTION>
```

```bash
<SERVICE>デスクトップ サービス</SERVICE>
```

```bash
<CATEGORY>パフォーマンスの問題</CATEGORY>
```

```bash
<OWNER>品質保証</OWNER>
```

```bash
<OWNERTEAM>それ</OWNERTEAM>
```

```bash
<URGENCY>中</URGENCY>
```

```bash
<IMPACT>中</IMPACT>
```

```bash
<SOURCE>メール</SOURCE>
```

```bash
</REQUEST>
```

```bash
```

```bash
本文が変更される場合は、それに応じて SRimport.xsl および/または Incidentimport.xsl を変更する必要があります。
```

```bash
-->
```

```bash
```

```bash
<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">
```

```bash
<!--import xslt for: CI.Computer|CI.Server, etc-->
```

```bash
<xsl:import href="SR_import.xsl"/>
```

```bash
<xsl:import href="Incident_import.xsl"/>
```

```bash
<xsl:output method="xml"version="1.0"encoding="UTF-8"indent="yes"/>
```

```bash
<xsl:template match="/">
```

```bash
<xsl:choose>
```

```bash
<xsl:when test="BusinessObjectList/BusinessObject/EmailMessage/Body/REQUEST">
```

```bash
<xsl:call-template name="SR_import"/>
```

```bash
</xsl:when>
```

```bash
<xsl:otherwise>
```

```bash
<xsl:call-template name="SR_import"/>
```

```bash
</xsl:otherwise>
```

```bash
</xsl:choose>
```

```bash
</xsl:template>
```

```bash
</xsl:stylesheet>
```
:::

:::ExpandableHeading{customAnchorSlug="Ex2-Impo5"}
## Ex2-インポート-スクリプト2.xsl

<font color="#0000ff">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</font>

```bash
<!-- 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$alan.taylor@saasitdemo.com-->
```

```bash
<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">
```

```bash
<xsl:template name="SR_import"match="/">
```

```bash
<!-- サービス申請のヘッダー XML 。 これらはすべてのタイプで一貫しています。 -->
```

```bash
<BusinessObjectListxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="HierarchicalObjects-1.0.xsd"SchemaVersion="1.0">
```

```bash
<BusinessObject Name="ServiceReq">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="ServiceReqNumber"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<!--First, we will load variables so we can use them easily later-->
```

```bash
<xsl:variable name="Subject"select="BusinessObjectList/BusinessObject/EmailMessage/Subject"/>
```

```bash
<xsl:variable name="Body"select="BusinessObjectList/BusinessObject/EmailMessage/Body"/>
```

```bash
<!--Find the profile link RecID of the email sender, they will be the service requester-->
```

```bash
<xsl:variable name="ProfileRecId">
```

```bash
<xsl:for-each select="BusinessObjectList/BusinessObject/RelatedBusinessObjectList/RelatedBusinessObject/BusinessObject">
```

```bash
<xsl:choose>
```

```bash
<xsl:when test="@Name = 'Employee'">
```

```bash
<xsl:for-each select="./FieldList/Field">
```

```bash
<xsl:choose>
```

```bash
<xsl:when test="@Name = 'RecId'">
```

```bash
<xsl:value-of select="."/>
```

```bash
</xsl:when>
```

```bash
</xsl:choose>
```

```bash
</xsl:for-each>
```

```bash
</xsl:when>
```

```bash
</xsl:choose>
```

```bash
</xsl:for-each>
```

```bash
</xsl:variable>
```

```bash
<!--switch ステートメントは、各テンプレート タイプの処理をメールの件名に基づいて分離します。 この例では、「ドメイン パスワードのリセット」という 1 つの申請項目のみをサポートしています。 -->
```

```bash
<xsl:choose>
```

```bash
<!--There will be a separate when section for each type of service request supported -->
```

```bash
<xsl:when test="contains($Subject,'Domain Password Reset')">
```

```bash
<!-- Now let's parse the body for the fields we want for a domain password reset -->
```

```bash
<!--Department:-->
```

```bash
<xsl:variable name="dept"select="substring-after($Body,'Department$')"/>
```

```bash
<!--Stop at the newline character -->
```

```bash
<!--Requester:-->
```

```bash
<xsl:variable name="requestor"select="substring-after($Body,'Requester$')"/>
```

```bash
<!--Email: -->
```

```bash
<xsl:variable name="email"select="substring-after($Body,'Email$')"/>
```

```bash
<!--Fill in the necessary fields and related business objects for a domain password reset-->
```

```bash
<FieldList>
```

```bash
<Field Name="SvcReqTmplLink" Type="System.String">Domain Password Reset</Field>
```

```bash
<!--Replace this subscription RecID with the valid one for your system:-->
```

```bash
<Field Name="SvcReqSubscLink_RecID"Type="System.String">BDF2D75B420C438E9468BC613E6AB369</Field>
```

```bash
<Field Name="Price">150.00</Field>
```

```bash
<Field Name="ProfileLink_RecID"Type="System.String">
```

```bash
<xsl:value-of select="$ProfileRecId"/>
```

```bash
</Field>
```

```bash
</FieldList>
```

```bash
<RelatedBusinessObjectList>
```

```bash
<RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam">
```

```bash
<BusinessObject Name="ServiceReqParam">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="ParameterName"Type="System.String">RequesterDepartment</Field>
```

```bash
<Field Name="ParameterValue"Type="System.String">
```

```bash
<xsl:choose>
```

```bash
<xsl:when test="contains($dept, ' ')">
```

```bash
<xsl:value-of select="substring-before($dept,' ')"/>
```

```bash
</xsl:when>
```

```bash
<xsl:otherwise>
```

```bash
<xsl:value-of select="$dept"/>
```

```bash
</xsl:otherwise>
```

```bash
</xsl:choose>
```

```bash
</Field>
```

```bash
<Field Name="DisplayType"Type="System.String">text</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
<RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam">
```

```bash
<BusinessObject Name="ServiceReqParam">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="ParameterName"Type="System.String">Requester</Field>
```

```bash
<Field Name="ParameterValue"Type="System.String">
```

```bash
<xsl:choose>
```

```bash
<xsl:when test="contains($requestor, ' ')">
```

```bash
<xsl:value-of select="substring-before($requestor,' ')"/>
```

```bash
</xsl:when>
```

```bash
<xsl:otherwise>
```

```bash
<xsl:value-of select="$requestor"/>
```

```bash
</xsl:otherwise>
```

```bash
</xsl:choose>
```

```bash
</Field>
```

```bash
<Field Name="DisplayType"Type="System.String">text</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
<RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam">
```

```bash
<BusinessObject Name="ServiceReqParam">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="ParameterName"Type="System.String">Email</Field>
```

```bash
<Field Name="ParameterValue"Type="System.String">
```

```bash
<xsl:choose>
```

```bash
<xsl:when test="contains($email, ' ')">
```

```bash
<xsl:value-of select="substring-before($email,' ')"/>
```

```bash
</xsl:when>
```

```bash
<xsl:otherwise>
```

```bash
<xsl:value-of select="$email"/>
```

```bash
</xsl:otherwise>
```

```bash
</xsl:choose>
```

```bash
</Field>
```

```bash
<Field Name="DisplayType" Type="System.String">text</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
</RelatedBusinessObjectList>
```

```bash
</xsl:when>
```

```bash
<!--Next service request type would placed here in its own xsl:when block-->
```

```bash
<xsl:otherwise>
```

```bash
<other/>
```

```bash
</xsl:otherwise>
```

```bash
</xsl:choose>
```

```bash
<!--Now close the service request XML-->
```

```bash
</BusinessObject>
```

```bash
</BusinessObjectList>
```

```bash
</xsl:template>
```

```bash
</xsl:stylesheet>
```
:::

:::ExpandableHeading{customAnchorSlug="Ex2-Impo6"}
## Ex2-インポート-最終-Email.xml

<font color="#0000ff">&lt;?xml version="1.0" encoding="UTF-8"?&gt;</font>

```bash
<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">
```

```bash
<BusinessObject Name="Incident">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="IncidentNumber"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="Subject" Type="System.String">RE: Test XML 3</Field>
```

```bash
<Field Name="Symptom">test XML Email</Field>
```

```bash
<Field Name="Service">Desktop Service</Field>
```

```bash
<Field Name="Category">Performance Issue</Field>
```

```bash
<Field Name="Owner">Quality Assurance</Field>
```

```bash
<Field Name="OwnerTeam">IT</Field>
```

```bash
<Field Name="Impact">Medium</Field>
```

```bash
<Field Name="Urgency">Medium</Field>
```

```bash
<Field Name="Source">Email</Field>
```

```bash
<Field Name="ProfileLink_Category">Employee</Field>
```

```bash
<Field Name="ProfileLink_RecID">3734B48625D043B0939456EBF5B07F43</Field>
```

```bash
</FieldList>
```

```bash
<RelatedBusinessObjectList>
```

```bash
<RelatedBusinessObject Relationship="">
```

```bash
<BusinessObject Name="Employee">
```

```bash
<Transaction>None</Transaction>
```

```bash
<LinkTransaction>None</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="PrimaryEmail"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="RecId">3734B48625D043B0939456EBF5B07F43</Field>
```

```bash
<Field Name="PrimaryEmail">Olga.Pasternak@heatsoftware.com</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
```

```bash
<RelatedBusinessObject Relationship="">
```

```bash
<BusinessObject Name="Journal.Email">
```

```bash
<Transaction>None</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="RecId">68360EB2755F4B4084E45F65FCA73162</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
</RelatedBusinessObjectList>
```

```bash
</BusinessObject>
```

```bash
</BusinessObjectList>
```
:::

:::ExpandableHeading{customAnchorSlug="Ex2-Impo7"}
## Ex2-インポート-最終-Email2.xml

```bash

<?xml version="1.0" encoding="UTF-8"?>
```

```bash
<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">
```

```bash
<BusinessObject Name="ServiceReq">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="ServiceReqNumber"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="SvcReqTmplLink"Type="System.String">Domain Password Reset</Field>
```

```bash
<Field Name="SvcReqSubscLink_RecID"Type="System.String">BDF2D75B420C438E9468BC613E6AB369</Field>
```

```bash
<Field Name="Price">150.00</Field>
```

```bash
<Field Name="ProfileLink_RecID"Type="System.String">3734B48625D043B0939456EBF5B07F43</Field>
```

```bash
</FieldList>
```

```bash
```

```bash
<RelatedBusinessObjectList>
```

```bash
<RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam">
```

```bash
<BusinessObject Name="ServiceReqParam">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="ParameterName"Type="System.String">RequesterDepartment</Field>
```

```bash
<Field Name="ParameterValue" Type="System.String">IT</Field>
```

```bash
<Field Name="DisplayType"Type="System.String">text</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
```

```bash
<RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam">
```

```bash
<BusinessObject Name="ServiceReqParam">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="ParameterName"Type="System.String">Requester</Field>
```

```bash
<Field Name="ParameterValue"Type="System.String">Alan Taylor</Field>
```

```bash
<Field Name="DisplayType"Type="System.String">text</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
```

```bash
<RelatedBusinessObject Relationship="ServiceReqContainsServiceReqParam">
```

```bash
<BusinessObject Name="ServiceReqParam">
```

```bash
<Transaction>Insert</Transaction>
```

```bash
<LinkTransaction>Link</LinkTransaction>
```

```bash
<UniqueKeyList>
```

```bash
<UniqueKey>
```

```bash
<Field Name="RecId"/>
```

```bash
</UniqueKey>
```

```bash
</UniqueKeyList>
```

```bash
<FieldList>
```

```bash
<Field Name="ParameterName"Type="System.String">Email</Field>
```

```bash
<Field Name="ParameterValue"Type="System.String">alan.taylor@saasitdemo.com</Field>
```

```bash
<Field Name="DisplayType"Type="System.String">text</Field>
```

```bash
</FieldList>
```

```bash
</BusinessObject>
```

```bash
</RelatedBusinessObject>
```

```bash
</RelatedBusinessObjectList>
```

```bash
</BusinessObject>
```

```bash
</BusinessObjectList>
```
:::
