Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/reporting-services/3.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
Xml XSL转换:获取属性的值_Xml_Xslt - Fatal编程技术网

Xml XSL转换:获取属性的值

Xml XSL转换:获取属性的值,xml,xslt,Xml,Xslt,我试图在源数据摘录中显示如下所示的location属性值: <svrl:failed-assert test="cda:manufacturedMaterial/cda:code/@codeSystem = ' 2.16.840.1.113883.6.88' or cda:manufacturedMaterial/cda:code/@codeSystem = '2.16.840.1.113883.6.59' or cda:manufacturedMaterial/cda:code/@co

我试图在源数据摘录中显示如下所示的location属性值:

<svrl:failed-assert test="cda:manufacturedMaterial/cda:code/@codeSystem = '
2.16.840.1.113883.6.88' or cda:manufacturedMaterial/cda:code/@codeSystem = 
'2.16.840.1.113883.6.59' or cda:manufacturedMaterial/cda:code/@codeSystem =
'2.16.840.1.113883.6.96'" location="/*[local-name()='ClinicalDocument' and
namespace-uri()='urn:hl7-org:v3']/*[local-name()='component' and namespace
-uri()='urn:hl7-org:v3']/*[local-name()='structuredBody' and namespace-uri(
)='urn:hl7-org:v3']/*[local-name()='component' and namespace-uri()='urn:hl7
-org:v3'][11]/*[local-name()='section' and namespace-uri()='urn:hl7-org:v3'
]/*[local-name()='entry' and namespace-uri()='urn:hl7-org:v3'][1]/*[local-n
ame()='substanceAdministration' and namespace-uri()='urn:hl7-org:v3']/*[loc
al-name()='consumable' and namespace-uri()='urn:hl7-org:v3']/*[local-name()
='manufacturedProduct' and namespace-uri()='urn:hl7-org:v3']">

        The value for manufacturedMaterial / code in a product template SHOULD  
        selected from the RxNorm (2.16.840.1.113883.6.88) code system for medicaTions,   
        and from the CDC Vaccine Code (2.16.840.1.113883.6.59) code system for 
        immunizations or MAY be selected from ValueSet 2.16.840.1.113883.1.11.20.8 
        MedicationTypeCode STATIC 200017.

</svrl:failed-assert>

我尝试了两个函数,如
text()
,来提取值,但没有任何效果。

考虑到已正确声明名称空间-

        <b><xsl:value-of select="@test"/></b>
        <b><xsl:value-of select="@location"/></b>


select=“text()/svrl:failed assert/@test”中有错误。如果您所指的是发布的元素,则应该是:
select=“@test”
。与
@location
相同(使用
select=“@location”
)。但是由于没有打印
,因此可能还有其他错误(您可能需要声明名称空间)。请发布完整的XSL或至少相关的模板和变量。同时发布源代码。如果文件太大,请至少发布所选节点(根节点、重要节点)的上下文。显示名称空间头也很重要。如果源在命名空间中声明了
match
select
属性中的元素名称,则必须在它们前面加前缀。
The value for manufacturedMaterial / code in a product template SHOULD  
selected from the RxNorm (2.16.840.1.113883.6.88) code system for medicaTions,   
and from the CDC Vaccine Code (2.16.840.1.113883.6.59) code system for 
immunizations or MAY be selected from ValueSet 2.16.840.1.113883.1.11.20.8 
MedicationTypeCode STATIC 200017.
        <b><xsl:value-of select="@test"/></b>
        <b><xsl:value-of select="@location"/></b>