How to use condtion in xpath

<courses> <course number = "1" category = "A"> <title>B</title> </course> </courses> I want to pick all @number has category= "A" I try to use //@number[@category/text()='A'], but it seem no work, So how can I ge...
more »

2017-12-03 23:12 (2) Answers

remove element by position

I have an xml which has a simple set of data. This data is displayed in a simple table and each row of data is assigned an ID in the table based on the position in the xml ( <xsl:value-of select="position()" /> ). I cant add an id attribute to th...
more »

2017-11-22 23:11 (2) Answers

xsl:value-of and xsl:for-each ignored in XSLT

I try to select attributes from an API XML-response file using XSLT. This is the request that returns the XML-file:
more »

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

Are xsl-fo-elements part of xsl-files?

I try to understand how the workflow is to convert xml in html and pdf from a single source. I understand what a xml-file is, how it is structured etc. I understand what a dtd or a schemm is doing. And I also understand what a xsl file is doing, in c...
more »

2017-11-18 22:11 (1) Answers

Explain how xml is processed by xsl

I have this *.xml file <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="xq340.xsl"?> <wine grape="Cabernet"> <winery>Duckpond</winery> <product>Merit Selection</product>...
more »

2017-11-15 07:11 (1) Answers

Resolving relative paths when using ph-schematron

I'm using ph-schematron, a Java library that validates XML documents via ISO Schematron: This library provides 2 ways of XML document validation: Validation via XSLT Validation via Pure Schematron I would love to use the second type, but my Sche...
more »

2017-11-10 16:11 (2) Answers

How do I break down large XPaths in XSLT?

I'm writing some product exports in XSLT and I have some fairly large select statements, as I have these sort of nested sorts/headers Given a select statement such as... /objects/object/items/item[ not( custom_options/custom_option[brac...
more »

2017-11-09 16:11 (1) Answers

XSLT Identity Transform logic

From what I understood, the XSLT Identity transform template works by iterating through the XML structure and copying all the child nodes and attributes. But when I try to override a node to make some changes by using match with <xsl:template>...
more »

2017-11-08 22:11 (2) Answers

How to remove xmlns="" in an element?

The problems is that I don't know how to remove xmlns from an element. So my question is: How to remove xmlns="" in the tag NetLineAmount (see "Result XML") in an element? Source XML: <?xml version="1.0" encoding="UTF-8"?> <Invoice xmlns:x...
more »

2017-10-26 19:10 (1) Answers

Referencing data from Duplicated Tags

I would really appreciate assistance with my problem. Please could you assist i have looked online for a work around or a similar example but could not find anything. I have received the following xml to import into our system : <Address addre...
more »

2017-10-20 17:10 (1) Answers

XSL translate wrong output

I have a problem with translating a text! <text>This is a non breaking -</text> <text> <span style=""> <span style="">Testtext</span> </span> ‑ <span style=""> <sp...
more »

2017-10-19 09:10 (1) Answers

XSLT and for-each

I have an XML message like the following: <message> <line number="1"><li>1</li><li>2</li><li>3</li></line> <line number="2"><li>x</li><li>y</li><li>z</li>...
more »

2017-10-19 00:10 (1) Answers

XSL using parameter for-each

I am using an XSL stylesheet to transform an xml document to html in an android environment. <?xml version="1.0" encoding="UTF-8"?> <list> <project id="Proj02"> <observation id="Proj02_Obs001"> … </obser...
more »

2017-10-18 10:10 (1) Answers