xslt-1.0

Grouping Nodes by hardcoding node values in XSLT

若如初见. 提交于 2021-01-20 12:43:14
问题 <root> <Entry> <ID>1</ID> <Details> <Code>A1</Code> <Value>1000</Value> </Details> </Entry> <Entry> <ID>2</ID> <Details> <Code>A2</Code> <Value>2000</Value> </Details> </Entry> <Entry> <ID>3</ID> <Details> <Code>B1</Code> <Value>3000</Value> </Details> </Entry> <Entry> <ID>4</ID> <Details> <Code>B2</Code> <Value>4000</Value> </Details> </Entry> </root> I have this input XML which I am looking to group via XSLT wherein the grouping happens by hardcoding node values . Let me explain that in

Remove certain nodes from an xml using xslt3.0

女生的网名这么多〃 提交于 2021-01-07 02:33:00
问题 Currently i am trying to remove certain nodes from an xml using xslt3.0 using identity template. But this is taking long processing time. need some suggestion to improve performace using Xslt30Transformer. <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/"> <xsl:output method="xml" indent="yes"/> <xsl:variable name="pathexcluded" select="'CATALOG/CD1 | CATALOG/CD2 '"/> <xsl:variable name="changed-nodes" as="node()*" > <xsl

Remove certain nodes from an xml using xslt3.0

跟風遠走 提交于 2021-01-07 02:32:58
问题 Currently i am trying to remove certain nodes from an xml using xslt3.0 using identity template. But this is taking long processing time. need some suggestion to improve performace using Xslt30Transformer. <xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/"> <xsl:output method="xml" indent="yes"/> <xsl:variable name="pathexcluded" select="'CATALOG/CD1 | CATALOG/CD2 '"/> <xsl:variable name="changed-nodes" as="node()*" > <xsl

converting date from a timezone to UTC XSLT 1.0

杀马特。学长 韩版系。学妹 提交于 2021-01-07 01:28:58
问题 How can I format the below XML date element in XSLT version1.0 ? The GenerationTime has to be formatted in pattern yyyy-MM-dd'T'HH:mm:ss in the output XML with the date value in UTC . xslt processer used is xalan <Values> <value name="cardGenerated">yes</value> <value name="GenerationTime">Tue Dec 29 14:32:53 EST 2020</value> <Values> the output would look like <Values> <value name="cardGenerated">yes</value> <value name="GenerationTime">2020-12-19T19:32:53Z</value> <Values> 来源: https:/

converting date from a timezone to UTC XSLT 1.0

戏子无情 提交于 2021-01-07 01:23:56
问题 How can I format the below XML date element in XSLT version1.0 ? The GenerationTime has to be formatted in pattern yyyy-MM-dd'T'HH:mm:ss in the output XML with the date value in UTC . xslt processer used is xalan <Values> <value name="cardGenerated">yes</value> <value name="GenerationTime">Tue Dec 29 14:32:53 EST 2020</value> <Values> the output would look like <Values> <value name="cardGenerated">yes</value> <value name="GenerationTime">2020-12-19T19:32:53Z</value> <Values> 来源: https:/

converting date from a timezone to UTC XSLT 1.0

你离开我真会死。 提交于 2021-01-07 01:23:18
问题 How can I format the below XML date element in XSLT version1.0 ? The GenerationTime has to be formatted in pattern yyyy-MM-dd'T'HH:mm:ss in the output XML with the date value in UTC . xslt processer used is xalan <Values> <value name="cardGenerated">yes</value> <value name="GenerationTime">Tue Dec 29 14:32:53 EST 2020</value> <Values> the output would look like <Values> <value name="cardGenerated">yes</value> <value name="GenerationTime">2020-12-19T19:32:53Z</value> <Values> 来源: https:/

XSLT 1.0, Using Identity Transform, with multiple templates fails to match

[亡魂溺海] 提交于 2021-01-05 08:56:37
问题 Wow, I haven't asked this many questions since, intro to programming some 15 years ago, this XSLT stuff is kicking me! I've been learning to work with Identity Transform, to take a string and break it into nodes based on a delimiter. Which I have working as expected, but when I combine it with the rest of my logic it breaks. I'm thinking it has to do with my selectors on the elements themselves. I'm just proud of myself that I figured out a working basic example of Identity transform. I've

How can I transform some xml into a fixed length string using element attributes to define the value lengths [duplicate]

别来无恙 提交于 2020-12-15 05:51:15
问题 This question already has an answer here : XSLT 1.0 Kludge cleanup (1 answer) Closed 2 months ago . <?xml version="1.0" encoding="UTF-8"?> <Root> <Destination>acme.com</Destination> <Record> <FirstField length="10">AAAA</FirstField> <SecondField length="15">BBBB</SecondField> <SubRecord> <ThirdField length="20">CCCC</ThirdField> <FourthField length="8">DDDD</FourthField> </SubRecord> </Record> </Root> Hi, I have a requirement to take this xml example where the elements inside the node will be

Convert dateTime to UTC/GMT using pure XSLT 1.0

落花浮王杯 提交于 2020-12-15 03:52:33
问题 I couldn't find an existing answer to this problem, so I am posting it here. Note that input dateTimes: may or may not have fractional seconds; may already be in UTC/GMT, which complicates the process. Example input: <data> <datetime>2020-06-01T04:45:15+05:30</datetime> <datetime>2020-06-01T04:45:15.123+05:30</datetime> <datetime>2020-05-31T19:45:15-08:00</datetime> <datetime>2020-05-31T19:45:15.123-08:00</datetime> <datetime>2020-05-31T19:45:15Z</datetime> <datetime>2020-05-31T19:45:15.123Z<

Convert dateTime to UTC/GMT using pure XSLT 1.0

梦想的初衷 提交于 2020-12-15 03:52:12
问题 I couldn't find an existing answer to this problem, so I am posting it here. Note that input dateTimes: may or may not have fractional seconds; may already be in UTC/GMT, which complicates the process. Example input: <data> <datetime>2020-06-01T04:45:15+05:30</datetime> <datetime>2020-06-01T04:45:15.123+05:30</datetime> <datetime>2020-05-31T19:45:15-08:00</datetime> <datetime>2020-05-31T19:45:15.123-08:00</datetime> <datetime>2020-05-31T19:45:15Z</datetime> <datetime>2020-05-31T19:45:15.123Z<