forked from serhit/TestDataGenerator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestData_to_Contracts.xsl
55 lines (45 loc) · 2.68 KB
/
TestData_to_Contracts.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<GetAllContractsRequestsResponse>
<GetAllContractsRequestsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<Contracts>
<!-- =========== Перебор тест-кейсов (Вкладок Case1 / Case2) =========== -->
<xsl:for-each select="dataset/data">
<Contract>
<!-- <Number>35001007</Number> -->
<Number><xsl:value-of select="Contract/row/Field[@name='RequestNumber']"/></Number>
<!-- <CreditId>a31ede1b-ef6e-ed11-84d3-005056bf5af5</CreditId> -->
<CreditId><xsl:value-of select="Contract/row/Field[@name='CreditId']"/></CreditId>
<!-- <CreditAmount>2000000.00</CreditAmount> -->
<CreditAmount><xsl:value-of select="Contract/row/Field[@name='CreditAmount']"/></CreditAmount>
<!-- <CreditPercent>10.4500000000</CreditPercent> -->
<CreditPercent><xsl:value-of select="Contract/row/Field[@name='CreditPercent']"/></CreditPercent>
<!-- <CreditTerm>60</CreditTerm> -->
<CreditTerm><xsl:value-of select="Contract/row/Field[@name='CreditTerm']"/></CreditTerm>
<ContractObjects>
<!-- =============== ContractObject/row =============== -->
<xsl:for-each select="ContractObject/row">
<ContractObject>
<!-- <ObjectId>cdb3a837-ef6e-ed11-84d3-005056bf5ab80</ObjectId> -->
<ObjectId><xsl:value-of select="Field[@name='ObjectId']"/></ObjectId>
<!-- <InsPercent>50</InsPercent> -->
<InsPercent><xsl:value-of select="Field[@name='InsPercent']"/></InsPercent>
<!-- <Name>ЗаемщикОдин Николя Петрович</Name> -->
<Name><xsl:value-of select="Field[@name='ObjectName']"/></Name>
<!-- <Role>BORROWER</Role> -->
<Role><xsl:value-of select="Field[@name='Role']"/></Role>
</ContractObject>
</xsl:for-each>
<!-- /=============== ContractObject/row =============== -->
</ContractObjects>
<!--State>NEW</State-->
<State><xsl:value-of select="Contract/row/Field[@name='State']"/></State>
</Contract>
</xsl:for-each>
<!-- / =========== Перебор тест-кейсов (Вкладок Case1 / Case2) =========== -->
</Contracts>
</GetAllContractsRequestsResult>
</GetAllContractsRequestsResponse>
</xsl:template>
</xsl:stylesheet>