Questions tagged [xslt]

XSLT (Extensible Stylesheet Language Transformations) is a declarative, XML-based language used for the transformation of XML documents. In SharePoint, you can use XSLT for formatting the content, generate dynamic content, edit the Web Part content such as List View web parts, Data View Web Parts, Content Query web parts & Search Web Parts.

152 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
3answers
766 views

XSLT Global parameter LCID is empty

According to this MSDN documentation about XSLT global parameters, in main.xsl there is a parameter named LCID whose value should be the value of System.Threading.Thread.CurrentThread....
6
votes
1answer
2k views

How to get current date in xsl in XML Viewer WebPart?

I am using SharePoint 2013. I am using the XML Viewer WebPart. In this webpart I have some xml and a write xsl in the xsl editor. Everything is working fine. I would like to filter te data on the ...
5
votes
2answers
831 views

Can the list view's XslLink property contain a web address?

Some Background... I have created a custom blog web template (which I started by copying and pasting the OOTB blog site definition) and in order to customize the way blog posts are displayed, I have ...
5
votes
2answers
2k views

How to display document approval status in a content query web part?

I have this XSLT to display document title and approval status <xsl:template name="DocumentStatus" match="Row[@Style='DocumentStatus']" mode="itemstyle"> <xsl:variable name="...
4
votes
0answers
844 views

Problem with getting SafeImageHtml in CustomItem.xsl of a CQWP

I have a CQWP with the Parameters: Title:{fa564e0f-0c70-4ab9-b863-0177e6ddd247},Title,Text;| Description:{691b9a4b-512e-4341-b3f1-68914130d5b2},ShortComment,Text;| ImageUrl:{543bc2cf-1f30-488e-...
3
votes
2answers
807 views

Content Query Webpart (CQWP) Pagination in SPO

I am trying to paginate a CQWP results set but I am struggling with XSLT. Is there an easy way to do it? Should I work directly on the ItemStyle.xsl? Should I use jQuery instead? I can't believe ...
3
votes
0answers
139 views

Return current local datetime in XSL feed from RSS

I am currently using xsl to feed weather from rss.weather.com.au. Everything working fine but as soon as i add reference exslt it will not work and show error "Failed to apply XSLT to the content". I ...
3
votes
1answer
956 views

Need help comparing two dates with times

I'm trying to compare two dates with time. I'm able to compare just the date, but when I add the time element it doesn't work. I'm not sure what the correct format should be. <xsl:if test="ddwrt:...
3
votes
0answers
149 views

XSLT Force Time Zone

Using XSLT, is there a way to show the time for a specific time-zone? e.g. Resolved: <xsl:value-of select="ddwrt:FormatDate(@ResolvedDate, 3081, 2, [TimeZone])"/>
3
votes
1answer
734 views

Add Rich text column to the Blog Post comment (SharePoint 2013)

I am trying to customize the Blog post comments in SharePoint 2013 by adding a new custom column using RichText (called RTBody) and hiding the old one called Body in several pages, such as Post.aspx ...
3
votes
0answers
3k views

Why Sharepoint FormField's ID is parametrized and how it can take different values after its initial creation?

In SPD 2010, on designer surface of a web part page I insert DataFormWebPart by: "Current Data Source" ("Data Sources Details" Task Pane) --> choose rows --> "Insert Selected Fields As.." --> "New ...
2
votes
0answers
63 views

Customize Content Query XSLT

We are using a content query webpart on a page to show some related documents. It needs to be updated immediately when the page is updated so the 15 minute search web part delay is not an option for ...
2
votes
0answers
40 views

Sharepoint 2010 Conditional XSL Style based on field values?

I am working on a Sharepoint 2010 site. I have a content query webpart with a custom itemstyle template. The items pulled in via the query have a few custom columns (multiline text, image, singleline ...
2
votes
1answer
138 views

Filter xslt element values for SharePoint form

I have the following XSL declaration in a custom View form for an SPList: <xsl:element name="SharePoint:AttachmentsField"> <xsl:attribute name="runat">server</xsl:attribute> ...
2
votes
2answers
2k views

Getting hyperlink URL and description in custom XSLT with Content Query Web part

I'm having trouble getting the URL and description to show as separate items in SharePoint 2013. I'm trying to display the description as the text of the Link and the URL as the HREF value in the a ...
2
votes
0answers
211 views

CQWP XSLT ddwrt:Today() return PST time zone instead of Local time zone

I am working on CQWP webpart in Office 365(SharePoint Online). I have to get today's date for date comparison. I have use xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" for ...
2
votes
0answers
115 views

Extremely complicated XSLT for a huge list of information

Which, I realize, is not the greatest title in the world, but I'm not sure what else to call this. So, the list data looks a little like this: More or less. Basically, a set of products are ...
2
votes
0answers
349 views

XSLT, regex and RenditionID

I'm sort of new in XSLT, and i need some clues, if you're willing to give me some... What i want: In a CQWP, i want to display items' images, with a certain rendition ID. But, when retrieving the ...
2
votes
0answers
374 views

How to Add External xsl Stylesheet to DispForm.aspx

It isn't too difficult to use xsl to modify the display of items in a list (via a custom fldtypes.xsl file), but can the fldtypes.xsl file also be used to change the display on the `dispform.aspx' ? ...
2
votes
0answers
165 views

get the current lang in xslt

I'm new with XSLT and have a WebPart refiner. In the XSLT, i've the param at the beginning: CurrentLcid <xsl:param name="CurrentLcid"></xsl:param> When i test the value, the value is ...
2
votes
0answers
868 views

CQWP with custom XSL not working, cache issues

I'm replacing the default ItemStyle.xsl with a custom xsl file, my xsl file contains the default xsl:stylesheet and a xsl:template looking something like this <xsl:template name="...
2
votes
0answers
213 views

XSL returning only XML result

I'm attempting to use a Content Query webpart to display a calendar but instead of getting a styled result I get an XML result that looks like this: <dsQueryResponse> <Rows> <...
2
votes
0answers
286 views

Custom field XSLT Rendering Issue in SP 2007, Works on 2010

I have created a VS 2008 WSP builder solution. IN that i have a custom field which has a XSL for list item view rendering using XSLT. This Solution does not render the image or hyperlink in SharePoint ...
2
votes
1answer
1k views

SharePoint 2010 Listview creates “Unable to display…” error after adding inline style

First let me say I have been all over the web looking for a fix and keep finding references to the XsltTransformTimeOut value. I have already had our admins set ours from 1 to actually 10 seconds and ...
2
votes
0answers
79 views

Linking publishing's xsl files?

I'm working on customization of some ContentByQueryWebPart. This customization consists in defining custom contentquerymain.xsl and itemstyle.xsl file. However, from one customization to another, ...
2
votes
0answers
2k views

Filtering SharePoint list items that have multiple values using jQuery

I have a SharePoint list that contains multiple columns of information. There’s a Category column that’s a look up to another list called ‘Category’. This is to produce unique ID’s for each of those ...
2
votes
1answer
137 views

Webpart not updating for Read only users

I have a SharePoint page with Two webparts, one of them is a list displaying the previous months, the other is a xsl webpart that displays the news of the selected month using the url. (like default....
2
votes
1answer
460 views

how to use custom web part properties in CQWP

I have extended the CQWP and have several custom web part properties. One is a text field named "Header" and I would like to use it for a header in my CQWP. I know that I need to edit ItemStyle.xsl (...
2
votes
1answer
154 views

Template XSLT Resources

I'm beginning to customize a SharePoint blog and noticed that a bulk of customization (at least in terms of web parts) can be done through linked XSLT files but I'm struggling on finding resources or ...
1
vote
0answers
22 views

Hyperlink in External List webpart isn't working

So I was able to add <a> <xsl:attribute name="href">....</xsl:attribute>View</a> in my xslt code for modifying my external list. It works when I view the list ...
1
vote
0answers
19 views

Content Query Web Part - Get each task's site

Using a custom content query web part and XSL file in SharePoint 2016, I am bringing in tasks across a site collection. I would like to bring in each task's associated site. Using this article as a ...
1
vote
0answers
32 views

Get email address of a 'person or group' field in dataform webpart using XSLT

I am trying to retrieve the email address of a person or group field. I have tried the expression: value-of select= 'substring-before(substring-after(@person, concat("sip=",$dvt_apos)), $dvt_apos)' ...
1
vote
0answers
60 views

How do I get the list title to use inside xslt?

I'm using a script to create a button, so that the user can create new form: <script type="text/javascript"> function displayLayover(url) { var options = SP.UI.$create_DialogOptions(...
1
vote
0answers
406 views

Set Display:block by default for a slideshow

I'm using a picture library to display ppt slides inside a Slideshow presentation. It looks like this: Now my problem is that the first slide is always set on Display:none and I have to click first ...
1
vote
3answers
14k views

Javascript not working in IE but work works in Chrome

I had a long search and until I found a working script to use the logged in user id. Finally I have found the following Javascript code, put it in XSL to be used in an XMl viewer web part: <script ...
1
vote
0answers
109 views

Filter styled list webpart using XSL stylesheet

So I have .css and .xsl code turning an out of the box SP calendar list into a pretty events list. I have a different image for each month and my code is long but works perfectly. I also have a ...
1
vote
0answers
43 views

how i can hide/remove links named (share on facebook ,Digg this ,etc) from my RSS viewer web part

I have added a RSS viewer web part to my team site, and i added this custom XSL (code copies from here http://sonnyeom.com/wordpress/simplified-rss-xsl-for-sharepoint-rss-viewer/.), to display only ...
1
vote
0answers
13 views

How can I pull a contextual link into a Page Layout

We are creating a new commerce site for our existing SharePoint 2010 site to link to. Right now our main product pages each use layouts that have an unordered list styled into tabs across the top. The ...
1
vote
1answer
192 views

Sum of column based on <xsl:choose> statement in a data view?

I have a column in a SharePoint 2010 dataview that is as follows: <td> <xsl:variable name="CurrentYear" select="ddwrt:FormatDateTime(string(ddwrt:Today()),1033,'yyyy')"/> <xsl:...
1
vote
0answers
556 views

InfoPath 2013 Conversion to PDF or DOCX

I have an InfoPath 2013 Form. Once the form is completed, on Button click, I want to generate either a PDF or a Word Document. I have done extensive research. SP Designer Workflow works for SP2010 ...
1
vote
2answers
48 views

Missing xslt webpart viewer

I am looking to add an Xslt viewer to the homepage of my site but cannot find it in any of the available web part categories Do I need to enable a specific site feature to make it available?
1
vote
0answers
363 views

Custom XSL – formatting the date column in ItemStyle.xsl

I have a Content Query Web Part in which I am displaying the data from a Blog sub-site. The Item Style being used is "Title and description". Title displays the title of the document. For the ...
1
vote
0answers
254 views

String manipulation in ItemStyle.xsl file for Content query web part

i have image tag in ItemStyle.xsl file with my custom style template, here i have set image "src" attribute <img height="220px;"> <xsl:attribute name="src"> ...
1
vote
0answers
33 views

Put filter on list column using XSL

I want to customize the design of the web part using XSL. But when I apply the XSL file in XSL Link(Miscellaneous) during Edit Page the default behavior of filter disappears. How can I do this in XSL ...
1
vote
2answers
4k views

How do I use a custom XSL style sheet with a Content Query Web Part without SharePoint Designer?

I'm trying to present data from a list in a more beautiful fashion using a Content Query Web Part and an XSL style sheet. I found some instructions on this page, which seem pretty simple, but they ...
1
vote
1answer
154 views

Date field won't show with ItemStyle.xsl

I'm pretty new user of SharePoint and i work with SharePoint 2010. I try to show the "StartDate" column of a page in my XSL template but it won't show. I put the column in the webpart configuration ...
1
vote
1answer
161 views

Show more/less in search result with JavaScript and XSLT

I have a metadata with the name "productiondescription", in my advanced search, I want to display this "productiondescription" in the search results. And I had changed srch-Description2 in the code ...
1
vote
0answers
517 views

redirect search results to different page

I have one list and search custom search scope is defined for that list. so that it will search only in that list. so the search results will be nothing but the list items! Now My requirement is, ...
1
vote
2answers
387 views

Hours and Minutes calculation in Dataview webpart

I have a DataView Webpart, to display XML data using XML File connection. I use the below formula to calculate the day difference between 2 dates: "(number(ddwrt:DateTimeTick(ddwrt:GenDisplayName(...
1
vote
0answers
488 views

Search Results XSLT add filename property and render document link

I'm attempting to configure the custom XSL for core results search web-part in 2010. The goal here is: Include File name property as a search target Display Link directly to the file I've ...