1,599 Topics

Member Avatar for
Member Avatar for JotaPe

Hi to all! I am pretty new to Xpath and I am quite lost. I use Stylus Studio Prof for all things related to XML, and I've been struggling with this apparently simple question for a few days. If I have something like: [code] <sales> <person> <id> <tag>2345X</tag> <name>Doe, Joe</name> …

Member Avatar for xml_looser
0
102
Member Avatar for Edward67

i have an XML-file that i want to clean up with an XLST-file and save it as an new XML-file. I am still a beginner but like to learn more. I have used a "for-each" function but i cant find what i am doing wrong. He loops the file, but …

Member Avatar for xml_looser
0
108
Member Avatar for sonya_sml

Hi, Its bit urgent! Can someone please show me how to use nested loop. I have following XML file. I need to print amount in minus if any of the ApplicationReply value is credit, else the Amount should be positive. <xsl:for-each select="Reply/ApplicationReplies/ApplicationReply[@Name='credit']"> <xsl:if test="position() = 1"> <xsl:value-of select="concat($sep, $sign, /Reply/Amount,$sep)"/> …

Member Avatar for pritaeas
0
82
Member Avatar for northsouthking

Hi all, I need some help on parsing latin character, when i am applying stylesheet(XSLT) on source xml file this will give some target xml file but when transforming file those latin characters converting into "?"(Question mark). Please help me how to solve this problem...

Member Avatar for northsouthking
0
69
Member Avatar for MasterJon

I'm a beginner. I'm learning XPath. This is the sample structure: [code] <AAA> <BBB/> <CCC/> <DDD/> <AAA/> <BBB/> </DDD> <div class="some"> <AAA/> <BBB/> <div id="special"> <AAA/> </div> <div style="clear: both;"/> <hr/> <div> text </div> <div> text </div> <div> text </div> <hr/> <div> text </div> <div> text </div> <DDD/> <EEE/> </div> …

Member Avatar for fpmurphy
0
1K
Member Avatar for sbutt

Hi Folks, I have two questions: 1). How to escape CDATA in your xslt script? [code] <xsl:template match="/"> <![CDATA[ <xsl:apply-templates select="node()"/> ]]> </xsl:template> [/code] In the above code, the template inside CDATA does not get executed. What I actually want is the result from this template (<xsl:apply-templates select="node()"/>) to be …

Member Avatar for fpmurphy
0
134
Member Avatar for Soporose

Hi all. I'm struggling to come to grips with parsing an XML file because I need to implement a very simple example of the Namecheap API. The API requires me to submit a very long URL (see the variable 'filepath' in my example code further down). When I drop the …

0
37
Member Avatar for jerryjerry

hello I am new to DOM Parser. I tried alot to write a XML file but not getting any result. I want to create one xml file then create all the nodes at run time. I am using xerces C++. Please give me some code snippets if possible or suggest …

0
49
Member Avatar for sbutt

Hi Folks, I'm new to xslt transofrmation so need a little help in transforming the following example. Input: [CODE]<Persons>12</Persons>[/CODE] Output: [CODE]<PassengerRPHs ListOfPassengerRPH="1 2"/>[/CODE] The main thing above is to put a space between digits, 123 -> 1 2 3. It would be perfect if the transformation also handles 9101112 -> …

Member Avatar for fpmurphy
0
106
Member Avatar for techza

Hello, I have a xml file below from which I want to extract the data using xslt. I trying to create the xslt but no results , I have some hard coated values in the xslt which I want in the output xml. I also need the other values from …

0
53
Member Avatar for sivak

In Visual Studio 2008, I received the below error message while trying to add a web reference to my Web Application. "There was an error downloading '.....asmx'. " I had no issues when I tried the same in Visual Studio 2003. What would be the problem? Please help me, It's …

0
60
Member Avatar for Ryders

Hi all, I have a piece of xml+html which I'm trying to cleanup using xslt. Here's a sample; [CODE]<body> <TEXT>A few bright spots are emerging in the small to medium-size enterprises landscape, but funding issues remain as much a problem for those who want to expand overseas as for those …

Member Avatar for xml_looser
0
93
Member Avatar for chedderslam

I don't use XSLT very much, but need to modify our current file. Right now, we have the following statement: [CODE] <business_use> <xsl:value-of select="if (*:PersDriverInfo/*:kait_BusinessUseInd = '1') ))then 'Y' else 'N'"/> </business_use> [/CODE] I am trying to modify it to look at an additional node like this: [CODE] <business_use> <xsl:value-of …

Member Avatar for cwlocke
0
102
Member Avatar for Swijr

I have a task where I'm transforming a response like this: [code] <Names> <Name> <First></First> <Last></Last> <Middle></Middle> </Name> <Name> <First></First> <Last></Last> <Middle></Middle> </Name> </Names> [/code] But I have to format it into nodes like this: [code] <name_first_1></name_first_1> <name_last_1></name_last_1> <name_middle_1></name_middle_1> <name_first_2></name_first_2> <name_last_2></name_last_2> <name_middle_2></name_middle_2> [/code] So I wanted to use position() to …

Member Avatar for Swijr
0
90
Member Avatar for behrk2

Hey everyone, I am going to be developing a reporting component based on a relational database. Reporting is a big thing, naturally. So I want to make sure I do it right. I have been doing a lot of research, and I want to see what you all think of …

Member Avatar for xml_looser
0
94
Member Avatar for wewehalim

Hi, this is my final project. I have generated an xml string, and i want to parse it with dom parser, but i have error here.. this is my code: import java.io.StringReader; import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.CharacterData; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; …

0
80
Member Avatar for sbutt

Hi Folks, I have an xml response, which I want to store into the database (mysql) through XSLT script. For basic data types, I can just prepare a simple insert statement through xslt script which further passed to java for further execution. <xsl:template match="ota:OTA_TT_HotelResRS">insert into booking (createdBy, bookingNumber, created, modified, …

0
64
Member Avatar for fastoy

I use an old program favoritesync.exe to manage Windows Favorites across multiple PCs. It creates an xml with the Favorites data and an xsl file to render it. It has been working successfully through IE7. Now I've begun using Firefox (3.5 beta 4) and I get the message "Error loading …

Member Avatar for fpmurphy
0
240
Member Avatar for phoenix.zhp

hi, I need select a node like "//element[@attr='value']", but the "attr" in document can be "Attr", "ATtr" and so on, as well as the "value". I know I can select element with case insensitive using translate function like "//*[translate(name(), 'abc','ABC')='ABC']" But how can I let it work with attribute and …

Member Avatar for phoenix.zhp
0
1K
Member Avatar for kranthi_543

Dear All, Passing condition as string to XSLT using Javascript as a parameter is not giving any results. Below is the code snippet:- [ICODE]script: var processor = new XSLTProcessor(); processor.importStylesheet(xslt); processor.setParameter(null, "query","not($projectId = 9820) and not($projectId = 9164)"); xsl code: <xsl:if test="$query"> I verified by priting xsl:value-of and string is …

Member Avatar for kranthi_543
0
126
Member Avatar for guruward

I have a questions table and it has a couple of columns startTag and closeTag which contain html which tells the page how I want to render the question [code] <xsl:value-of select='Questions/startTag' /><xsl:attribute name="name"><xsl:value-of select='practiceResponseId' /></xsl:attribute><xsl:attribute name="Value"> <xsl:value-of select='response' /></xsl:attribute><xsl:value-of select='Questions/closeTag' /></td> [/code] this way I can render the question …

Member Avatar for guruward
0
97
Member Avatar for m_hustle

hi, i have the attached xml file and i wish to perform some xpath expressions in java which i have declared as follows. [CODE]final String xPathexp1 = "sbml_ns:sbml/sbml_ns:model/sbml_ns:annotation/rdf_ns:RDF/rdf_ns:Description/bqmodel_ns:is/rdf_ns:Bag/rdf_ns:li/@rdf_ns:resource"; final String xPathexp2 = "/sbml_ns:sbml/sbml_ns:model/sbml_ns:listOfSpecies/sbml_ns:species/sbml_ns:annotation/rdf_ns:RDF/rdf_ns:Description/bqmodel_ns:is/rdf_ns:Bag/rdf_ns:li/@rdf_ns:resource[starts-with(.,"urn:miriam:uniprot:")]";[/CODE] I have set the namespaces as follows: [ICODE]try { NamespaceContext ctx = new NamespaceContext() { @Override public …

0
63
Member Avatar for ashoo

Today is my first venture into Xpath.. I have a table that looks like this Date Level 1 Level 2 05/20/2009 Value1 05/21/2009 05/27/2009 Value2 Whenever date for value1 in level 1 changes date for value 2 in level 2 must change consistently by a week. that is if date …

Member Avatar for fpmurphy
0
88
Member Avatar for ned69

Hi All I'm a newbie at XSLT and I need help to do the following. I am trying to transform the attached XML so it inserts a blank row whenever the current account number(curACCTNO) does not equal the previous account (preACCTNO) number i.e. group similar rows with the same accno …

Member Avatar for ned69
0
159
Member Avatar for bovlb

I'm trying to use XPath/XQuery to identify HTML elements. In particular, I want to be able to match elements where the "class" attribute contains a specific token. As I understand it, "class" is now defined as NMTOKENS, which means it should be treated as list-valued. So does that mean that …

0
55
Member Avatar for billymcguffin

Hi guys, im not sure if this is where to post this, or if you can do anything about it, but whenever i update my rss, it doesn't show the changes in google reader. im not sure if this is a problem with: a) google reader, b) my rss or …

Member Avatar for billymcguffin
0
38
Member Avatar for reisende

Hi everyone, I've been combing the message boards for the last few days trying to find something that will work for me, but to no success. I had 0 experience with XSLT before this which definitely doesn't help out in the search but I am determined to learn. What I've …

Member Avatar for reisende
0
147
Member Avatar for ganesh0106

Hi All, I heartly appreciate I have 3 question: 1. following-sibling function not working in the “si – docid” attribute 2. starts-with function not working in “laid” element 3. choose method want correct (I need single dates element) in my xsl repeated the <dates> This is my XSL: <xsl:template match="div[@class='DocContainer']"> …

0
54
Member Avatar for ganesh0106

Hi All, Many thanks for your response, Actually you were given the coding looking good, what I gave the input, but I want to change the input structure the xslt not working properly. Here I place one more sample input and output (please read command instruction in output file) for …

0
60
Member Avatar for vijju23

Can someone help me understand what exactly is the diffrence between SQL/XML and XPath? Are they same?

Member Avatar for bigtiny
0
146

The End.