0
這XSLTXSLT的UBL XML找不到節點值
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Order-2"
>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<Things>
<Thing AutoReceive="True">
<xsl:value-of select="Order/cbc:ID" />
</Thing>
</Things>
</xsl:template>
</xsl:stylesheet>
針對該XML
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Unviversal Business Language 2.0
http://docs.oasis-open.org/ubl/os-UBL-2.0/UBL-2.0.html
http://docs.oasis-open.org/ubl/os-UBL-2.0/xsd/maindoc/UBL-Order-2.0.xsd
-->
<Order
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns="urn:oasis:names:specification:ubl:schema:xsd:Order-2"
>
<!-- Mx Generated Order Number -->
<cbc:ID>8343</cbc:ID>
</Order>
找不到節點值。我已經嘗試了很多變體,我已經要求其他三位開發人員來看看它。到目前爲止,我們都無法弄清楚。
<?xml version="1.0" encoding="UTF-8"?>
<Things xmlns="urn:oasis:names:specification:ubl:schema:xsd:Order-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<Thing AutoReceive="True" />
</Things>