本文介绍了从具有命名空间的XML的XML创建XSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="SampleV1.xsl"?>
<sh:StandardBusinessDocument xmlns:sh="http://xyz/namespaces/StandardBusinessDocumentHeader" xmlns:eanucc="urn:ean.ucc:2" xmlns:gdsn="urn:ean.ucc:gdsn:2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xyz/namespaces/StandardBusinessDocumentHeader ../Schemas/sbdh/Header.xsd urn:ean.ucc:2 ../Schemas/Proxy.xsd">
<eanucc:message>
<entityIdentification>
<uniqueCreatorIdentification>2041175501</uniqueCreatorIdentification>
</entityIdentification>
</eanucc:message>
</sh:StandardBusinessDocument>
我想创建一个XSL,我将在其中显示 uniqueCreatorIdentification
I want to create a XSL where i will show uniqueCreatorIdentification
谢谢和问候
Er.Pradipta Nayak
Er.Pradipta Nayak
Thanks and Regards
Er.Pradipta Nayak
Visit my Blog
Xchanging
Er.Pradipta Nayak
Visit my Blog
Xchanging
推荐答案
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:sh="http://xyz/namespaces/StandardBusinessDocumentHeader"
xmlns:eanucc="urn:ean.ucc:2"
>
<xsl:output method="text"/>
<xsl:template match="/sh:StandardBusinessDocument/eanucc:message/entityIdentification">
<xsl:value-of select="uniqueCreatorIdentification"/>
</xsl:template>
</xsl:stylesheet>
这篇关于从具有命名空间的XML的XML创建XSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!