[英]What is the meaning of '/' in following TIBCO expression
我在Tibco業務工作模塊中有以下代碼
$ES_GetInfo/root/pfx4:GetInformationAndPropertyDetailsResponse/pfx4:LicenseInfo/pfx4:CoreEnt/pfx4:Ent
[pfx4:Ent/pfx4:EntOfferingCode = $Read_DB_Data/group/ROW/EOC]
/pfx4:EntState = "Disabled"
我知道它正在將"EntOfferingCode"
與"EOC"
進行比較,但無法獲得表達式"/pfx4:EntState = 'Disabled'"
?
根據TIBCO,整個表達式返回一個布爾值。
"/pfx4:entState='Disabled'"
的含義是什么。 是合乎邏輯的還是有條件的?
整個表達式是邏輯條件。 “ /”只是XPath(XML路徑語言)語法中的xml模式元素分隔符。 您可以從這里開始學習tibco xpath https://docs.tibco.com/pub/activematrix_businessworks/6.3.0/doc/html/GUID-D319018B-AA74-428D-A034-E477778AD2B6.html
該表達式首先過濾所有具有EntOfferingCode = $ Read_DB_Data / group / ROW / EOC的“ Ent”節點,然后檢查過濾結果中是否存在EntState =“ Disabled”
表達式可以替換為
not (empty($Start/pfx:GetInformationAndPropertyDetailsResponse/pfx:LicenseInfo/pfx:CoreEnt/pfx:Ent[ pfx:EntOfferingCode= "EOC" and pfx:EntState = "Disabled"]))
例如
如果架構像
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.tibco.com/schemas/TestProcess/Schema/Schema.xsd"
targetNamespace="http://www.tibco.com/schemas/TestProcess/Schema/Schema.xsd"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:element name="GetInformationAndPropertyDetailsResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="LicenseInfo" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LicenseInfo">
<xs:complexType>
<xs:sequence>
<xs:element ref="CoreEnt" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CoreEnt">
<xs:complexType>
<xs:sequence>
<xs:element ref="Ent" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Ent">
<xs:complexType>
<xs:sequence>
<xs:element name="EntOfferingCode" type="xs:string"/>
<xs:element name="EntState" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
表達式返回true:
<?xml version = "1.0" encoding = "UTF-8"?>
<GetInformationAndPropertyDetailsResponse xmlns = "http://www.tibco.com/schemas/TestProcess/Schema/Schema.xsd">
<LicenseInfo>
<CoreEnt>
<Ent>
<EntOfferingCode>EOC</EntOfferingCode>
<EntState>Disabled</EntState>
</Ent>
</CoreEnt>
</LicenseInfo>
</GetInformationAndPropertyDetailsResponse>
表達式返回false:
<?xml version = "1.0" encoding = "UTF-8"?>
<GetInformationAndPropertyDetailsResponse xmlns = "http://www.tibco.com/schemas/TestProcess/Schema/Schema.xsd">
<LicenseInfo>
<CoreEnt>
<Ent>
<EntOfferingCode>EOC</EntOfferingCode>
<EntState>Enabled</EntState>
</Ent>
<Ent>
<EntOfferingCode>EOC1</EntOfferingCode>
<EntState>Disabled</EntState>
</Ent>
</CoreEnt>
</LicenseInfo>
</GetInformationAndPropertyDetailsResponse>
如果你只是用
$ES_GetInfo/root/pfx4:GetInformationAndPropertyDetailsResponse/pfx4:LicenseInfo/pfx4:CoreEnt/pfx4:Ent/pfx4:EntState = "Disabled"
這兩個示例都將返回true
如果您的問題是xslt表達式是什么意思,則基本上是在檢查以下內容:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.