xslt-1.0

mapping a string containing xml in BizTalk

[亡魂溺海] 提交于 2019-12-01 11:14:53
I have an xml document with a node that may optionally contain a string of escaped xml. I'd like to be able to transform that content using xsl in a BizTalk map. Any suggestion how? I've tried: msxsl:node-set(string). This creates a nameless single node with no content. The document() function using a url prefix of 'data:text/xml' as suggested by helderdarocha here . for-each selecting the text() of the node containing the string using xpath() in an orchestration to extract the string then make a multipart message. It won't let me use an xmlDocument message as one of the messages in a

Shifting row data in xsl 1.0

非 Y 不嫁゛ 提交于 2019-12-01 11:10:14
I have multiple Rows data in my XML like this - <ROW TYPE="SPECIFICATION" ID="1"> <R1>English1</R1> </ROW> <ROW TYPE="SPECIFICATION" ID="1"> <R1>Maths1</R1> </ROW> <ROW TYPE="TOTAL" ID="1"> <R1>Code1</R1> </ROW> <ROW TYPE="SPECIFICATION" ID="2"> <R1>English2</R1> </ROW> <ROW TYPE="SPECIFICATION" ID="2"> <R1>Maths2</R1> </ROW> <ROW TYPE="TOTAL" ID="2"> <R1>Code2</R1> </ROW> I want my Output to be displayed in Image like that this ROW data works in a for-each loop. And the requirement is that ROW TYPE="TOTAL" ID="1" should be displayed first then its ROW TYPE="SPECIFICATION" data. Moving further

pagination in xsl

筅森魡賤 提交于 2019-12-01 11:02:45
I have an xml file and also an xsl file which I wrote for it to generate html. my xml file is: <?xml version="1.0" encoding="UTF-8"?> <expert_questions> <question Id="10"> <source_ip>192.168.150.1</source_ip> <port>545</port> <packet_size>1400</packet_size> <more_details> <time>13:42</time> <count>100</count> <comment>more details</comment> </more_details> </question> <question Id="..."> . . . </question> </expert_questions> and my xsl file: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output omit-xml-declaration="yes" indent="yes" /> <xsl:template match

How to match and wrap identical and adjacent node together in XSLT 1.0?

此生再无相见时 提交于 2019-12-01 09:30:26
问题 I have an XML file that look like this and I'm trying to wrap "Para_bb" node that are adjacent to each other with a div. <Para_a></Para_a> <Para_a></Para_a> <Para_bb></Para_bb> <Para_bb></Para_bb> <Para_bb></Para_bb> <Para_bb></Para_bb> <Para_a></Para_a> <Para_bb></Para_bb> <Para_bb></Para_bb> <Para_a></Para_a> <Para_a></Para_a> <Para_bb></Para_bb> How can I make it look like this? <p></p> <p></p> <div class="blackBox"> <Para_bb></Para_bb> <Para_bb></Para_bb> <Para_bb></Para_bb> <Para_bb><

pagination in xsl

十年热恋 提交于 2019-12-01 08:05:56
问题 I have an xml file and also an xsl file which I wrote for it to generate html. my xml file is: <?xml version="1.0" encoding="UTF-8"?> <expert_questions> <question Id="10"> <source_ip>192.168.150.1</source_ip> <port>545</port> <packet_size>1400</packet_size> <more_details> <time>13:42</time> <count>100</count> <comment>more details</comment> </more_details> </question> <question Id="..."> . . . </question> </expert_questions> and my xsl file: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999

XSLT 1.0 Compare Dates

感情迁移 提交于 2019-12-01 07:35:17
I want to compare current date against a start date and end date. XML is: <forms> <form id="11"> <start>somedate</start> <end>someotherdate</end> </form> </forms> I am currently trying: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ex="http://exslt.org/dates-and-times" extension-element-prefixes="ex" > <xsl:choose> <xsl:when test="end != '' and start != '' and ex:date(start) <= current-date() and current-date() <= ex:date(end)"> <!-- Do Stuff --> </xsl:when> </xsl:choose> I get the following error: xmlXPathCompOpEval

XSLT : Add a namespace declaration to the root element

只谈情不闲聊 提交于 2019-12-01 06:56:14
问题 I have this XML document : <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Fragment> <DirectoryRef Id="AcquisitionFolder"> <Directory Id="dir2EE87E668A6861A2C8B6528214144568" Name="bin" /> <Directory Id="dir99C9EB95694B90A2CD31AD7E2F4BF7F6" Name="Decoders" /> </DirectoryRef> </Fragment> </Wix> I'd like to obtain the following result : <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http:/

XSLT 1.0 Compare Dates

主宰稳场 提交于 2019-12-01 05:15:43
问题 I want to compare current date against a start date and end date. XML is: <forms> <form id="11"> <start>somedate</start> <end>someotherdate</end> </form> </forms> I am currently trying: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ex="http://exslt.org/dates-and-times" extension-element-prefixes="ex" > <xsl:choose> <xsl:when test="end != '' and start != '' and ex:date(start) <= current-date() and current-date() <=

How to compare strings with Xpath 1.0?

笑着哭i 提交于 2019-12-01 04:44:00
I am experiiencing an issue with the < operator on strings in Xpath 1.0. This simple Xpath expression 'A' < 'B' (or the equivalent 'A' < 'B') did not evaluate to true in my xslt run in libxslt (which is an XSLT 1.0 engine). I checked in XML Spy, which allows testing Xpath expressions in both 1.0 and 2.0, and sure enough, in Xpath 2.0 it evaluates to true , but in Xpath 1.0 it evaluates to false ! Is this a bug in Xpath 1.0? What other expression should I use to compare two strings/characters for their alphabetical order? Note that the compare() function will not do, as this is an XSLT 2.0

Padding number with leading zeros in XSLT 1.0

对着背影说爱祢 提交于 2019-12-01 04:11:36
We have a number in XML that can go up to 3 digits in a large XML file that has to be converted to fixed length text for loading into another system. I need to pad this with leading zeros to a length of 15 in the output (which is fixed length text) Examples: - 1 becomes 000000000000001 - 11 becomes 000000000000011 - 250 becomes 000000000000250 I tried this: <xsl:value-of select="substring(concat('000000000000000', msg:BankAccount/msg:Counter), 12, 15)"/> to get the 15 zeros at the beginning and take the substring but I must have made a mistake with the substring because in the results I get