xslt-2.0

Sorting in xslt and choosing minimum or maximum value

纵饮孤独 提交于 2019-12-13 00:43:03
问题 Need some help in sorting and then choosing either maximum or minimum value in XSLT. Source xml: <target> <relatedTarget> <permitExpiry>2005-07-02T08:11:00.000Z</permitExpiry> <permitStart>2015-07-11T09:22:00.000Z</permitStart> </relatedTarget> <relatedTarget> <permitExpiry>2003-07-12T08:11:00.000Z</permitExpiry> <permitStart>2014-07-01T09:22:00.000Z</permitStart> </relatedTarget> <relatedTarget> <permitExpiry>2002-07-10T08:11:00.000Z</permitExpiry> <permitStart>2016-07-06T09:22:00.000Z<

XSLT - Creating Dynamic Grid with single XML

旧街凉风 提交于 2019-12-12 21:44:48
问题 I am creating dynamic table(grid) using xslt, I am beginner in XSLT, I have also asked question before here it is XSLT - Creating Dynamic Grid please refer it, On Above Question I am using 2 XML for Columns And Rows , But Here i am trying only one XML(Rows). You can find XSLT on above Question with 2 XML Section. XML Data : <TableData> <Rows> <Row ID="0" Name="A" Link-Name="Yes" Hide-ID="Yes" Sort-Name="Yes"/> <Row ID="1" Name="B" Desc="Some description" Link-Name="Yes" Hide-ID="Yes" Sort

Not possible to use template parameter in the match XPath expression in XSLT 2.0?

放肆的年华 提交于 2019-12-12 21:07:30
问题 According to this SO question it should be possible to use parameters in the XPath expression for match . However it does not seem to work if xsl:param of a xsl:template is to be used in the same template. My XML file looks as follows <?xml version="1.0" encoding="UTF-8"?> <myRoot> <myNode myAttribute="3"> <myChildAttribute myChildAttribute="a" /> </myNode> <myNode myAttribute="2"> <myChildAttribute myChildAttribute="b" /> </myNode> <myNode myAttribute="1" /> </myRoot> and my XSL file like

add an element to a node, if it doesnot exist

霸气de小男生 提交于 2019-12-12 18:07:59
问题 Using xslt-3, i try to insert the element PROPERTY, if it does not already exist to each RECORD node: <?xml ="1.0" encoding="UTF-8"?> <TABLE NAME="TABLE.DB"> <DATA RECORDS="2"> <RECORD ID="1"> <RECNO>1</RECNO> <SEQ>0</SEQ> <DATE>17/12/1999 2:44:08 μμ</DATE> <ID>12/11/2015 3:15:25 μμ</ID> <ORDER>10355</ORDER> <CN>PL</CN> </RECORD> <RECORD ID="2"> <RECNO>2</RECNO> <SEQUENCE>0</SEQUENCE> <DATE>17/12/1999 2:44:08 μμ</DATE> <ID>12/11/2015 3:15:25 μμ</ID> <ORDER>10356</ORDER> <CN>PL 300 L</CN> <

Saxon9HE error XLM0001: Too many nested apply-templates calls. The stylesheet may be looping

試著忘記壹切 提交于 2019-12-12 16:59:43
问题 I'm using Saxon9HE to transform some XML 2.0. from a Java class; the solution is from this earlier question I'm transforming double pipe delimited text into XML. However, some of the fields contain people's resumes and the transform throws the looping error mentioned in the title. Is there a way fix this? I read about increasing the maximum depth in templates stack but that only applies to Oxygen; is there a similar setting in the Saxon9HE.jar? Here's the code, you can also click on the link

Converting epoch to date & time with time zone in xslt 2.0

南笙酒味 提交于 2019-12-12 15:35:03
问题 How do I convert epoch time to date & time based on time zone in xslt 2.0 ? For example, epoch time 1212497304 converts to GMT: Tue, 03 Jun 2008 12:48:24 GMT time zone: martes, 03 de junio de 2008 14:48:24 GMT+2 This is because of the Daylight Saving Time (DST): in many countries there is one hour more in summer, during some dates that varies each year. For example, it is supposed that this instruction: <xsl:value-of select=" format-dateTime(xs:dateTime('2013-07-07T23:08:00+00:00'), '[D] [MNn

convert character if codepoint within given range

天涯浪子 提交于 2019-12-12 14:27:55
问题 I have a couple of XML files that contain unicode characters with codepoint values between 57600 and 58607. Currently these are shown in my content as square blocks and I'd like to convert these to elements. So what I'd like to achieve is something like : <!-- current input --> <p> Follow the on-screen instructions.</p> <!-- desired output--> <p><unichar value="58208"/> Follow the on-screen instructions.</p> <!-- Where 58208 is the actual codepoint of the unicode character in question --> I

Is there an XSLT 2.0 library for .NET?

喜欢而已 提交于 2019-12-12 13:57:22
问题 Simple query - I am looking for recommendations for a .NET library that supports XSLT 2.0 (if one exists). Thanks. 回答1: Try saxon, or the Altova engine which powers XMLSpy is also available for free directly from them. 回答2: XQSharp is a native XSLT 2.0 and XQuery processor for .NET 来源: https://stackoverflow.com/questions/1288233/is-there-an-xslt-2-0-library-for-net

how to merge two nodes having “the same father” and having a precise “method” sequence (using XSLT)?

白昼怎懂夜的黑 提交于 2019-12-12 10:29:50
问题 I need to merge the two nodes MANHATTAN: because our system rule is the following: " CREATE A + MODIFY A" is still a " CREATE A with the merged attributes" input file: <?xml version="1.0" encoding="UTF-8"?> <world> <COUNTRY id="USA" > <STATE id="NEW JERSEY"> <CITY id="NEW YORK" method="modify"> <DISTRICT id="MANHATTAN" method="create"> <attributes> <population>99 </population> <income> 10000</income> </attributes> </DISTRICT> <DISTRICT id="MANHATTAN" method="modify"> <attributes> <temperature

How to split text and preserve HTML tags (XSLT 2.0)

ε祈祈猫儿з 提交于 2019-12-12 09:43:27
问题 I have an xml that has a description node: <config> <desc>A <b>first</b> sentence here. The second sentence with some link <a href="myurl">The link</a>. The <u>third</u> one.</desc> </config> I am trying to split the sentences using dot as separator but keeping in the same time in the HTML output the eventual HTML tags. What I have so far is a template that splits the description but the HTML tags are lost in the output due to the normalize-space and substring-before functions. My current