70 Topics

Member Avatar for
Member Avatar for Tsakaki

I'm working on a simple XML/XSLT file that is just meant to display a list of books on a very simple html layout. The files were created to learn XML and XSLT. I have since created two XSLT files that use the same XML. One displays the information in a …

Member Avatar for Reverend Jim
0
1K
Member Avatar for priyanka.choudhary.90038

How to escape the double quotes using XSLT: My xls file converting xml file into csv file. my xml node is as below: <?xml version="1.0" encoding="ISO-8859-1"?> <TRADING_TITLE><TITLE>SBU</TITLE><DESCRIPTION><![CDATA[Simply Be Inquiries]]></DESCRIPTION><REGISTERED><NAME><![CDATA[Speciality Home Shopping (US) Limited]]></NAME><ADDRESS1><![CDATA[Griffin House]]></ADDRESS1><ADDRESS2><![CDATA[40 Lever Street]]></ADDRESS2><ADDRESS3><![CDATA[Manchester]]></ADDRESS3><ADDRESS4><![CDATA[United Kingdom]]></ADDRESS4><ADDRESS5><![CDATA[M60 6ES]]></ADDRESS5></REGISTERED><WEB_ADDRESS>www.simplybe.com</WEB_ADDRESS><COMPANY_NUMBER>03941468</COMPANY_NUMBER><ENQUIRY_DAYS_PER_WEEK>7</ENQUIRY_DAYS_PER_WEEK><ENQUIRY_TEL_NO>18774074675</ENQUIRY_TEL_NO><ORDER_TEL_NO>18774074675</ORDER_TEL_NO><ORDERLINETIMES><WEEKDAY_OPEN>8am</WEEKDAY_OPEN><WEEKDAY_CLOSE>11pm</WEEKDAY_CLOSE><SATURDAY_OPEN>8am</SATURDAY_OPEN><SATURDAY_CLOSE>11pm</SATURDAY_CLOSE><SUNDAY_OPEN>8am</SUNDAY_OPEN><SUNDAY_CLOSE>11pm</SUNDAY_CLOSE></ORDERLINETIMES><ENQUIRYLINETIMES><WEEKDAY_OPEN>8am</WEEKDAY_OPEN><WEEKDAY_CLOSE>11pm</WEEKDAY_CLOSE><SATURDAY_OPEN>8am</SATURDAY_OPEN><SATURDAY_CLOSE>11pm</SATURDAY_CLOSE><SUNDAY_OPEN>8am</SUNDAY_OPEN><SUNDAY_CLOSE>11pm</SUNDAY_CLOSE></ENQUIRYLINETIMES><CORRESPONDENCE><NAME><![CDATA[Simply Be Inquiries]]></NAME><ADDRESS1><![CDATA[777 South State Road 7]]></ADDRESS1><ADDRESS2><![CDATA[Margate, Florida 33068]]></ADDRESS2><ADDRESS3/><ADDRESS4/><ADDRESS5/></CORRESPONDENCE><TRADING_AS_INDICATOR>Y</TRADING_AS_INDICATOR><REGISTERED_NUMBER>03941468</REGISTERED_NUMBER><BRAND_LOGO_NUMBER>DAL90</BRAND_LOGO_NUMBER><FSA_TEXT><![CDATA["Simply Be" is a trading …

Member Avatar for AndrisP
0
6K
Member Avatar for sridharsapxi

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 …

Member Avatar for JOSheaIV
0
267
Member Avatar for servent123

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.

Member Avatar for servent123
0
361
Member Avatar for flebber

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 …

Member Avatar for Mike Askew
0
343
Member Avatar for george08.08

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 …

Member Avatar for george08.08
0
617
Member Avatar for suburbios0

Hello, I have the following code in XML: <?xml version="1.0" encoding="UTF-8"?> <agency> <destinations> <destination id="bel">Belize</destination> <destination id="mad">Madeira</destination> <destination id="per">Peru</destination> </destinations> <traveler id="coelho"> <passport>P-123456-08</passport> <name>Pedro Coelho</name> <born>1964-10-05</born> <trip> <start>2013-07-01</start> <end>2013-07-15</end> <itinerary destination="bel"> Viagem em classe executiva para Belize via Frankfurt. </itinerary> <plane date="2013-07-01"> Pedir refeição vegan. <airport>Barajas</airport> Alertar assistente antes da …

Member Avatar for xml_looser
0
333
Member Avatar for mb2006

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 …

0
118
Member Avatar for eresh.leo

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 …

0
98
Member Avatar for duffman69

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: <root> <one>data</one> <two>more data</two> <three> even more data</three> </root> Fairly straight forward data, nothing …

Member Avatar for raihan.ikbal
0
207
Member Avatar for codesforcoffee

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 …

Member Avatar for codesforcoffee
0
2K
Member Avatar for chopstix21

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 …

0
105
Member Avatar for suresh.xsltlist

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 …

0
164
Member Avatar for mohit.bhayana.142

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 …

Member Avatar for rahul4aug
0
3K
Member Avatar for WebStone

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. <ArticleFootnote Type="Misc"> <Para>John Doe and Jane Doe are equal contributors.</Para> </ArticleFootnote> This should be the output in …

Member Avatar for Mike Askew
0
128
Member Avatar for shraddha_gupta

I have created a userConfig file to add MSGOTHIC font to FOP. <fop version="1.0"> <renderers> <renderer mime="application/pdf"> <fonts> <!-- register a particular font --> <font metrics-url="file:/tmp/msmsgothic.xml" kerning="yes" embed-file="file:/tmp/msgothic.ttf"> <font-triplet name="MSGothic" style="normal" weight="normal"/> </font> <font metrics-url="file:/tmp/msmsgothic.xml" kerning="yes" embed-file="file:/tmp/msgothic.ttf"> <font-triplet name="MSGothic" style="normal" weight="bold"/> </font> </fonts> </renderer> </renderers> </fop> Now I have set …

0
187
Member Avatar for baltazar

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: <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body class="3-column"> <div …

Member Avatar for Mike Askew
0
1K
Member Avatar for manus26

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 …

Member Avatar for Mike Askew
0
223
Member Avatar for G_Waddell

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 …

Member Avatar for G_Waddell
0
2K
Member Avatar for smsm08

> Quoted Text Here <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema"> <xsl:output method="html" indent="no"/> <xsl:template match="//xml"> <span style="border:solid 1px black"> -<xsl:value-of select="@query"/>- </span> <xsl:for-each select="//z:row"> <div> <xsl:value-of select="@ows_LinkTitle"/> </div> <div> <xsl:value-of select="@ows_Body"/> </div> </xsl:for-each> </xsl:template> </xsl:stylesheet> Gave me the …

-2
124
Member Avatar for Mike Askew

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. [CODE] <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="node()"> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="TestNode"> <RenamedNode> <xsl:copy-of select="."/> </RenamedNode> </xsl:template> </xsl:stylesheet> [/CODE] When …

Member Avatar for StephNicolaou
0
196
Member Avatar for fusionking

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. [CODE]<script> grouping("<xsl:value-of …

Member Avatar for Troy III
0
239
Member Avatar for tungsten

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 …

Member Avatar for dknochen
0
222
Member Avatar for mulegoat

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: [CODE] <?xml version="1.0" …

0
108
Member Avatar for shanwise101

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 <xsl:choose>, …

Member Avatar for mrame
0
206
Member Avatar for Haranadh

Hi Friends, I am new to this XML & 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 …

0
131
Member Avatar for lolain

I am new to XSLT and am trying to solve the following transformation. I have an XML that looks like this... [CODE]<Groups> <Group> <GroupSelector>52</GroupSelector> <GroupDescription>Group 52</GroupDescription> <GroupValue>ABCD</GroupValue> </Group> <Group> <GroupSelector>27</GroupSelector> <GroupDescription>Group 27</GroupDescription> <GroupValue>PQRS</GroupValue> </Group> <Group> <GroupSelector>20</GroupSelector> <GroupDescription>Group 20</GroupDescription> <GroupValue>XYZA</GroupValue> </Group> <Group> <GroupSelector>15</GroupSelector> <GroupDescription>Group 15</GroupDescription> <GroupValue>MNOP</GroupValue> </Group> </Groups> [/CODE]There may be …

Member Avatar for mrame
0
212
Member Avatar for jeraldmuthu

Hi i'm new to xslt the below code for getting chart in pdf after clicking the chart checkbox [CODE] <xsl:if test="$chartimage"> <fo:block text-align="center" space-after="8em"> <fo:external-graphic xmlns:fo="http://www.w3.org/1999/XSL/Format" scaling="uniform"> [B]<xsl:attribute name="src">[/B] <xsl:value-of select="concat(concat('url(',$chartimage),')')" /> </xsl:attribute> </fo:external-graphic> </fo:block> <xsl:if test="$chartPageBreak='true'"> <fo:block break-after="page" /> </xsl:if></xsl:if> [/CODE] bold coded setted attribute name through that they …

0
142
Member Avatar for uid1

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'): [code=xslt]<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 )"/>[/code] but I don't know how to refer to the 'current …

Member Avatar for uid1
0
245
Member Avatar for tgreer

Since it's been about three years since I had to write any XSLT, I'd like some assistance with the code below. [CODE]<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:for-each select="/WatchConfig/ProcessList/Process/Node"> <xsl:if test="Plugin = 'PWScript'"> <xsl:text> </xsl:text> <xsl:value-of select="Config" disable-output-escaping="yes" /> <xsl:text> ************************************************************************ </xsl:text> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet>[/CODE] …

0
174

The End.