xslt

xsl select all text in a node

How can I output all of the text in a node, including the text in its children nodes. But I want to exclude the text in "a" nodes. Thanks! ...

XML to XML using XSLT

I am trying to create a new XML file from an exisiting one using XSL. When writing the new file, I want to mask data appearing in the accountname field. This is how my XML looks like: <?xml version="1.0" encoding="UTF-8"?> <Sumit> <AccountName>Sumit</AccountName> <CCT_datasetT id="Table"> <row> <CCTTitle2>Titl...

Using xpath/xslt to get the anchor part of the page url

Hi I'm writing a template in xslt with xpath 1.0 and need to access the anchor tag from the url of the current page. For example, the url: http://localhost/destinations/london.aspx#accommodation I need to be able to get #accommodation and assign it to a variable. I realise I'm somewhat limited by using xpath 1.0 - has anyone got any e...

SQL server string manipulation in a view... Or in XSLT

I have been passed a piece of work that I can either do in my application or perhaps in SQL: I have to get a date out of a string that may look like this: 1234567-DSP-01/01-VER-01/01 or like this: 1234567-VER-01/01-DSP-01/01 but may look like this: 00 12345 DISCH 01/01-VER-01/01 XXX X XXXXX Yay. if it is a "DSP" then I want that ...

problem with my menu

hi is andrea from rome I created a macro for my menu on the left and it is ok I would use the same macros for the menu to the right without creating another, help me, there can, What should I do? thanks so much <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xsl:Stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]> <xsl:stylesheet versio...

Applying XSLT to XML on ASP.NET

I am following the tutorial here: http://www.aspfree.com/c/a/XML/Applying-XSLT-to-XML-Using-ASP.NET/2/ The tutorial shows how one converts xml to html via xslt. Unfortunately, one of the first steps is to "Drag an XML control from toolbox on to the webform". Which section of tools is this and which control are they talking about? ...

Need an alternative to BizTalk's XSLT generation

Hello, At present we are using BizTalk as an XSLT generator. We map two XSDs together and then have BizTalk generate and XSLT that we use in another app. Shortly we will be getting rid of BizTalk and are on the hunt for a new program that will provide us this functionality. Thanks! ...

How to declare and iterate an array in XSLT?

My requirement is -using XSLT- to show a dropdown list with the US states and print 'selected' on one specific that is declared in the XML which will use my style sheet. I was thinking on declare an array with the states and iterate it but I don't know how to do it. NOTE: More ideas are welcome ;) ...

Using XSLT, how to turn each tag into a div with a class matching the tag name ?

Hi all, Using XSLT, I'd like to be able to transform this : <doc> <tag1>AAA</tag1> Hello ! <tag2>BBB</tag2> </doc> into this : <div class="doc"> <div class="tag1">AAA</div> Hello ! <div class="tag2">BBB</div> </div> ...but without specifying explicitly any tag name in the stylesheet (there are too many in the real worl...

XSL select where element has two attributes

How do I select elements that have two attributes? I can do @name | @area which is "name or area", but how do I do "name and area"? ...

How to use nxslt command line options with NAnt ?

My problem : I want to output several HTML files from a single XML file processed by XSLT. It seems easily possible with XSLT 2.0, but I am using NAnt with nxslt 2.3 for my builds, and thus the .NET Framework 2.0 XSLT 1.0 implementation. So I have to use EXSLT extension exsl:document for the multiple output. But using simply the nxslt ...

PHP generated Doctype problem with XSLT

I am transforming XHTML to XHTML using XSLT and Doctype part is giving me problem <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="LimeSurvey.xslt"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.or...

Banding with xsl

I am beginning to think that the problem isn't with the banding code. Somehow count is not coming out correct. Could it be in either the xml, I have approx. 150 of the case-study nodes? Or can it be in the order in which I am doing the for-each and the if? <!-- XML --> <case-studies> <case-study> <name>Company A</name> <...

XSLT - how to match any non-text node children?

I'm new to XSLT and I can't figure out how to get an xsl:if that matches when there are no child tags. I want this to match: <context> howdy </context> And this not: <context> <child> howdy </child> </context> ...

XSLT html output problem with

Hi, The problem is, that my XSLT-Transformation process ( called by .NET ), doesn't leave the HTML content in the XSLT file alone ( which isn't xml-compliant like an <img> tag without an closing slash-sign ), so i'll get errors like: <pre>System.Xml.Xsl.XslLoadException: XSLT-Compilererror. ---> System.Xml.XmlException: The 'img'-Start...

XML XSL issues

I have a xml doc with around 150 entries. I am sorting the entries in several fashions. One is alphabetical, which is displayed via XSLT and works perfectly, the others are by category and solution, which have issues with alternating banding color by row. The problem arises when I iterate over entries that are not being displayed, it se...

How to execute XSLT 2.0 with ant ?

I'm trying to run an XSLT transformation from an ant file. I'm using a XSLT 2.0 stylesheet with a saxon 9 parser (supporting XSLT 2.0). The problem is that it seems that ant is always calling an XSLT 1.0 parser. Here's my ant file : <xslt style="stylesheet.xslt" basedir="core/" extension=".xml" destdir="core/" classpa...

Effective way to transform a few nodes contents of feeds

Dear all I need to "proxy" a feed and leave most of the nodes unspoiled and transform the content of a few known nodes by calling some java methods and return the transformed feed Of course I prefer to avoid - loading in memory the whole feed - transform other nodes - bad performance It's a kind of java pipe ! Thanks for your re...

XSL Rookie -Can I make an XSL that matches "this phrase" also match "ths fraze" without repeating the entire "if test" block?

I'm a complete XSL novice, writing an XSL file to format lots of different error messages that can appear in the output log created by an application into CSV format. Slight variations might occur in the matchable tags in these output logs. For example, one sentence in the log might contain the phrase "Service Month/Year:" but anothe...

XSLT - XML to XLS

I have an XSLT template that gets applied to an XML file of data. The template generates an Excel Spreadsheet XML file. Everything works wonderful except for one minor issue.... When I open the spreadsheet in Excel, it treats it as an XML import and asks me whether the stylesheet should be applied. I would like to have it so it autom...