xpath select all attributes ending with foo?

Is it possible with XPATH/XSLT 1.0 to select all attributes ending with "Foo"? I'm writing some XSLT to get the list of all values of all attributes for all "InterestingElement"s where the attribute name ends with "Foo". Actually I also want to fil...
more »

2017-03-20 20:03 (2) Answers

Selecting two attributes in XSLT

I want to select 'language' and 'food' from an XML, using XSLT, that has elements like this: <item id="1"> <language>Spanish</language> <food>Paella</food> <score>3.5</score> </item> ...
more »

2017-03-17 19:03 (2) Answers

Extract data from SOAP response in PHP

I have this XML response coming from OSvC and I want to process it to extract sfdc_record_id and print its value a0t4C000000I8YPQA0. How to print that data in PHP? <pre> <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelop...
more »

2017-03-16 15:03 (1) Answers

XSLT arbitrary character

I'm transforming XML document through XSL and I have more elements starting with the same letter, but ending with different numbers. In this example it is DTM_*: `<DTM_01> <idDTM_01>DTM</idDTM_01> <DTM_01_C507> . . ....
more »

2017-03-11 21:03 (1) Answers

Why is xsl:copy-of not working for me?

I have the following XSLT which wraps three specific elements and then renames some more nodes. The problem is that it only wraps the initial elements and the next part of the XSLT does not run. If I comment out the wrap part of the XSLT the rename i...
more »

2017-03-11 13:03 (1) Answers

What's wrong in this xsl:sort?

Sorry for my bad English. I am studying XML and XSLT on w3schools.com. The page https://www.w3schools.com/XML/xsl_choose.asp contains a "Try it Yourself" element. I updated XSLT Code after: <xsl:for-each select="catalog/cd"> I added: <...
more »

2017-03-04 23:03 (1) Answers

XSLT 2.0 to flatten and prune excessive <span>s

Background We're in charge of processing XML text generated by a different group in our company. Some of this XML is created in Confluence (for those of you familiar with it), and some of it was originally authored in other tools (most commonly MS ...
more »

2017-03-04 03:03 (1) Answers

XSLT when attribute is a number

starting with this XML (to be imported in Access): <?xml version="1.0" encoding="UTF-8"?> <ITEM> <PRODUCT_CODE TYPE="EPSON">V11H106040JA</PRODUCT_CODE> <PRODUCT_CODE TYPE="EAN">8715946168340</PRODUCT_CODE>...
more »

2017-02-24 17:02 (1) Answers

How to validate Xml in that specific way

My problem is that i dont know how to properly write a xsd that allows me to validate xml in such way : i need to have few necessary nodes (in any order) and to allow any other nodes to be in root so for example i need to validate such xml, with 2 ...
more »

2017-02-05 22:02 (1) Answers

XSLT-2.0: grouping by node content

We need to do a grouping table rows on the content of the first column, and then perform a certain amount of processing for each row in the group. The contents of the first column - numbers. It would be approached for-each-group, if the columns do no...
more »

2017-02-05 18:02 (3) Answers

cdata-section-elements not working

I am trying to set a password in an xml file generated via XSLT (using Saxon-HE v9.7.0.14), by setting a global parameter. The password can contain any characters so it needs to be put in a CDATA section. I am trying to achieve this by setting the ...
more »

2017-02-03 07:02 (3) Answers

awk double quote field separator

I can't seem to figure out my last piece to achieve my desired output. I have a file with many entries like the following: <Stats> <RecNum>45435</RecNum> <Date>2016/12/31</Date> <DayofWeek>6</Dayof...
more »

2017-01-29 01:01 (3) Answers

How to print percentile using xsl

I am trying to generate 99 percentile in the HTML report using jmeter-results-detail-report_21.xsl file. I am able to print the 90 percentile using the below code: </xsl:template> <xsl:template name="percentiles"> <xsl:param na...
more »

2017-01-24 04:01 (1) Answers

remove root tag from xml using xslt

I have an xml file like this <root> <level1>data</level1> <level1>data</level1> . . . <level1>data</level1> <level1>data</level1> </root> I want to remove the root tag using xslt. can any...
more »

2017-01-21 12:01 (1) Answers

Pandas read_xml() method test strategies

Interestingly, pandas I/O tools does not maintain a read_xml() method and the counterpart to_xml(). However, read_json proves tree-like structures can be implemented for dataframe import and read_html for markup formats. Now, if the pandas team does...
more »

2017-01-21 07:01 (0) Answers

XSLT Transformation from XML PCDATA to XML

I need to do transformation from PCDATA in XML into another XML. Can any one help me on this? I need to map the line of business, site-location and policy number from the request to the corresponding field in response. Input XML containing PCDATA w...
more »

2017-01-18 09:01 (1) Answers

XSLT - concatenating values to existing one

I have the following XML: I would like id to be the concatenation of subname + subname2. Example: For the first one id would be: ThinkVision, the second one: LenovoMind Is this achievable via xsl:for-each ? I tried using the following xslt: ...
more »

2017-01-16 19:01 (1) Answers