xslt-grouping

replace namespace uri using XSLT in SOAP message

大兔子大兔子 提交于 2019-12-02 11:51:54
问题 i have an input soap message, trying to replace part of namespace uri with a different string. I am able to replace entire URI with a different URI, but not able to modify the existing URI. I need to look for 'OLDSTRING' and replace with 'NEWSTRING'. The string VARIABLESTRING varies in in every input xml, so I should keep as it is in the output xml Input XML: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:schemas-OLDSTRING-com:VARIABLESTRING">

Grouping flat xml using xslt (muenchian grouping), can't get it to group

冷暖自知 提交于 2019-12-02 08:19:49
I spent quite some time trying to get muenchian grouping of the below xml to work but I can't get it to work. I tried a number of different ways so posting the most recent attempt probably just confuses anyone trying to help me. :-) Xslt needs to be 1.0 Input file is invoice lines where "invoice header info" is duplicated for each line belonging to a particular invoice. Grouping should be made in field _id, i e value in RESULTSET/ROW"/COL[12]/DATA (e. g. 'C82F1B47-9758-4D18-ABD7-80386385F6AD') COL[21] through COL[27] are the different invoice lines for the invoice and as such should be listed

XSLT, sort and group by year-date

孤人 提交于 2019-12-01 00:41:42
Regarding Umbraco XSLT version 1. I have aprox. 150 news items in XML. Lets say like this (all is pseudocode until I get more familiar with this xml/xslt): <news> <data alias=date>2008-10-20</data> </news> <news> <data alias=date>2009-11-25</data> </news><news> <data alias=date>2009-11-20</data> </news> etc. etc.... I would like to run through the XML and create html-output as a news archive. Something like (tags not important): 2008 Jan Feb ... 2009 Jan Feb Mar etc. etc. I can only come up with a nested for-each (pseudocode): var year_counter = 2002 var month_counter = 1 <xsl:for-each select=

How to count distinct values in a node?

醉酒当歌 提交于 2019-11-28 21:30:39
How to count distinct values in a node in XSLT? Example: I want to count the number of existing countries in Country nodes, in this case, it would be 3. <Artists_by_Countries> <Artist_by_Country> <Location_ID>62</Location_ID> <Artist_ID>212</Artist_ID> <Country>Argentina</Country> </Artist_by_Country> <Artist_by_Country> <Location_ID>4</Location_ID> <Artist_ID>108</Artist_ID> <Country>Australia</Country> </Artist_by_Country> <Artist_by_Country> <Location_ID>4</Location_ID> <Artist_ID>111</Artist_ID> <Country>Australia</Country> </Artist_by_Country> <Artist_by_Country> <Location_ID>12</Location

XSLT Sorting - how to sort xml childnodes inside a parent node with an attribute

你离开我真会死。 提交于 2019-11-28 00:03:36
问题 What started out as a simple thing has turned out quite troublesome for XSLT noob. Trying to sort childnodes/descending but, after adding an attribute to their parent node, I receive an error when debugging in VS2010: "Attribute and namespace nodes cannot be added to the parent element after a text, comment, pi, or sub-element node has already been added." Suppose I have this simple XML: <posts> <year value="2013"> <post postid="10030" postmonth="1"> <othernode></othernode> <othernode2><