从 <CASH_RECEIPT_LOG> 中删除 xmlns: 属性
Remove xmlns: attributes from <CASH_RECEIPT_LOG>
我有以下 XML 文件
<?xml version="1.0" encoding="UTF-8"?>
<ns3:Bonger xmlns:ns3="http://NEXSTEP.Schemas.Bonger" xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
<ROUTE_RECORD>
<ns2:SENDER Sender_code="BO_SERVER"/>
<ns2:RECEIPIENT Receipient_code="MASTER"/>
<ns2:MESSAGE_ID Type_name="Bonger" Version_number="1.0"/>
<ns2:DATE Date_of_preparation="2019-05-07+02:00" Time_of_preparation="15:14:24"/>
<ns2:OverAllStatus>NY</ns2:OverAllStatus>
</ROUTE_RECORD>
<MESSAGE_RECORD>
<InsertChange>
<Message>
<ns2:MessageId>1</ns2:MessageId>
<ns2:FirmaNr>0</ns2:FirmaNr>
<ns2:Status>NY</ns2:Status>
<ns2:OpprettetEndretSlettet>
<ns2:OpprettetTidspunkt>2019-05-07+02:00</ns2:OpprettetTidspunkt>
<ns2:OpprettetKl>15:13:14.636+02:00</ns2:OpprettetKl>
<ns2:EndretTidspunkt>2019-05-07+02:00</ns2:EndretTidspunkt>
<ns2:EndretKl>15:14:15.492+02:00</ns2:EndretKl>
<ns2:EndretAv>ADMIN</ns2:EndretAv>
</ns2:OpprettetEndretSlettet>
</Message>
<Bongnr>B01-110</Bongnr>
<RegisterId>B01</RegisterId>
<DokumentType>B</DokumentType>
<DokumentNr>B01-110</DokumentNr>
<Avdeling>0</Avdeling>
<KundeNr>0</KundeNr>
<VareLager>553</VareLager>
<BetalingsBetingelse/>
<Brukernavn>ADMIN</Brukernavn>
<Ordrerabatt>0</Ordrerabatt>
<OrdrerabattSum>0</OrdrerabattSum>
<Selger>0</Selger>
<Bonglinjer>
<Bonglinje xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns3:Varelinje">
<createdTime>2019-05-07T15:13:14.636+02:00</createdTime>
<createdBy>ADMIN</createdBy>
<changedBy>ADMIN</changedBy>
<linjenr>10</linjenr>
<varenr>54295197</varenr>
<varetext>FURU 98X098 CUIMP K-VIRKE C24</varetext>
<amount>20</amount>
<enhetkode>LM</enhetkode>
<salesPrice>
<ns2:BelopFelt>77.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</salesPrice>
<salesPriceExVat>
<ns2:BelopFelt>61.600</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</salesPriceExVat>
<originalSalesPriceExVat>
<ns2:BelopFelt>61.6</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</originalSalesPriceExVat>
<costPrice>
<ns2:BelopFelt>0.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</costPrice>
<costPriceExVat>
<ns2:BelopFelt>0.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</costPriceExVat>
<discount1>0.00</discount1>
<discount2>0.00</discount2>
<specialDiscount1>0.00</specialDiscount1>
<specialDiscount2>0.00</specialDiscount2>
<ordreDiscount>0.000000</ordreDiscount>
<discountedPrice>
<ns2:BelopFelt>77.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</discountedPrice>
<discountedPriceExVat>
<ns2:BelopFelt>61.60</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</discountedPriceExVat>
<sumSalesPrice>
<ns2:BelopFelt>1540.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumSalesPrice>
<sumSalesPriceExVat>
<ns2:BelopFelt>1232.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumSalesPriceExVat>
<sumCostPrice>
<ns2:BelopFelt>0.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumCostPrice>
<sumCostPriceExVat>
<ns2:BelopFelt>0.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumCostPriceExVat>
<sumDiscountedPrice>
<ns2:BelopFelt>1540.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumDiscountedPrice>
<sumDiscountedPriceExVat>
<ns2:BelopFelt>1232.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumDiscountedPriceExVat>
<mvaKode>VHØY</mvaKode>
<mvaSats>25.00</mvaSats>
<kampanje/>
<offlinePrice>false</offlinePrice>
</Bonglinje>
</Bonglinjer>
<totalSum>
<ns2:BelopFelt>1232.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</totalSum>
<totalDiscountedSum>
<ns2:BelopFelt>1232.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</totalDiscountedSum>
<totalSumInkVat>
<ns2:BelopFelt>1540.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</totalSumInkVat>
<totalDiscountedSumInkVat>
<ns2:BelopFelt>1540.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</totalDiscountedSumInkVat>
<vat>
<ns2:BelopFelt>308.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
<percent>25.00</percent>
</vat>
<DepositumInnbetalt>
<ns2:BelopFelt>0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</DepositumInnbetalt>
<DepositumFratrukket>
<ns2:BelopFelt>0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</DepositumFratrukket>
<BetaltCash>
<ns2:BelopFelt>1000</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</BetaltCash>
<BetaltCard>
<ns2:BelopFelt>700</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</BetaltCard>
<EkstraUttak>
<ns2:BelopFelt>0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</EkstraUttak>
<CardInfo>
<KortBetaling>
<sum>
<ns2:BelopFelt>500</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sum>
<ref>003144474517</ref>
<timepoint>2019-05-07T15:13:30.000+02:00</timepoint>
<typeCode>1</typeCode>
</KortBetaling>
<KortBetaling>
<sum>
<ns2:BelopFelt>200</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sum>
<ref>003145474521</ref>
<timepoint>2019-05-07T15:13:55.000+02:00</timepoint>
<typeCode>1</typeCode>
</KortBetaling>
</CardInfo>
<BetaltGiftcard>
<ns2:BelopFelt>0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</BetaltGiftcard>
<MoneyBack>
<ns2:BelopFelt>160</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</MoneyBack>
<RoundingAmount>
<ns2:BelopFelt>0.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</RoundingAmount>
<printDocument>
<document>S09OVEFOVEtWSVRURVJJTkcKMDcuMDUuMjAxOSAxNToxNDoxNQoKR2F1c2RhbCBMYW5kaGFuZGxlcmkgQVMKU3RhbmRhcmQgYXZkZWxpbmcKR2F1c2RhbHN2ZWdlbiAyMAoyNjI0IExpbGxlaGFtbWVyCjkzMzczNTg0MiBNVkEgRm9yZXRha3NyZWdpc3RlcmV0ClRsZjogNjEyMjAwMDAKCkRlcmVzIHJlZjogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKUmVrdmlzaXNqb246ICAgICAgICAgICAgICAgICAgICAgICAgICAgIApWw6VyIHJlZjogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMApCb25nbnVtbWVyOiAgICAgICAgICAgICAgICAgICAgICBCMDEtMTEwCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KNTQyOTUxOTcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIApGVVJVIDk4WDA5OCBDVUlNUCBLLVZJUktFIEMyNCAgICAgICAgICAgCiAgMjAsMDAwIExNICAgICA3NywwMCAgIDAsMDAlICAgIDE1NDAsMDAKCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KU3VtIMOlIGJldGFsZTogICAgICAgICAgICAgICAgICAgIDE1NDAsMDAKCi1CZXRhbHQga29udGFudDogICAgICAgICAgICAgICAgIDEwMDAsMDAKLUJldGFsdCBrb3J0OiAgICAgICAgICAgICAgICAgICAgIDcwMCwwMApUaWxiYWtlOiAgICAgICAgICAgICAgICAgICAgICAgICAgMTYwLDAwCgpTYXRzJSAgRWtza2wubXZhICsgICAgTXZhID0gICAgIElua2wubXZhCjI1LDAwICAgIDEyMzIsMDAgICAzMDgsMDAgPSAgICAgIDE1NDAsMDAKCgpUYWtrIGZvciBoYW5kZWxlbiBvZyB2ZWxrb21tZW4gdGlsYmFrZSAhChtiBAECUEIwMS0xMTAeCgoKQkFYOiAxMTEwMTAtNzIyMDQzMTAKMDcvMDUvMjAxOSAxNToxMwogCkJhbmtBeGVwdAoqKioqKioqKioqKioqMDAxOTgtMQpBSUQ6RDU3ODAwMDAwMjEwMTAKVFZSOjgwODAwNDgwMDAKVFNJOjY4MDAKUkVGOjUxNyAwMDMxNDQ0NzQ1MTcKUkVTUDowMCBHT0RLSkVOVAogCk5PSz0gICAgICAgICAgNTAwLDAwCiAKVFJVTUYgUkVHSVNUUkVSVAoKQkFYOiAxMTEwMTAtNzIyMDQzMTAKMDcvMDUvMjAxOSAxNToxMwogCkJhbmtBeGVwdAoqKioqKioqKioqKioqMDAxOTgtMQpBSUQ6RDU3ODAwMDAwMjEwMTAKVFZSOjgwODAwNDgwMDAKVFNJOjY4MDAKUkVGOjUxNyAwMDMxNDU0NzQ1MjEKUkVTUDowMCBHT0RLSkVOVAogCk5PSz0gICAgICAgICAgMjAwLDAwCiAKVFJVTUYgUkVHSVNUUkVSVAoKCgobZAM=</document>
<mimetype>text/plain</mimetype>
</printDocument>
</InsertChange>
</MESSAGE_RECORD>
</ns3:Bonger>
我有一个如下所示的 XSL 转换器
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns3="http://NEXSTEP.Schemas.Bonger" xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
<xsl:template match="*">
<xsl:element name="{name()}" namespace="{namespace-uri()}">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="/ns3:Bonger">
<CASH_RECEIPT_LOG xmlns:xsi="urn:ifsworld-com:schemas:receive_cash_receipt_pos" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<MSG_CONTRACT>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/Avdeling"/>
</MSG_CONTRACT>
<MSG_DATE>
<xsl:value-of select="concat(MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetTidspunkt, ' ',MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetKl )"/>
</MSG_DATE>
<CASH_RECEIPTS>
<CASH_RECEIPT>
<CASH_RECEIPT_NO>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/Bongnr"/>
</CASH_RECEIPT_NO>
<CASH_RECEIPT_DATE>
<xsl:value-of select="concat(MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetTidspunkt, ' ',MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetKl )"/>
</CASH_RECEIPT_DATE>
<CONTRACT>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/Avdeling"/>
</CONTRACT>
<WORKSTATION_ID>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/RegisterId"/>
</WORKSTATION_ID>
<EMPLOYEE_ID>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/Brukernavn"/>
</EMPLOYEE_ID>
<CASH_REGISTER_ID>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/RegisterId"/>
</CASH_REGISTER_ID>
<CREATE_DATE>
<xsl:value-of select="concat(MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetTidspunkt, ' ',MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetKl )"/>
</CREATE_DATE>
<LINES>
<xsl:for-each select="MESSAGE_RECORD/InsertChange">
<xsl:if test="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt[string-length() > 0]">
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO>
<xsl:value-of select="Bonglinjer/Bonglinje/linjenr"/>
</CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>INVPARTSALE</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1000</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>
<xsl:value-of select="Bonglinjer/Bonglinje/varenr"/>
</REFERENCE>
<REGULAR_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/salesPriceExVat/ns2:BelopFelt"/>
</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/discountedPriceExVat/ns2:BelopFelt"/>
</ACTUAL_AMOUNT>
<QUANTITY>
<xsl:value-of select="Bonglinjer/Bonglinje/amount"/>
</QUANTITY>
<TOTAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt"/>
</TOTAL_AMOUNT>
<CURRENCY_CODE>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:Valutakode"/>
</CURRENCY_CODE>
<FREE_TEXT_1>
</FREE_TEXT_1>
<FREE_TEXT_3>
</FREE_TEXT_3>
</CASH_RECEIPT_LINE>
</xsl:if>
<xsl:if test="Bonglinjer/Bonglinje/mvaKode[string-length() > 0]">
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO>
<xsl:value-of select="Bonglinjer/Bonglinje/linjenr"/>
</CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>VAT</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>N/A</REFERENCE>
<REGULAR_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt - Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</ACTUAL_AMOUNT>
<QUANTITY>
<xsl:value-of select="Bonglinjer/Bonglinje/amount"/>
</QUANTITY>
<TOTAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt - Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</TOTAL_AMOUNT>
<CURRENCY_CODE>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:Valutakode"/>
</CURRENCY_CODE>
</CASH_RECEIPT_LINE>
</xsl:if>
<xsl:if test="/ns3:Bonger/MESSAGE_RECORD/InsertChange/DokumentType != 'P' ">
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO></CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>VAT</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>N/A</REFERENCE>
<REGULAR_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt - Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</ACTUAL_AMOUNT>
<QUANTITY>0</QUANTITY>
<TOTAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt - Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</TOTAL_AMOUNT>
<CURRENCY_CODE>
<xsl:value-of select="BetaltCash/ns2:Valutakode"/>
</CURRENCY_CODE>
</CASH_RECEIPT_LINE>
</xsl:if>
</xsl:for-each>
</LINES>
</CASH_RECEIPT>
</CASH_RECEIPTS>
</CASH_RECEIPT_LOG>
</xsl:template>
</xsl:stylesheet>
我的XML转换后的输出如下
<CASH_RECEIPT_LOG xmlns:xsi="urn:test-com:schemas:receive_cash_receipt_pos"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ns3="http://NEXSTEP.Schemas.Bonger"
xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
<MSG_CONTRACT>0</MSG_CONTRACT>
<MSG_DATE>2019-05-07+02:00 15:13:14.636+02:00</MSG_DATE>
<CASH_RECEIPTS>
<CASH_RECEIPT>
<CASH_RECEIPT_NO>B01-110</CASH_RECEIPT_NO>
<CASH_RECEIPT_DATE>2019-05-07+02:00 15:13:14.636+02:00</CASH_RECEIPT_DATE>
<CONTRACT>0</CONTRACT>
<WORKSTATION_ID>B01</WORKSTATION_ID>
<EMPLOYEE_ID>ADMIN</EMPLOYEE_ID>
<CASH_REGISTER_ID>B01</CASH_REGISTER_ID>
<CREATE_DATE>2019-05-07+02:00 15:13:14.636+02:00</CREATE_DATE>
<LINES>
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO>10</CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>INVPARTSALE</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1000</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>54295197</REFERENCE>
<REGULAR_AMOUNT>61.600</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>61.60</ACTUAL_AMOUNT>
<QUANTITY>20</QUANTITY>
<TOTAL_AMOUNT>1540.0</TOTAL_AMOUNT>
<CURRENCY_CODE>NOK</CURRENCY_CODE>
<FREE_TEXT_1/>
<FREE_TEXT_3/>
</CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO>10</CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>VAT</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>N/A</REFERENCE>
<REGULAR_AMOUNT>1232.0</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>308</ACTUAL_AMOUNT>
<QUANTITY>20</QUANTITY>
<TOTAL_AMOUNT>308</TOTAL_AMOUNT>
<CURRENCY_CODE>NOK</CURRENCY_CODE>
</CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO/>
<INTERNAL_TRANSACTION_CODE>VAT</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>N/A</REFERENCE>
<REGULAR_AMOUNT>1232.0</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>308</ACTUAL_AMOUNT>
<QUANTITY>0</QUANTITY>
<TOTAL_AMOUNT>308</TOTAL_AMOUNT>
<CURRENCY_CODE>NOK</CURRENCY_CODE>
</CASH_RECEIPT_LINE>
</LINES>
</CASH_RECEIPT>
</CASH_RECEIPTS>
</CASH_RECEIPT_LOG>
有什么方法可以从
中删除所有 xmlns 属性
<CASH_RECEIPT_LOG xmlns:xsi="urn:test-com:schemas:receive_cash_receipt_pos"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ns3="http://NEXSTEP.Schemas.Bonger"
xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
最终输出应该像
...
非常感谢您的帮助
首先,这些不是属性,而是命名空间声明。
接下来,它们由您自己的样式表放在那里 - 所以如果您不需要它们,请更改:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns3="http://NEXSTEP.Schemas.Bonger" xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
至:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns3="http://NEXSTEP.Schemas.Bonger" xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes"
exclude-result-prefixes="ns2 ns3">
还有这个:
<CASH_RECEIPT_LOG xmlns:xsi="urn:ifsworld-com:schemas:receive_cash_receipt_pos" xmlns:fo="http://www.w3.org/1999/XSL/Format">
至:
<CASH_RECEIPT_LOG>
我有以下 XML 文件
<?xml version="1.0" encoding="UTF-8"?>
<ns3:Bonger xmlns:ns3="http://NEXSTEP.Schemas.Bonger" xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
<ROUTE_RECORD>
<ns2:SENDER Sender_code="BO_SERVER"/>
<ns2:RECEIPIENT Receipient_code="MASTER"/>
<ns2:MESSAGE_ID Type_name="Bonger" Version_number="1.0"/>
<ns2:DATE Date_of_preparation="2019-05-07+02:00" Time_of_preparation="15:14:24"/>
<ns2:OverAllStatus>NY</ns2:OverAllStatus>
</ROUTE_RECORD>
<MESSAGE_RECORD>
<InsertChange>
<Message>
<ns2:MessageId>1</ns2:MessageId>
<ns2:FirmaNr>0</ns2:FirmaNr>
<ns2:Status>NY</ns2:Status>
<ns2:OpprettetEndretSlettet>
<ns2:OpprettetTidspunkt>2019-05-07+02:00</ns2:OpprettetTidspunkt>
<ns2:OpprettetKl>15:13:14.636+02:00</ns2:OpprettetKl>
<ns2:EndretTidspunkt>2019-05-07+02:00</ns2:EndretTidspunkt>
<ns2:EndretKl>15:14:15.492+02:00</ns2:EndretKl>
<ns2:EndretAv>ADMIN</ns2:EndretAv>
</ns2:OpprettetEndretSlettet>
</Message>
<Bongnr>B01-110</Bongnr>
<RegisterId>B01</RegisterId>
<DokumentType>B</DokumentType>
<DokumentNr>B01-110</DokumentNr>
<Avdeling>0</Avdeling>
<KundeNr>0</KundeNr>
<VareLager>553</VareLager>
<BetalingsBetingelse/>
<Brukernavn>ADMIN</Brukernavn>
<Ordrerabatt>0</Ordrerabatt>
<OrdrerabattSum>0</OrdrerabattSum>
<Selger>0</Selger>
<Bonglinjer>
<Bonglinje xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns3:Varelinje">
<createdTime>2019-05-07T15:13:14.636+02:00</createdTime>
<createdBy>ADMIN</createdBy>
<changedBy>ADMIN</changedBy>
<linjenr>10</linjenr>
<varenr>54295197</varenr>
<varetext>FURU 98X098 CUIMP K-VIRKE C24</varetext>
<amount>20</amount>
<enhetkode>LM</enhetkode>
<salesPrice>
<ns2:BelopFelt>77.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</salesPrice>
<salesPriceExVat>
<ns2:BelopFelt>61.600</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</salesPriceExVat>
<originalSalesPriceExVat>
<ns2:BelopFelt>61.6</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</originalSalesPriceExVat>
<costPrice>
<ns2:BelopFelt>0.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</costPrice>
<costPriceExVat>
<ns2:BelopFelt>0.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</costPriceExVat>
<discount1>0.00</discount1>
<discount2>0.00</discount2>
<specialDiscount1>0.00</specialDiscount1>
<specialDiscount2>0.00</specialDiscount2>
<ordreDiscount>0.000000</ordreDiscount>
<discountedPrice>
<ns2:BelopFelt>77.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</discountedPrice>
<discountedPriceExVat>
<ns2:BelopFelt>61.60</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</discountedPriceExVat>
<sumSalesPrice>
<ns2:BelopFelt>1540.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumSalesPrice>
<sumSalesPriceExVat>
<ns2:BelopFelt>1232.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumSalesPriceExVat>
<sumCostPrice>
<ns2:BelopFelt>0.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumCostPrice>
<sumCostPriceExVat>
<ns2:BelopFelt>0.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumCostPriceExVat>
<sumDiscountedPrice>
<ns2:BelopFelt>1540.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumDiscountedPrice>
<sumDiscountedPriceExVat>
<ns2:BelopFelt>1232.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sumDiscountedPriceExVat>
<mvaKode>VHØY</mvaKode>
<mvaSats>25.00</mvaSats>
<kampanje/>
<offlinePrice>false</offlinePrice>
</Bonglinje>
</Bonglinjer>
<totalSum>
<ns2:BelopFelt>1232.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</totalSum>
<totalDiscountedSum>
<ns2:BelopFelt>1232.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</totalDiscountedSum>
<totalSumInkVat>
<ns2:BelopFelt>1540.00</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</totalSumInkVat>
<totalDiscountedSumInkVat>
<ns2:BelopFelt>1540.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</totalDiscountedSumInkVat>
<vat>
<ns2:BelopFelt>308.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
<percent>25.00</percent>
</vat>
<DepositumInnbetalt>
<ns2:BelopFelt>0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</DepositumInnbetalt>
<DepositumFratrukket>
<ns2:BelopFelt>0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</DepositumFratrukket>
<BetaltCash>
<ns2:BelopFelt>1000</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</BetaltCash>
<BetaltCard>
<ns2:BelopFelt>700</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</BetaltCard>
<EkstraUttak>
<ns2:BelopFelt>0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</EkstraUttak>
<CardInfo>
<KortBetaling>
<sum>
<ns2:BelopFelt>500</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sum>
<ref>003144474517</ref>
<timepoint>2019-05-07T15:13:30.000+02:00</timepoint>
<typeCode>1</typeCode>
</KortBetaling>
<KortBetaling>
<sum>
<ns2:BelopFelt>200</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</sum>
<ref>003145474521</ref>
<timepoint>2019-05-07T15:13:55.000+02:00</timepoint>
<typeCode>1</typeCode>
</KortBetaling>
</CardInfo>
<BetaltGiftcard>
<ns2:BelopFelt>0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</BetaltGiftcard>
<MoneyBack>
<ns2:BelopFelt>160</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</MoneyBack>
<RoundingAmount>
<ns2:BelopFelt>0.0</ns2:BelopFelt>
<ns2:Valutakode>NOK</ns2:Valutakode>
</RoundingAmount>
<printDocument>
<document>S09OVEFOVEtWSVRURVJJTkcKMDcuMDUuMjAxOSAxNToxNDoxNQoKR2F1c2RhbCBMYW5kaGFuZGxlcmkgQVMKU3RhbmRhcmQgYXZkZWxpbmcKR2F1c2RhbHN2ZWdlbiAyMAoyNjI0IExpbGxlaGFtbWVyCjkzMzczNTg0MiBNVkEgRm9yZXRha3NyZWdpc3RlcmV0ClRsZjogNjEyMjAwMDAKCkRlcmVzIHJlZjogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKUmVrdmlzaXNqb246ICAgICAgICAgICAgICAgICAgICAgICAgICAgIApWw6VyIHJlZjogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMApCb25nbnVtbWVyOiAgICAgICAgICAgICAgICAgICAgICBCMDEtMTEwCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KNTQyOTUxOTcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIApGVVJVIDk4WDA5OCBDVUlNUCBLLVZJUktFIEMyNCAgICAgICAgICAgCiAgMjAsMDAwIExNICAgICA3NywwMCAgIDAsMDAlICAgIDE1NDAsMDAKCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KU3VtIMOlIGJldGFsZTogICAgICAgICAgICAgICAgICAgIDE1NDAsMDAKCi1CZXRhbHQga29udGFudDogICAgICAgICAgICAgICAgIDEwMDAsMDAKLUJldGFsdCBrb3J0OiAgICAgICAgICAgICAgICAgICAgIDcwMCwwMApUaWxiYWtlOiAgICAgICAgICAgICAgICAgICAgICAgICAgMTYwLDAwCgpTYXRzJSAgRWtza2wubXZhICsgICAgTXZhID0gICAgIElua2wubXZhCjI1LDAwICAgIDEyMzIsMDAgICAzMDgsMDAgPSAgICAgIDE1NDAsMDAKCgpUYWtrIGZvciBoYW5kZWxlbiBvZyB2ZWxrb21tZW4gdGlsYmFrZSAhChtiBAECUEIwMS0xMTAeCgoKQkFYOiAxMTEwMTAtNzIyMDQzMTAKMDcvMDUvMjAxOSAxNToxMwogCkJhbmtBeGVwdAoqKioqKioqKioqKioqMDAxOTgtMQpBSUQ6RDU3ODAwMDAwMjEwMTAKVFZSOjgwODAwNDgwMDAKVFNJOjY4MDAKUkVGOjUxNyAwMDMxNDQ0NzQ1MTcKUkVTUDowMCBHT0RLSkVOVAogCk5PSz0gICAgICAgICAgNTAwLDAwCiAKVFJVTUYgUkVHSVNUUkVSVAoKQkFYOiAxMTEwMTAtNzIyMDQzMTAKMDcvMDUvMjAxOSAxNToxMwogCkJhbmtBeGVwdAoqKioqKioqKioqKioqMDAxOTgtMQpBSUQ6RDU3ODAwMDAwMjEwMTAKVFZSOjgwODAwNDgwMDAKVFNJOjY4MDAKUkVGOjUxNyAwMDMxNDU0NzQ1MjEKUkVTUDowMCBHT0RLSkVOVAogCk5PSz0gICAgICAgICAgMjAwLDAwCiAKVFJVTUYgUkVHSVNUUkVSVAoKCgobZAM=</document>
<mimetype>text/plain</mimetype>
</printDocument>
</InsertChange>
</MESSAGE_RECORD>
</ns3:Bonger>
我有一个如下所示的 XSL 转换器
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns3="http://NEXSTEP.Schemas.Bonger" xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
<xsl:template match="*">
<xsl:element name="{name()}" namespace="{namespace-uri()}">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
<xsl:template match="/ns3:Bonger">
<CASH_RECEIPT_LOG xmlns:xsi="urn:ifsworld-com:schemas:receive_cash_receipt_pos" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<MSG_CONTRACT>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/Avdeling"/>
</MSG_CONTRACT>
<MSG_DATE>
<xsl:value-of select="concat(MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetTidspunkt, ' ',MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetKl )"/>
</MSG_DATE>
<CASH_RECEIPTS>
<CASH_RECEIPT>
<CASH_RECEIPT_NO>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/Bongnr"/>
</CASH_RECEIPT_NO>
<CASH_RECEIPT_DATE>
<xsl:value-of select="concat(MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetTidspunkt, ' ',MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetKl )"/>
</CASH_RECEIPT_DATE>
<CONTRACT>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/Avdeling"/>
</CONTRACT>
<WORKSTATION_ID>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/RegisterId"/>
</WORKSTATION_ID>
<EMPLOYEE_ID>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/Brukernavn"/>
</EMPLOYEE_ID>
<CASH_REGISTER_ID>
<xsl:value-of select="MESSAGE_RECORD/InsertChange/RegisterId"/>
</CASH_REGISTER_ID>
<CREATE_DATE>
<xsl:value-of select="concat(MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetTidspunkt, ' ',MESSAGE_RECORD/InsertChange/Message/ns2:OpprettetEndretSlettet/ns2:OpprettetKl )"/>
</CREATE_DATE>
<LINES>
<xsl:for-each select="MESSAGE_RECORD/InsertChange">
<xsl:if test="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt[string-length() > 0]">
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO>
<xsl:value-of select="Bonglinjer/Bonglinje/linjenr"/>
</CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>INVPARTSALE</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1000</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>
<xsl:value-of select="Bonglinjer/Bonglinje/varenr"/>
</REFERENCE>
<REGULAR_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/salesPriceExVat/ns2:BelopFelt"/>
</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/discountedPriceExVat/ns2:BelopFelt"/>
</ACTUAL_AMOUNT>
<QUANTITY>
<xsl:value-of select="Bonglinjer/Bonglinje/amount"/>
</QUANTITY>
<TOTAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt"/>
</TOTAL_AMOUNT>
<CURRENCY_CODE>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:Valutakode"/>
</CURRENCY_CODE>
<FREE_TEXT_1>
</FREE_TEXT_1>
<FREE_TEXT_3>
</FREE_TEXT_3>
</CASH_RECEIPT_LINE>
</xsl:if>
<xsl:if test="Bonglinjer/Bonglinje/mvaKode[string-length() > 0]">
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO>
<xsl:value-of select="Bonglinjer/Bonglinje/linjenr"/>
</CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>VAT</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>N/A</REFERENCE>
<REGULAR_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt - Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</ACTUAL_AMOUNT>
<QUANTITY>
<xsl:value-of select="Bonglinjer/Bonglinje/amount"/>
</QUANTITY>
<TOTAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt - Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</TOTAL_AMOUNT>
<CURRENCY_CODE>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:Valutakode"/>
</CURRENCY_CODE>
</CASH_RECEIPT_LINE>
</xsl:if>
<xsl:if test="/ns3:Bonger/MESSAGE_RECORD/InsertChange/DokumentType != 'P' ">
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO></CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>VAT</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>N/A</REFERENCE>
<REGULAR_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt - Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</ACTUAL_AMOUNT>
<QUANTITY>0</QUANTITY>
<TOTAL_AMOUNT>
<xsl:value-of select="Bonglinjer/Bonglinje/sumDiscountedPrice/ns2:BelopFelt - Bonglinjer/Bonglinje/sumDiscountedPriceExVat/ns2:BelopFelt"/>
</TOTAL_AMOUNT>
<CURRENCY_CODE>
<xsl:value-of select="BetaltCash/ns2:Valutakode"/>
</CURRENCY_CODE>
</CASH_RECEIPT_LINE>
</xsl:if>
</xsl:for-each>
</LINES>
</CASH_RECEIPT>
</CASH_RECEIPTS>
</CASH_RECEIPT_LOG>
</xsl:template>
</xsl:stylesheet>
我的XML转换后的输出如下
<CASH_RECEIPT_LOG xmlns:xsi="urn:test-com:schemas:receive_cash_receipt_pos"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ns3="http://NEXSTEP.Schemas.Bonger"
xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
<MSG_CONTRACT>0</MSG_CONTRACT>
<MSG_DATE>2019-05-07+02:00 15:13:14.636+02:00</MSG_DATE>
<CASH_RECEIPTS>
<CASH_RECEIPT>
<CASH_RECEIPT_NO>B01-110</CASH_RECEIPT_NO>
<CASH_RECEIPT_DATE>2019-05-07+02:00 15:13:14.636+02:00</CASH_RECEIPT_DATE>
<CONTRACT>0</CONTRACT>
<WORKSTATION_ID>B01</WORKSTATION_ID>
<EMPLOYEE_ID>ADMIN</EMPLOYEE_ID>
<CASH_REGISTER_ID>B01</CASH_REGISTER_ID>
<CREATE_DATE>2019-05-07+02:00 15:13:14.636+02:00</CREATE_DATE>
<LINES>
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO>10</CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>INVPARTSALE</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1000</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>54295197</REFERENCE>
<REGULAR_AMOUNT>61.600</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>61.60</ACTUAL_AMOUNT>
<QUANTITY>20</QUANTITY>
<TOTAL_AMOUNT>1540.0</TOTAL_AMOUNT>
<CURRENCY_CODE>NOK</CURRENCY_CODE>
<FREE_TEXT_1/>
<FREE_TEXT_3/>
</CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO>10</CASH_RECEIPT_LINE_NO>
<INTERNAL_TRANSACTION_CODE>VAT</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>N/A</REFERENCE>
<REGULAR_AMOUNT>1232.0</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>308</ACTUAL_AMOUNT>
<QUANTITY>20</QUANTITY>
<TOTAL_AMOUNT>308</TOTAL_AMOUNT>
<CURRENCY_CODE>NOK</CURRENCY_CODE>
</CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE>
<CASH_RECEIPT_LINE_NO/>
<INTERNAL_TRANSACTION_CODE>VAT</INTERNAL_TRANSACTION_CODE>
<EXTERNAL_TRANSACTION_CODE>1</EXTERNAL_TRANSACTION_CODE>
<REFERENCE>N/A</REFERENCE>
<REGULAR_AMOUNT>1232.0</REGULAR_AMOUNT>
<ACTUAL_AMOUNT>308</ACTUAL_AMOUNT>
<QUANTITY>0</QUANTITY>
<TOTAL_AMOUNT>308</TOTAL_AMOUNT>
<CURRENCY_CODE>NOK</CURRENCY_CODE>
</CASH_RECEIPT_LINE>
</LINES>
</CASH_RECEIPT>
</CASH_RECEIPTS>
</CASH_RECEIPT_LOG>
有什么方法可以从
<CASH_RECEIPT_LOG xmlns:xsi="urn:test-com:schemas:receive_cash_receipt_pos"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:ns3="http://NEXSTEP.Schemas.Bonger"
xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
最终输出应该像
非常感谢您的帮助
首先,这些不是属性,而是命名空间声明。
接下来,它们由您自己的样式表放在那里 - 所以如果您不需要它们,请更改:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns3="http://NEXSTEP.Schemas.Bonger" xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes">
至:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns3="http://NEXSTEP.Schemas.Bonger" xmlns:ns2="http://NEXSTEP.Schemas.NexstepTypes"
exclude-result-prefixes="ns2 ns3">
还有这个:
<CASH_RECEIPT_LOG xmlns:xsi="urn:ifsworld-com:schemas:receive_cash_receipt_pos" xmlns:fo="http://www.w3.org/1999/XSL/Format">
至:
<CASH_RECEIPT_LOG>