xslt

Sharepoint ItemStyle.xsl for CQWP using images from a content type

Hello, I'm building a custom Content Query Web Part to display rollup information from an employee content type. This content type has a Publishing Image site column called EmpPhoto. My CQWP is working great and all the site columns I need are available. I am now creating a custom xsl template to render the information correctly bu...

Change font in XML using XSLT

Hi, I'm new to XSLT. I'm trying to change the font size of a specific text in XML file using XSLT. For eg- I have the CDCatalog.xml file with following data. <?xml version="1.0" encoding="ISO-8859-1" ?> <?xml-stylesheet type="text/xsl" href="cdcat.xsl"?> <catalog> <cd> <title>Empire Burlesque</title> <artist><SmallText>Bob Dyl...

Is there an XSL "contains" directive?

I have the following snippet of XSL: <xsl:for-each select="item"> <xsl:variable name="hhref" select="link" /> <xsl:variable name="pdate" select="pubDate" /> <xsl:if test="hhref not contains '1234'"> <li> <a href="{$hhref}" title="{$pdate}"> <xsl:value-of select="title"/> </a> </li> ...

Which HTML element has the largest number of children of a certain type, for instance tags?

In any language, XSLT, PHP, Ruby, Perl, anything: how can I get the XPath or other path or identifier to the element containing the largest number of <p> tags? ...

IronXSLT download? xmllab.net is offline

Does anyone have the installer for IronXSLT? xmllab.net seems to have gone down and never revived http://www.xmllab.net/Products/IronXSLT/tabid/187/Default.aspx http://74.125.113.132/search?q=cache:jk_L4-aOCi8J:www.xmllab.net/Products/IronXSLT/tabid/187/Default.aspx%3FPageContentID%3D52+ironxslt&amp;hl=en&amp;ct=clnk&amp;cd=13&amp;gl=...

How to sort a subelement of XML with XSLT

I have an input XML file which I need to copy 1:1 to the output, except for one subelement which contains subitems that need to be sorted. <?xml version="1.0"?> <top> <elementA /> <elementB /> <contents> <contentitem> <id>3</id> <moretags1 /> <moretags2 /> </contentitem> <contentitem...

XSL:decimal-format with multiple possible formats

Hi All, I have an interesting problem with XSL. We have an XML Input file that contains next to the content several settings that define how we output the content. Currently I'm struggling with the formatting of the numbers within the XSL file. The following formats are possible: 1,234.5 1.234,5 1234,5 1234.5 I get these formats as...

Default support for xinclude in Java 6?

I see in my application that xinclude inside my parsed XML file does not work within my Java XSLT conversion. However, although I do: DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setXIncludeAware(true); I'm not specifically setting the transformer factory as System.getProperty("javax.xml.transform.Tr...

XSLT mapping algorithm

I have a particular problem I'm not sure how to approach. Here at the office there is this large unwieldy XSLT we have for adapting one type of XML to another. The problem is that it's not very consistently written and very difficult to follow. In the ancient creation of this stylesheet, it seems it was forgotten exactly what it does. ...

Get file name using xsl

How can I get the file name using xsl 1.0? I tried <xsl:value-of select="base-uri()" /> but got "Fatal Error! Could not find function: base-uri" ...

XSLT - Best way to split and render comma separated text as HTML

I have some data in an XML element that looks like this: <item value="category1,category2">Item Name</item> The bit I'm interested in is the value attribute. I'm able to get the data contained in this attribute into a template which looks like this: <xsl:template name="RenderValues"> <xsl:param name="ValueList" /> <xsl:value-of sel...

Is there an XSLT name-of element?

In XSLT there is the <xsl:value-of select="expression"/> to get the value of an element, but is there something to select the tag-name of the element? In a situation like this: <person> <!-- required stuff --> <name>Robert</name> <!-- optional stuff, free form for future extension. Using XMLSchema's xsd:any --> <prof...

How can I convert a string to upper- or lower-case with XSLT?

How do you do case conversion in XSL? <xsl:variable name="upper">UPPER CASE</xsl:variable> <xsl:variable name="lower" select="???"/> ...

Extract a subset of XML file using XSL

I have this XML file: <Response> <errorCode>error Code</errorCode> <errorMessage>msg</errorMessage> <ResponseParameters> <className> <attribute1>a</attribute1> <attribute2>b</attribute2> </className> </ResponseParameters> </Response> And I want the output to be: <className> <attribute1>a</att...

xpath question on selecting node set

Hi, everyone: Here is a simplified version of my source xml document: <eml> <additionalMetadata> <describes>sbclter.380</describes> <access authSystem="knb" order="denyFirst"> <allow> <principal>public</principal> <permission>all</permission> </allow> </access> </additionalMetadata> <additi...

fo:data-cell overflow

Hi, I am using XSLT -> FO to generate the PDF. When the text in a column exceeds the size of the column and there are no spaces in the text - then the text runs over into the next cell or outside the table. I want the text to be occupied within the same cell. Thanx in Advance, Swetha ...

Why can't I get parameters to work with apply-templates in XSL?

Hello. I am finding it impossible to get with-param to work with apply-templates. As an example, I've hacked the examples given in w3schools. xsl <xsl:template match="/"> <xsl:apply-templates> <xsl:with-param name="test" select="'has this parameter been passed?'"/> </xsl:apply-templates> </xsl:template> <xsl:template match="cd...

display an image pulled from sharepoint using xslt

How can I display an image pulled from sharepoint using xslt? the xml produces a tag and its value is: <img alt="" border="0" src="/SiteCollectionImages/Blue%20hills.jpg ....etc but the output is the text above and not the image itself. the xslt is just: Rollup-Image: <xsl:value-of select="Rollup-Image" /> ...

xslt hyperlink, separate the url and descption

I have a list in sharepoint with a hyperlink column. I'm putting this list into xml and applying xslt to it. the xml is producing output in the form of: <link>http://www.foo.com, http://www.foo.com&lt;/link&gt; how can i display this link using xslt? thanks ...

Viable alternative to XSLT?

I have used XSLT for a few different things over the years. I got used to it, but never felt like I really understood it all the way through. It always seems like I have to experiment to get the result I want, and the outcome isn't necessarily a logical conclusion in hindsight. On top of that, the one or two times I had to turn over som...