Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/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_Xslt 1.0_Xslt 2.0 - Fatal编程技术网

Xml 如何使用;当前();XSL中的语句类型

Xml 如何使用;当前();XSL中的语句类型,xml,xslt,xslt-1.0,xslt-2.0,Xml,Xslt,Xslt 1.0,Xslt 2.0,嗨, 这是一个XML,我正在工作,我需要访问一个特定的数据,请帮助所需的输出是:Hello_World <catalog xmlns:merge="http://www.merge.org/change" > <cd> <title> <a>Empire Burlesque</a> <b>Manik</b> <

嗨, 这是一个XML,我正在工作,我需要访问一个特定的数据,请帮助所需的输出是:Hello_World

<catalog 
    xmlns:merge="http://www.merge.org/change" >
    <cd>
        <title>
            <a>Empire Burlesque</a>
            <b>Manik</b>
        </title>
        <artist>       
            <a>Bob Dylan</a>
            <b>Aayush</b>
        </artist>
        <country>       
            <note>
                <para>A small quantity of hydraulic fluid on the inner cylinder is satisfactory 
                    <merge:change>Hello_World
                    </merge:change>
                </para>
            </note>
        </country>
        <company>Columbia</company>
        <price>10.90</price>
        <year>1985</year>
    </cd>
    <cd>
        <title>Hide your heart</title>
        <artist>Bonnie Tyler</artist>
        <country>UK</country>
        <company>CBS Records</company>
        <price>9.90</price>
        <year>1988</year>
    </cd>
</catalog>
改变



表达式
para/*[name()='merge:change']
表示名为
merge:change
change的para的子级

<xsl:value-of select="current()/note/para [name()='merge:change']"/>



表达式
para/*[name()='merge:change']
表示一个名为
merge:change

的para的孩子应该做这项工作。您好,欢迎回复。您能告诉我如何使用“current()/note/para[name()='merge:change']”这类函数吗。实际上,我需要使用函数来访问merge:change的内容。这不是一个函数,但很可能是一个谓词
来完成这项工作。您好,谢谢您的回复。您能告诉我如何使用“current()/note/para[name()='merge:change']”这类函数吗。实际上,我需要使用函数来访问merge:change的内容。这不是一个函数,但很可能是一个谓词
current()
部分是多余的。是的。我保留了那个部分,因为它包含在他的问题中。
current()
部分是多余的。是的。我保留了这一部分,因为它已包括在他的问题中。
Hello_World
<xsl:value-of select="current()/note/para [name()='merge:change']"/>
<xsl:value-of select="current()/note/para/*[name()='merge:change']"/>