xslt

HTML Formatting Partial Content Within XML Node

I have an XML document that has an XML node named "Description" The Description node contains text like "This is a long description." When the XML file is loaded and displays in a browser, I need just the word "long" to be italicized. I understand that I could use XSLT to style the entire Description node, but how do I use CSS styling ...

How can I render HTML from XML within an iframe?

I am making a REST call that returns XML from within a Widget in Zendesk using an <iframe/>. I would like to use XSLT to transform the XML into HTML that is rendered within the <iframe/> Is there any way I can write my XSLT inline, and have the <iframe/> somehow execute the xslt transformation, yielding the HTML to show in the <iframe/...

xsl:sort an XML file using multiple elements

Hi All, I'm trying to sort a bunch of records in an XML file. The trick is that I need to sort using different elements for different nodes. To give a simplest example, I want to do this: given an xml file <?xml version="1.0" encoding="utf-8" ?> <buddies> <person> <nick>Jim</nick> <last>Zulkin</last> </person> <person> <first>Joe...

xsl transformation of arbitrary list structure

I'm trying to transform the content of a chm (microsoftcompiled html help) file's index which holds structure information in very arbitrary HTML lists with xsl (see the first code snippet-the actual index file's structure is a bit different, but the important parts are there). I've checked out the index of several chm files but the ul / ...

Adding of two variables in xslt within choose statement

<xsl:choose> <xsl:when test="$cty='LOHNSTD'"> <xsl:variable name="sum" select="$sum + $amt"/> </xsl:when> <xsl:when test="$cty='REGPAY'"> <xsl:variable name="sum1"> <xsl:value-of select="$sum1 + $amt"/> </xsl:variable> </xsl:when> ...

Processing XML with XSL

I've got a 2-part question... I have some XML that looks like: <trans-unit id="70" restype="x-text:p"> <source xml:lang="en-en">option 4</source> <target xml:lang="fr-fr">option 4</target> </trans-unit> <trans-unit id="71" restype="x-text:p"> <source xml:lang="en-en">option 5</source> <target xml:lang="fr-fr">option 5</target> </trans...

How to generate the random selection html using xslt

Hi Guys, I am using XSLT and XML to generated my HTML. I have below XML. 1) destinationTabs.xml <?xml version="1.0"?> <list type="Tabs"> <tab id="594978-64" title="Overview" url="/destinations_offers/destinations/asiapacific/india/newdelhi/index.aspx" /> <tab id="597468-64" title="Guide" url="/destinations_offers/destinations/asiapac...

How to diagnose XSLT problems with Firefox?

Is there a way to see error messages / debug information on what happens when Firefox 3 applies an XSLT transformation? In Firefox I am getting only the content of the text nodes of the XML document. The stylesheet is in the same directory and is bound with <?xml-stylesheet ...>. In Internet Exporer it works fine and Altova XML Spy does ...

How do I append an image below the first paragraph using XSLT?

I need to append the image element of my XML below the first paragraph of the body element as an HTML img tag using XSLT. Can anybody show me how to do this? <pages> <entry id="18"> <title handle="design">Design</title> <image size="240 KB" path="/uploads" type="image/jpeg"> <filename>design.jpg</filename...

Transforming Entity Framework EDMX File with XSLT

I would like to make some changes to my EF4 edmx file without modifying the file itself, mainly so I don't loose all my changes if I regenerate the model from the database. I'm familiar with XSL and have seen references made to using it in conjunction with the edmx file. This sounds like a great solution, however I can't seem to find any...

A question about <xsl:sort> using XSL 2.0 and datatype extensions

Does anyone know of an example of defining a datatype using xml schema and using it in a XSL template with a xsl:sort instruction Thanks in advance. ...

Xslt produce some <name> tags with CDATA and some <name> tags without?

Summary: I'm using xslt to convert data, and need to produce some tags with CDATA inside and some tags without. Is escaping the CDATA sections my only option? I'm attempting to convert data I already have in xml to Moodle Xml for importing. The final product needs to include some Html, which the Moodle Xml doc specifically says needs ...

how to address this variable in xml using axes...

I need to get the following values out of the xml below. I've snipped it for brevity, it goes on quite some way. I need to extract: operator name ppm rolling ppm ia my xslt stylesheet, but i dont know how to correctly address the elements. <?xml version="1.0" encoding="UTF-8"?> <nr:RTPPMDataMsgV1 owner="Network Rail" timestamp="2010...

xslt transformation

hi! i have an xml like this: <Ownership_Shareholders_S> <Ownership_Shareholders> <CUSTOMER_31>A</CUSTOMER_31> <PERCENT_NAME_OF_OWNERS_32>40%</PERCENT_NAME_OF_OWNERS_32> </Ownership_Shareholders> <Ownership_Shareholders COLL_ID="1"> <CUSTOMER_31>A</CUSTOMER_31> <PER...

access the value of attribute (as a variable)

I'm trying to transform my xml file: <root> <group id="F_123" > <term id="F_123_d" > <word>blabla</word> <instruction>blabla</instruction> </term> <term id="F_123"> <word>blabla</word> <instruction>blabla</instruction> <numbers> <numb...

Xsl find all the node that have then name like the value of an other node

How I can find with Xsl all the node that have then name like the value of an other node Like these: <root> <data1> <subdata1> ... <selectThese></selectThese> ... </subdata1> </data1> <nodesetFind> <node1>selectThese</node1> </nodesetFind> </root> the result: <selectThese>...

Is there XSLT available for transforming WordprocessingML into RTF

I currently generate docx files programmaticaly in C#. I would like to transform my doc file into RTF. This be done with an XSLT transform. Is there a transform that is publicly available? I am also interested in trasnforming docx into PDF and HTML. ...

Get items with Status Date greater than or equal to today's date minus 30 days with xslt?

Hi, I have two dates in the following format: 1) <xsl:value-of select="ddwrt:FormatDateTime(string(@Status_x0020_Date) ,1033 ,'yyyy-MM-dd ')" /> 2)<xsl:value-of select="ddwrt:FormatDateTime(string(../../../Strategic_Items_Daily_Status/Rows/Row/@Status_x0020_for_x0020_Last_x002) ,1033 ,'yyyy-MM-dd ')" /> I am using SharePoint Designer ...

Trouble matching XML elements that has namespace attribute

Hi all: How would the conditional statement look like if I'm to insert a section of text into the xml below using xslt? <items xmlns="http://mynamespace.com/definition"&gt; <item> <number id="1"/> </item> <item> <number id="2"/> </item> <!-- insert the below text --> <reference> <refNo id...

copy-of without namespace in xlst1.0

I want to do an XSLT 1.0 transformation of an xml where i use the node. Now when I apply this it sets an xmlns namespace on the copied items, is it possible to avoid this? This is the input xml: <ns0:Task xmlns:ns0="http://Sharepoint.Task"&gt; <UserName>FalcoLannoo</UserName> <Title>Task1</Title> <Description>Description_0<...