xslt-2.0

XSLT finding distinct combinations

本小妞迷上赌 提交于 2020-01-15 10:53:24
问题 I am beginner to xslt. I want to find all unique combinations for Year, Month, Day, and Hour. I have following xml file to transform: <Plans> <Plan Name="Plan_1"> <Book Name="Book_1"> <Time Name="AAA"> <Property Name="Year" Value="2001"/> <Property Name="Month" Value="01"/> <Property Name="Day" Value="10"/> <Property Name="Hour" Value="12"/> </Time> <Time Name="BBB"> <Property Name="Year" Value="2001"/> <Property Name="Month" Value="01"/> <Property Name="Day" Value="10"/> <Property Name="Hour

XSLT finding distinct combinations

十年热恋 提交于 2020-01-15 10:52:35
问题 I am beginner to xslt. I want to find all unique combinations for Year, Month, Day, and Hour. I have following xml file to transform: <Plans> <Plan Name="Plan_1"> <Book Name="Book_1"> <Time Name="AAA"> <Property Name="Year" Value="2001"/> <Property Name="Month" Value="01"/> <Property Name="Day" Value="10"/> <Property Name="Hour" Value="12"/> </Time> <Time Name="BBB"> <Property Name="Year" Value="2001"/> <Property Name="Month" Value="01"/> <Property Name="Day" Value="10"/> <Property Name="Hour

XSLT finding distinct combinations

丶灬走出姿态 提交于 2020-01-15 10:52:22
问题 I am beginner to xslt. I want to find all unique combinations for Year, Month, Day, and Hour. I have following xml file to transform: <Plans> <Plan Name="Plan_1"> <Book Name="Book_1"> <Time Name="AAA"> <Property Name="Year" Value="2001"/> <Property Name="Month" Value="01"/> <Property Name="Day" Value="10"/> <Property Name="Hour" Value="12"/> </Time> <Time Name="BBB"> <Property Name="Year" Value="2001"/> <Property Name="Month" Value="01"/> <Property Name="Day" Value="10"/> <Property Name="Hour

Importing xml with nested nodes into Access (and needing to transform the xml into a 'flat' structure with xsl)

梦想与她 提交于 2020-01-15 09:52:56
问题 Desperately trying and failing to import some data into Access that comprises of various nested nodes that on import are being put into separate tables when I only desire to have one. I just would like to have the Activity table with all the data in the nested nodes to be in this parent table. I've tried adjusting some code from a previous similar question but my attempt appears hopeless as it is not even pulling any information from the 'Activity' table, however it has created the 'AttID'

Last day of previous month in XSLT

时光毁灭记忆、已成空白 提交于 2020-01-15 07:35:21
问题 Is it possible to get the last day of the previous month in XSLT? I found this function: http://www.xsltfunctions.com/xsl/functx_last-day-of-month.html but I'm not sure how to use it to get the previous month. 回答1: Use : current-date() - xs:dayTimeDuration(concat('P', day-from-date(current-date()), 'D')) This produces (when evaluated on any day of May 2012): 2012-04-30-07:00 来源: https://stackoverflow.com/questions/10483246/last-day-of-previous-month-in-xslt

In XSLT, is it normal that a variable set to something like name(..) is computed at time of use?

♀尐吖头ヾ 提交于 2020-01-14 15:28:08
问题 I have a couple of trees in my XML and wanted to access one in terms of a name in the other. Here is is called the tab_name and it is the parent tag of the current node so I use name(..). That gives me the correct value if I test at the same location where I set the variable. However, the problem I have is that when I reference $tab_name a few lines below (in the <xsl:when> tag) the name(..) is applied to the current context so I get the tag "group" instead of what I would otherwise expect.

Remove embedded html tags with xslt

不羁岁月 提交于 2020-01-14 06:12:27
问题 My input xml has embedded html tags in Emp_Name and Country Elements and I need to strip off only html tags to get the below desired output. Could you please assist how this can be achieved in XSLT. Input XML: <root> <Record> <Emp_ID>288237</Emp_ID> <Emp_Name> <br>John</br></Emp_Name> <Country><p>US</p></Country> <Manager>Wills</Manager> <Join_Date>5/12/2014</Join_Date> <Experience>9 years</Experience> <Project>abc</Project> <Skill>java</Skill> </Record> Desired Output: <root> <Record> <Emp

Lowercase part of a string with XPath regular expression

十年热恋 提交于 2020-01-14 04:16:27
问题 In a node, a string might contain one or more substrings delimited by single or double quotes. For example <node>Some text "and Some" More</node> What I have to do is lowercase the text that is not surrounded by quotes, so the result should look as: some text "and Some" more I've tried two things: with replace : replace('Some text "and Some" More', '"([^"]*)"', '*') this will replace the text in double quotes with *. But how can I lowercase it? This doesn't produce the desired result: replace

how to merge two nodes having “the same father”, the same method and the same id=0 (using XSLT)?

拜拜、爱过 提交于 2020-01-13 07:22:48
问题 I need to merge the two nodes street as they have the same: father node: city NEW YORK same method: modify same id: 0 Attributes values must be merged (See the output file at the end of this post) Here is the input file: <country> <state id="NEW JERSEY"> <city id="NEW YORK"> <district id="BRONX" method="modify"> <street id="0" method="modify"> <attributes> <temperature>98</temperature> <altitude>1300</altitude> </attributes> </street> <dadada id="99" method="modify" /> <street id="0" method=

Get value after each last colon

♀尐吖头ヾ 提交于 2020-01-11 13:07:08
问题 I need to get the value of each data after the last colon. For example, I have this file: <Data> :20:PmtReferenceID000012 :21:Not used :25: PHMNLBICXXX/Account00010203 :28c:00001/0001 (The 'c' in :28 can be either in upper or lower case) :20:PmtReferenceID000012 :21:Not used :25: PHMNLBICXXX/Account00010203 :28c:00001/0001 (The 'c' in :28 can be either in upper or lower case) </Data> I need to store the value after the ':20:' to <ABCD> , ':21:' to <EFGH> , ':25:' to <IJKL> and ':28c:' to