xslt-1.0

xsl 1.0 muenchian sum to sum quantity field per compound key

自闭症网瘾萝莉.ら 提交于 2019-12-11 15:35:55
问题 For a SAP PO xsl 1.0 mapping I need to map an 'exotic' file coming from our warehouse where I need to group/sum per order (RECH) a QTY field on a combination of a line identifier (MASTER_PO_LINE_NO) and an Itemnumber (SKU). Each line (RECL) is in a header (RECH). INPUT: <?xml version="1.0" encoding="UTF-8"?> <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge"> <ns0:Message1> <MARCXML> <RCIC> <RECH> <SALESID>24000</SALESID> <RECL> <LINE_NO>1</LINE_NO> <QTY_EXPE>1592</QTY_EXPE> <SKU

xslt date format change (dd-mmm-yyyy)

你说的曾经没有我的故事 提交于 2019-12-11 15:32:30
问题 I am using the below code to show the current date in xslt program.It's working fine With the date format yyyy-mm-dd. But i need the format dd-mmm-yyyy. Please help me to do this. <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:cs="urn:cs" > <xsl:value-of select="cs:datenow()"></xsl:value-of> 回答1: You have tagged your question as XSLT 2.0 so I would expect you to simply get the

XSLT document with dynamic path

天涯浪子 提交于 2019-12-11 15:29:23
问题 I have XSLT 1.0 standard. I have one dynamic XML from server which is quite simple and second XML as configuration. Base on first one (which is dynamic) I have to pick up proper nodes information from second one. This is first document: <?xml version="1.0" encoding="UTF-8" ?> <response> <response>SUCCESS</response> <responsedata> <hit> <url>http://domain.com/page.html</url> <id>2437</id> <title>Page title</title> <language>en</language> ... ... </hit> </responsedata> </response> Second

How to sum the values which satisfy the specific condition for each group of nodes Using XSLT-1.0

南笙酒味 提交于 2019-12-11 15:29:00
问题 how to sum the values which satisfy the specific condition inside a group for my test sample.The following xml data is an input sample. <?xml version="1.0" encoding="UTF-8"?> <Root> <Product id="id111" partNumber="LRU1" serialNumber="xyz1"> </Product> <Product id="id112" partNumber="LRU2" serialNumber="xyz2"> </Product> <Product id="id113" partNumber="LRU3" serialNumber="xyz3"> </Product> <Product id="id114" partNumber="LRU4" serialNumber="xyz4"> </Product> <Product id="id115" partNumber=

XSLT 1.0 (xsltproc) - Output only the last duplicate node

ぐ巨炮叔叔 提交于 2019-12-11 14:33:10
问题 How do I output just the last duplicate node using XSLT 1.0? I use xsltproc processor. Input.xml <testng-results> <suite> <test> <class name="system.apps.CreateTerritory"> <test-method status="PASS" name="initTest" is-config="true"> </test-method> <test-method status="FAIL" name="ABC"> </test-method> </class> <class name="system.apps.CreateAccount"> <test-method status="PASS" name="initTest" is-config="true"> </test-method> <test-method status="SKIP" name="DEF"> </test-method> <test-method

xslt 1.0 base64 encode the content of a template

落爺英雄遲暮 提交于 2019-12-11 14:32:49
问题 How can I encode the content of a template in base64, using XSLT 1.0? Edit: using serialization mode, runing in PHP enviroment It's like i have a template like this: <xsl:template name="test"> <test gender="male" name1="TEST" name2="TEST"> <sometags> <tag></tag> </sometags> </test> </xsl:template> and I want the output to be like this: <base64

Table header is not getting repeated, if table content extended to next page in PDF using XSLT

时光怂恿深爱的人放手 提交于 2019-12-11 14:24:10
问题 Table header is not added to next page, if table content is extended to next page. Header is getting displayed for multiple tables, but if table content extends to next page then header is not coming and its staring the table row in next page. Need to append header before starting next page, if table content extends. Sample XML: <NewDataSet> <DefaultView> <Department>2222</Department> <Title>Manish</Title> </DefaultView> <DefaultView> <Department>2222</Department> <Title>Santosh</Title> <

Merging tags based on two different complex tags

谁说我不能喝 提交于 2019-12-11 14:11:28
问题 In the below two ASNInPO's po_nbr is same container_id under ASNInCtn is same and item_id under ASNInItem is different. In this case two ASNInPO's has to be merged and two ASNInCtn's has to be merged into one tag. This is my Input: <?xml version = '1.0' encoding = 'UTF-8'?> <ASNInDesc> <asn_nbr>ASN-1</asn_nbr> <ASNInPO> <po_nbr>PO-2</po_nbr> <ASNInCtn> <container_id>CONTAINER-2</container_id> <ASNInItem> <item_id>ITEM-2</item_id> <unit_qty>3</unit_qty> </ASNInItem> </ASNInCtn> </ASNInPO>

Parse HTML inside the CDATA text

此生再无相见时 提交于 2019-12-11 13:43:07
问题 The data inside CDATA to be parsed as Html. <?xml version="1.0" encoding="utf-8" ?> <test> <test1> <![CDATA[ <B> Test Data1 </B> ]]> </test1> <test2> <![CDATA[ <B> Test Data2 </B> ]]> </test2> <test3> <![CDATA[ <B> Test Data3 </B> ]]> </test3> </test> From the Above input xml I need the output to be parsed as html. But I am getting the output as <B>Test Data1</B> <B>Test Data2</B> <B>Test Data3</B> But the actual output I need the text to be in bold. **Test Data1 Test Data2 Test Data3** The

Concatenate two node values

不想你离开。 提交于 2019-12-11 12:52:25
问题 I have the following XML structure, and I need to combine the values of handlingInstructionText : <handlingInstruction> <handlingInstructionText>CTAC | MARTINE HOEYLAERTS</handlingInstructionText> </handlingInstruction> <handlingInstruction> <handlingInstructionText>PHON | 02/7225235</handlingInstructionText> </handlingInstruction> My expected output is CTAC | MARTINE HOEYLAERTS PHON | 02/7225235 I'm currently using the string-join function but it seems not supported by the version of xsl