xslt

XML to table, how to get position() of context node to the specified ancestor(s)

I have such xml: <A1> <B1> <C1> <C2> <C3> </B1> <B2> <C4> <C5> <C6> </B2> </A1> <A2> <B3> <C7> <C8> <C9> </B3> <B4> <C10> <C11> <C12> </B4> </A2> I need to transform it to table with nested rows: <table border="yes"> <tr> <td>A1</td> <td>B1</td> <td>C1</td> </tr> <...

How to import attributes and elements from XML to Filemaker?

I have an application that stores its user database to an XML file and I need to export selected fields to Filemaker so my client and mine the data on Filemaker. I managed to make XSLT file to import XML elements, but cannot seem to find a way to import any elements. Pointers in solving this problem are greatly anticipated. Example of t...

TransforMiiX (XML/XSLT)

If you have a look at www.PollDaddy.com you will see that for every question you add a resulting xml and xslt file are requested and when recieved they are transformed. Then when you save your page you will see that the adjusted xml file (your filled in question data) is send back to the server to be saved to the database. I would lik...

Concept and programming for Accessing xml file that uses xsl file in a jsp Code.

Hi, I am a beginner in accessing backend xml files(which acts like a database) in a jsp code. can any one please provide me the links and references that provides good understanding for beginners like me. pls help. ...

append guid to hyperlink using xslt

I have some xml being returned in sharepoint, Im using xslt to create the hyperlink like so. <a href="{substring-before(Sign-up-Link,',')}"> Sign up for event </a> I also have an element <guid>1234</guid> being returned in the xml, an I'd like it so that the link will be with the guid appended as a querystring e.g. http://www.fo...

Using SVG to create separate images files

I've previously processed XSLT to output single HTML files that were supposed to be viewed in a browser. Now I was hoping if someone could outline would it be possible to use XML data and XSLT to create separate image files auto magically? ...

Update attribute in XSL for-each

At work I've been given the fun task of generating PDFs with XSL. The XML structure I'm working with is similar to <records> <topLevel> <topLevelID></topLevelID> <secondLevel> <secondLevelID></secondLevelID> <thirdLevel> </thirdLevel> <thirdLevel> </thirdLev...

What to use for trasfoming xml using xslt, js and css

I want to transform an xml file, display its treeview on a html. I have downloaded a example, it has xslt, js, css and also some images. I used xmlspy to do the transformation, but it didn't work. Could anyone please tell me how to do the transformation? ...

Which XML-related technologies I have to learn? (C# centric)

At my work as developer I do a lot of XML writing and parsing using C#. I have read very little about XAML, XSLT and XML schemas at Wikipedia and I don't see if they would make my XML-driven coding easier. Should I study any of these technologies? Which of them? Any other? ...

How to get the modulus of a number in XPath/XSLT?

I need to calculate the modulus of a number in XPath, but this won't work: <xsl:if test="(count()%8)"> How would I do it? Looked at the XPath function reference here, but didn't see anything like that. THANKS FOR THE PROMPT ANSWERS! ...

Launching OpenOffice filters from a menu/toolbar button

I have packaged an XSLT export filter for OpenOffice as per the instructions on this page: http://wiki.services.openoffice.org/wiki/Filter_extensions It works fine; but in order to be used, the user has to select the command 'File/Save as' then choose the correct file extension that triggers the use of the filter, and a target file n...

displaying the '£' and '€' symbol using XSL

I'm reading a data source, and then applying an xsl transform to the text that comes out and all the £ and € symbols are being stripped. Am I missing something obvious? I've tried changing the encoding to iso-8859-1 to no avail. <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/T...

How do you test for zero records when using <xsl:for-each>?

My code generates the following XML: <person_app> <person_data> <person> ...person details here... </person> </person_data> </person_app> Using XSLT, I parse the person records as follows: <xsl:template match="/person_app/person_data"> <xsl:for-each select="person"> ...generate person HTML... </xsl:for-...

Ant: How do I fix a WrappedRuntimeException when using <xslt> task?

I tried to use the xslt task in Ant to modify a Hibernate mapping file (*.hbm.xml) using XSLT. However I kept on getting an com.sun.org.apache.xml.internal.utils.WrappedRuntimeException. If I take out the !DOCTYPE declaration in the source xml file, the following target runs without any error. Could someone please tell me what I'm doing...

XslTransform vs XslCompiledTransform

XslTransform appears to have been deprecated by Microsoft in favor of XslCompiledTransform. Theoretically, if I was doing just one transform during the execution of my application, shouldn't interpreting the XSLT (through XslTransform) be faster than compiling it? If so, is XslTransform written so badly that the improvements made to X...

print a page using xslt

How can print a page using xslt. i need a link, or a button which when clicked invokes the print page printer dialog box. ...

Navigating to nodes using xpath in flat structure

I have an xml file in a flat structure. We do not control the format of this xml file, just have to deal with it. I've renamed the fields because they are highly domain specific and don't really make any difference to the problem. <attribute name="Title">Book A</attribute> <attribute name="Code">1</attribute> <attribute name="Author"> ...

XSLT - Matching nodes that have that a certain node inside them (like jQuery ":has")

Let's say I have the following XML file <a id="123"> <b type="foo" value="1" /> <b type="baz" value="1" /> </a> <a id="789"> <b type="bar" value="12" /> </a> <a id="999"> <b type="foo", value="2" /> </a> I want to get a list of all the 'a' nodes that have a 'b' subnode with a type="foo" and value="1". You can do something s...

XSLT: How to change an attribute value during <xsl:copy>?

I have an XML document, I want one of the attributes to change it's value. First I copied everything from input to output using: <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> And now I want to change the attribute "type" in any element named "property". But I...

fastest in-memory cache for XslCompiledTransform

I have a set of xslt stylesheet files. I need to produce the fastest performance of XslConpiledTransform, so i want to make in-memory representation of these stylesheets. I can load them to in-memory collection as IXpathNavigable on application start, and then load each IXPAthNavigable into singleton XslCompiledTransform on each request...