muenchian-grouping

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>

XSLT 1.0: rename elements with same content

六眼飞鱼酱① 提交于 2019-12-11 14:06:42
问题 It seemed like an easy task but I am totally stuck now. I have the following XML: <?xml version="1.0" encoding="UTF-8"?> <Items> <Item> <ITEM_CODE>ITEM_CODE</ITEM_CODE> <ITEM_NAME>ITEM_NAME</ITEM_NAME> <ITEM_ALTERNATE_NAME>ITEM_ALTERNATE_NAME</ITEM_ALTERNATE_NAME> <ITEM_CATEGORY_CODE>ITEM_CATEGORY_CODE</ITEM_CATEGORY_CODE> </Item> <Item> <ITEM_CODE>15031</ITEM_CODE> <ITEM_NAME>Outer Carton</ITEM_NAME> <ITEM_ALTERNATE_NAME/> <ITEM_CATEGORY_CODE>52401</ITEM_CATEGORY_CODE> </Item> <Item> <ITEM

Multi-level Muenchian Grouping

梦想与她 提交于 2019-12-11 13:08:51
问题 I was hoping someone could assist me by pointing me in the right direction with Muenchian grouping. I have data in the following form: <?xml version="1.0" encoding="UTF-16"?> <LandXML schemaLocation="http://www.landxml.org/schema/LandXML-1.2 http://www.landxml.org/schema/LandXML-1.2.xsd" version="1.2" date="2013-08-01" time="22:10:15.294-00:00" readOnly="false" language="english"> <Application name="ListechStyleSheet" version="1, 0, 0, 0" manufacturer="LISTech Pty Ltd" manufacturerURL="www

XSL Muenchian method on substring

前提是你 提交于 2019-12-11 03:21:15
问题 I'm trying to transform some XML output to a rating table (hydrology related) which consists of the hundredths values going across the top and the tenths values going down. The problem I'm running into is that I can't seem to sort for the unique values by using a substring on the ht attributes. Here is a sample of the XML output: <env:Envelope> <env:Header/> <env:Body> <RatingTableUpdate> <Gauge xmlns="" type="STORAGE" id="123"> <Input input="0"> <Conv ht="19.76" cap="5040" /> <Conv ht="19.77

Muenchian Grouping with XSL-FO Table

邮差的信 提交于 2019-12-11 01:09:59
问题 I've been working with producing simple PDFs with XSL-FO in RenderX XEP for a while, but I'm relatively new to the more involved functions of XPath. I have some XML which looks like this: <?xml version="1.0" encoding="UTF-8"?> <report> <ticket> <size>A</size> <department>Dept 1</department> <category>Cat 1</category> <product>Product 1</product> </ticket> <ticket> <size>A</size> <department>Dept 1</department> <category>Cat 2</category> <product>Product 2</product> </ticket> <ticket> <size>B<

XSL muenchian-grouping on multiple levels and nesting

拟墨画扇 提交于 2019-12-10 22:17:53
问题 INPUT: <?xml version="1.0" encoding="UTF-8"?> <root> <output> <queries> <query> <parameters> <parameter name="id">CTL-000002</parameter> </parameters> <queryResults> <record id="1"> <column name="ConfigurationCapacity">9500.0000000</column> <column name="configurationCode">CTL-3819</column> <column name="compartmentCode">CTL-3819-01</column> <column name="position">1</column> <column name="CompartmentCapacity">2700</column> <column name="unitName">G</column> </record> <record id="2"> <column

XML to CSV Transpose by Dates

亡梦爱人 提交于 2019-12-08 05:36:20
问题 Using XSLT 1.0, I am attempting to convert an XML file to CSV, specifically to transpose the data from full dates to pivoted month columns with Year and Day indicators. XML comprises of Google Doodles in long format of dates and doodle name. Below is 2010 data for first 6 months: <?xml version="1.0" encoding="UTF-8"?> <dataroot> <GoogleDoodles> <ID>12</ID> <DoodleDate>2010-02-06</DoodleDate> <Doodle>Sami National Day 2010</Doodle> </GoogleDoodles> <GoogleDoodles> <ID>17</ID> <DoodleDate>2010

XSLT 1.0: grouping and removing duplicate

不羁岁月 提交于 2019-12-04 11:46:55
I have a xml grouping challenge for which I need to group AND remove duplicate as below: <Person> <name>John</name> <date>June12</date> <workTime taskID=1>34</workTime> <workTime taskID=1>35</workTime> <workTime taskID=2>12</workTime> </Person> <Person> <name>John</name> <date>June13</date> <workTime taskID=1>21</workTime> <workTime taskID=2>11</workTime> <workTime taskID=2>14</workTime> </Person> Note that for a specific occurence of name/taskID/date, only the first one is picked up. In this example, <workTime taskID=1>35</workTime> <workTime taskID=2>14</workTime> would be left aside. Below

Applying Muenchian grouping for a simple XML with XSLT

。_饼干妹妹 提交于 2019-11-30 15:19:57
问题 How does Muenchian grouping work in details? I have a simple XML document generated from a database: <CLIENTS> <CLIENT> <NAME>John</NAME> <ACCOUNT_NUMBER>1424763562761</ACCOUNT_NUMBER> <LAST_USED>2012-10-03</LAST_USED> <AMOUNT>5000</AMOUNT> </CLIENT> <CLIENT> <NAME>John</NAME> <ACCOUNT_NUMBER>543667543732</ACCOUNT_NUMBER> <LAST_USED>2012-10-02</LAST_USED> <AMOUNT>10000</AMOUNT> </CLIENT> ... I'd like to group by the name node. How can I the desired ouput to be the following? <ClIENTS> <CLIENT

muenchian grouping

限于喜欢 提交于 2019-11-29 08:08:47
I was wondering how this predicate([1]), is hardcoded as 1 always in the muenchian grouping. The concept was not clear for me, after a lot of search. It is explained as the current node, is compared with the 1st group returned by the key. Why does it always compare with the first one that a key is matched? Also why are we giving contact[count(. | key('contacts-by-surname', surname)[1]) = 1], the =1 part? again 1 is hardcoded. I referred the below link http://www.jenitennison.com/xslt/grouping/muenchian.html I was wondering how this predicate([1]), is hardcoded as 1 always in the muenchian