Member Avatar
Hello experts, I am new to XSLT, SInce I am working integration project where we have XML to XML conversion using XSLT There is one line of code which I am not understanding <xsl:when test="following-sibling::*[2]/CreditOrDebitTransactionType='54'"/> Can anyone explain what this code does , and "CreditOrDebitTransactionType" what this does , This …
by sridharsapxi in Software Development ()
Member Avatar
Hi there ! I have xml and xsl files i need to convert them to xslfo files . I need this to convert to pdf files. Thanks.
by servent123 in Software Development ()
Member Avatar
Hi What would be a good recommendation for a practical resources on using xml, xpath and xquery? By practical I mean. Accessing values, storing files, creating set queries on xml to create a feed to push data to other applications (eg ipython, rstudio, the Web) maintaining data integrity, and transformng …
by flebber 12 in Software Development ()
Member Avatar
Is it possible to count the instances of a for-each boolean statement. for example, say you have patients in a hospital and certain criteria must be met to discharge them. 100(%0) health would equal a discharge, pseudo code would read something like this: totalHealth - HighTemperature + medication * recoveryPeriod …
by george08.08 in Software Development ()
Member Avatar
Hello, I have the following code in XML: And the result in an xml file: And I help to the xsl file that generates de result xml file. Somebody can help me?
by suburbios0 in Software Development ()
Member Avatar
For the following xml file, i need to generate an xsl-fo file to be converted into pdf. I am new to style sheets and struggling to create dynamic table. Please help. Also, the width for each column varies,based on the column.How would i include this into the code? The Column …
by mb2006 in Software Development ()
Member Avatar
I have a situation in xsl where I had a param value that will be assigned some where in xslt transformation. But I get that param as a String , that param may contains a node a unbounded[0 or more repetitions] . How can I use param in for each …
by eresh.leo -4 in Software Development ()
Member Avatar
Hi I have been reading so many tutorials but can't seem to get anywhere, with what I thought would be a simple task. I have an xml file outputted from some software in the vague format: Fairly straight forward data, nothing really nested. All I am trying to do is …
by duffman69 in Software Development ()
Member Avatar
I think this simple example might ask the question a lot more clearly. I have an input file with multiple products. There are different types of product (2 types with 2 product IDs is fine enough for this example), but the input will have many more. I only want to …
by codesforcoffee in Software Development ()
Member Avatar
I want to obtain a better xml file using some xslt and xml below. <?xml version="1.0" encoding="UTF-8"?> <Pallets><Pallet> <PalletNumber>2</PalletNumber> <Product>1</Product> <Quantity>2</Quantity> </Pallet> <Pallet> <PalletNumber>2</PalletNumber> <Product>1</Product> <Quantity>4</Quantity> </Pallet> <Pallet> <PalletNumber>2</PalletNumber> <Product>2</Product> <Quantity>1</Quantity> </Pallet> <Pallet> <PalletNumber>3</PalletNumber> <Product>1</Product> <Quantity>2</Quantity> </Pallet> <Pallet> <PalletNumber>4</PalletNumber> <Product>2</Product> <Quantity>2</Quantity> </Pallet></Pallets> I need to sum up quantity per pallet …
by chopstix21 in Software Development ()
Member Avatar
Hi, Can someone help me on this. Really appreciated. Requirement: 1. To generate separate html files for each pal:fragment element, for the source document attached ,the files gets name based on @fragment-id which is present on the pal:fragment elements. 2. The <pal:fragment> can be nested, wrapped with<div> element. 3. The …
by suresh.xsltlist in Software Development ()
Member Avatar
I want to merge 2 XMLs based on a particular condition. e.g: Sample1.xml: <rootNode> <header> <title agg="sum">1</title> <records agg="sum">10</records> <number agg="min">5</number> <header> </rootNode> Sample2.xml <rootNode> <header> <title agg="sum">2</title> <records agg="sum">20</records> <number agg="min">15</number> <header> </rootNode> I want that these two xml files should be merged based on the attribute specified within …
by mohit.bhayana.142 in Software Development ()
Member Avatar
Hello Guys, Just wanted to ask on how to get the author names in the given xml sample below and put an attribut of eq="yes". EQ means Equal Contributors. This is the XML. This should be the output in other form of XML. Assuming that JOhn Doe and Jane Doe …
by WebStone in Software Development ()
Member Avatar
I have created a userConfig file to add MSGOTHIC font to FOP. Now I have set the config in my fop object : FOUserAgent foUserAgent = fopFactory.newFOUserAgent(); fopFactory.setUserConfig(userConfigFile); The font is getting registered as I can see in logs. But it is not being found while lookup: Substituting with "any,normal,400". …
by shraddha_gupta in Software Development ()
Member Avatar
I'm trying to write a transform to parse an html document and create another html document but I can't seem to use the html tags in the xslt. My html source that I want to apply the transform on looks like this: My XSLT looks like this: Can anyone help …
by baltazar in Software Development ()
Member Avatar
Need an xslt to convert xml into json. I have a xml file which is having 3 attributes. The value in the 3rd attribute is another xml file. I need an xslt which can read the value of the 3rd attribute as another xml (not just a value) and can …
by manus26 in Software Development ()
Member Avatar
Hi, I'm probably missing something really simple or trying too much at once but it's 16:30 on a Friday afternoon and my head is wrecked!! Basically, I'm trying to build an application that takes out put from a database query as XML and uses XSL to transform it into HTML …
by G_Waddell 131 in Software Development ()
Member Avatar
Gave me the result Wellness Week <div class="ExternalClassAE181F1178854D1387770B8F397CE92E"> <span style="color:rgb(102, 102, 102);font-family:tahoma;background-color:rgb(216, 211, 197)"> We are having a wellness week starting April 1st, 2012 till April 7th, 2012. </span> </div> <div class="ExternalClassAE181F1178854D1387770B8F397CE92E"> <span style="color:rgb(102, 102, 102);font-family:tahoma;background-color:rgb(216, 211, 197)"> <br /></span></div> Flu Shots Coming Soon <div class="ExternalClass237E06C33F994D6C96E297EA04755B2B"> <p> ​<span style="font-family:tahoma">Morbi dolor …
by smsm08 in Software Development ()
Member Avatar
Firstly I will say im a complete and total novice when it comes to XSLT and XML so this could be a very obvious mistake on my behalf. &lt;xsl:stylesheet version="1.0" xmlns:xsl=""&gt; &lt;xsl:template match="node()"&gt; &lt;xsl:copy&gt; &lt;xsl:copy-of select="@*"/&gt; &lt;xsl:apply-templates/&gt; &lt;/xsl:copy&gt; &lt;/xsl:template&gt; &lt;xsl:template match="TestNode"&gt; &lt;RenamedNode&gt; &lt;xsl:copy-of select="."/&gt; &lt;/RenamedNode&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; When running the …
by Mike Askew 131 in Software Development ()
Member Avatar
In an XSLT file, I am calling a function to a javascript file (.ascx) and trying to pass parameters. One parameter is a Date() object. The only way I've found to successfully pass it is to pass it as a string. Here's the code from the XSLT file. &lt;script&gt; grouping("&lt;xsl:value-of …
by fusionking in Web Development ()
Member Avatar
Hello everyone, I am studying XML, XPath, XQuery, XSLT on my own and I want to sharpen my skills working on opensource projects. I am searching on Apache and other websites but the projects are too huge and in much advanced stage to start working on. I want to get …
by tungsten in Software Development ()
Member Avatar
Hi there, I have a very simple schema where each node requiring HTML output contains 7 possible numerical variables (all within nodes N1 - N13). I need to output text and image content according to the number within each node. Below is a sample of my schema: &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt; …
by mulegoat in Software Development ()
Member Avatar
Hi all, I've got my xml displaying correctly using php and the xsl template below, but I only want to display properties with a type of either apartment or unit, and have more than 2 bedrooms. I can't for the life of me work this out. I've tried using , …
by shanwise101 in Software Development ()
Member Avatar
Hi Friends, I am new to this XML &amp; XSL. I want to write a template which takes two arguements and it should take the node name and node value. in template i want to format the input value. Please share if any one can guide me on this. The …
by Haranadh in Software Development ()
Member Avatar
I am new to XSLT and am trying to solve the following transformation. I have an XML that looks like this... &lt;Groups&gt; &lt;Group&gt; &lt;GroupSelector&gt;52&lt;/GroupSelector&gt; &lt;GroupDescription&gt;Group 52&lt;/GroupDescription&gt; &lt;GroupValue&gt;ABCD&lt;/GroupValue&gt; &lt;/Group&gt; &lt;Group&gt; &lt;GroupSelector&gt;27&lt;/GroupSelector&gt; &lt;GroupDescription&gt;Group 27&lt;/GroupDescription&gt; &lt;GroupValue&gt;PQRS&lt;/GroupValue&gt; &lt;/Group&gt; &lt;Group&gt; &lt;GroupSelector&gt;20&lt;/GroupSelector&gt; &lt;GroupDescription&gt;Group 20&lt;/GroupDescription&gt; &lt;GroupValue&gt;XYZA&lt;/GroupValue&gt; &lt;/Group&gt; &lt;Group&gt; &lt;GroupSelector&gt;15&lt;/GroupSelector&gt; &lt;GroupDescription&gt;Group 15&lt;/GroupDescription&gt; &lt;GroupValue&gt;MNOP&lt;/GroupValue&gt; &lt;/Group&gt; &lt;/Groups&gt; There may be …
by lolain in Software Development ()
Member Avatar
Hi i'm new to xslt the below code for getting chart in pdf after clicking the chart checkbox &lt;xsl:if test="$chartimage"&gt; &lt;fo:block text-align="center" space-after="8em"&gt; &lt;fo:external-graphic xmlns:fo="" scaling="uniform"&gt; &lt;strong&gt;&lt;xsl:attribute name="src"&gt;&lt;/strong&gt; &lt;xsl:value-of select="concat(concat('url(',$chartimage),')')" /&gt; &lt;/xsl:attribute&gt; &lt;/fo:external-graphic&gt; &lt;/fo:block&gt; &lt;xsl:if test="$chartPageBreak='true'"&gt; &lt;fo:block break-after="page" /&gt; &lt;/xsl:if&gt;&lt;/xsl:if&gt; bold coded setted attribute name through that they are getting …
by jeraldmuthu in Software Development ()
Member Avatar
I am trying to run this XPath expression (that is, trying to count how many element content strings in my XML file end with letter-one-f ('a') or letter-two-f ('A'): &lt;xsl:value-of select="count( substring(.,string-length(.) -1,string-length(.) -1)=$letter-one-f or substring(., string-length(.) -1,string-length(.) -1)=$letter-two-f )"/&gt; but I don't know how to refer to the 'current …
by uid1 in Software Development ()
Member Avatar
Since it's been about three years since I had to write any XSLT, I'd like some assistance with the code below. &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet xmlns:xsl="" version="2.0"&gt; &lt;xsl:output method="text"/&gt; &lt;xsl:template match="/"&gt; &lt;xsl:for-each select="/WatchConfig/ProcessList/Process/Node"&gt; &lt;xsl:if test="Plugin = 'PWScript'"&gt; &lt;xsl:text&gt; &lt;/xsl:text&gt; &lt;xsl:value-of select="Config" disable-output-escaping="yes" /&gt; &lt;xsl:text&gt; ************************************************************************ &lt;/xsl:text&gt; &lt;/xsl:if&gt; &lt;/xsl:for-each&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; …
by tgreer 189 in Software Development ()
Member Avatar
Hi All, I am new to XML,XSLT. I have been assigned to task of Generating HTML pages based on the XML file &amp; the condition is No Hardcoding of Nodes and other details. My XML file is of the below struct: Node inside Nodes , and those nodes would contain …
by anandunics in Software Development ()
Member Avatar
Hey guys, I have a problem extracting some data out of this XML file: &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;ph:Graphs xmlns:ph="" xmlns:xsi=""&gt; &lt;ph:Graph name="mass_spring_mo"&gt; &lt;ph:Element id="0" type="Fixed"&gt; &lt;ph:Port id="1" type="port"&gt; &lt;ph:Attribute&gt; &lt;ph:AttributeField name="type" value="string"/&gt; &lt;ph:AttributeField name="name" value="type"/&gt; &lt;ph:AttributeField name="value" value="flange"/&gt; &lt;/ph:Attribute&gt; &lt;/ph:Port&gt; &lt;/ph:Element&gt; &lt;ph:Element id="2" type="Spring"&gt; &lt;ph:Attribute&gt; &lt;ph:AttributeField name="type" value="int"/&gt; &lt;ph:AttributeField name="name" …
by michele_muc in Software Development ()