Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
属性值上的wso2 xpath选择_Xpath_Wso2_Wso2esb - Fatal编程技术网

属性值上的wso2 xpath选择

属性值上的wso2 xpath选择,xpath,wso2,wso2esb,Xpath,Wso2,Wso2esb,在wso2中,我有一个xml作为本地属性,包含一个带有代码和描述的状态列表(status_list)。 我想为一个给定的代码选择正确的状态。此代码存储在属性中。 我试过类似的方法 <property name="codes" expression="get-property('status_list')" scope="default" type="OM"/> <log level="custom"> <property expression="$ctx:c

在wso2中,我有一个xml作为本地属性,包含一个带有代码和描述的状态列表(status_list)。 我想为一个给定的代码选择正确的状态。此代码存储在属性中。 我试过类似的方法

<property name="codes" expression="get-property('status_list')" scope="default" type="OM"/>
<log level="custom">
    <property expression="$ctx:codes/status[@code='$ctx:code']" name="Test"/>
</log> 

$ctx:代码/状态正常,并显示所有状态的列表,但只要我想“过滤”它们,它就不起作用。 当然,如果我硬编码xpath正在工作的代码

<property expression="$ctx:codes/status[@code='code1']" name="Test"/>


你知道如何做到这一点吗?

好的,最后我离回答不远了。 下面的代码正在运行

<property name="codes" expression="get-property('status_list')" scope="default" type="OM"/>
<log level="custom">
    <property expression="$ctx:codes/status[@code=$ctx:code]" name="Test"/>
</log> 

我只需要删除引号