.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Giving space in XSLT ( )

Posted By:      Posted Date: September 23, 2010    Points: 0   Category :ASP.Net


I am creating HTML script using XSLT, in that one place I need to provide the name like

<Title> <Script> Last Name <Space> First Name

Ex: Mr. Kumar Kelvin

I required to give space between last name and first name. How to script like this in XSLT. I tried using &#xa0; and &#160; but I am getting  is the output.

my script is

                <td align='left' width='100%' valign='top' style ='font-size:12pt; font-family:Times New Roman'>
                    <xsl:value-of select="TITLE" disable-output-escaping="yes" /> <xsl:value-of select="FIRSTNAME" disable-output-escaping="yes" /> <xsl:value-of select="LASTNAME" disable-output-escaping="yes" /> 


Many Thanks,


View Complete Post

More Related Resource Links

InputFormTextBox replaces   with a space

I am using a InputFormText box in rich text mode. Whenever the html contains "&nbsp;", and the item is saved and when i fetch the field text from Code, the "&nbsp;" is replaced by " ". Because of this the saved content differs from the fetched content when displayed in the InputFormText. e.g. i save the following html <p>Table Name</p> <p>&nbsp</p> <p>&nbsp</p> <p>Table Name</p> when i get the field text using splistitem.getformattedvalue("fieldname"); what i get is  <p>Table Name</p> <p> </p> <p> </p> <p>Table Name</p> when the text of the InputFormTextBox is set to this retrieved html, it changes the <p> </p> to <p></p>. so the output is Table Name Table Name instead of  Table Name     Table Name   I have googled it but havn't found a solution.  Pankaj Bajpai. Prosares Solutions ASP.Net | Sharepoint | Consulting SharePoint | ASP.Net | Business Intelligence http://www.prosares.com http://www.linkedin.com/in/pankajbbajpai

Line Break Problem in XSLT


Hi All,

I want to add line break in the xslt but it not working.

Below is the code for adding the line break.

</P> <P>
&lt;xsl:variable name="Collection7"&gt;</P> <P>&nbsp; &lt;xsl:value-of select="$13932"/&gt;&lt;xsl:text&gt;&amp;#xa;&lt;/xsl:text&gt;</P> <P>&nbsp; &lt;xsl:value-of select="$31042"/&gt;&lt;xsl:text&gt;&amp;#xa;&lt;/xsl:text&gt;</P> <P>&lt;/xsl:variable&gt;</P> <P>&lt;td&gt;&lt;xsl:value-of select="$Collection7"/&gt;&lt;/td&gt; </P> <P>&lt;/code]</P> <P>I have tried the below code as well:</P> <P>&lt;xsl:variable name="newline"&gt;
&lt;/xsl:variable&gt;</P> <P>or</P> <P>&lt;xsl:variable name="break"&gt;&amp;lt;br&amp;gt;&lt;/xsl:variable&gt;</P> <P>or </P> <P>addign &lt;br/&gt;</P> <P>then also it not adding the line break.</P> <P>But If I write code like below then it is adding the line break and it works fine.</P> <P>

Image processing, determine white space and crop



I have created a image upload for our ID card system to allow users to upload new images, edit them and submit for approval.  This is all working well with a combination of asp.net (c#) and jquery to give a seemless editor etc.

We have had a few users who I cannot believe have scanned a photo of themself and then just submitted it with the A4 page of white and little photo.

I am wondering if anyone can help with a suggestion on how I could possibly reduce the load of these coming through (I can't believe they can be this stupid), it stipulates UK passport standards.

Would my only option be to check for a single continues colour that occurs and if it reaches a certain percentage point say 60% then to just send back an error stating they need to crop the image.

Can anyone help with providing sample or that I can use to move this one on.

I am still in disbelief on this one.  the other one is they take a photo of whole body and other in it and cut straight down middle chopping the people out but supplying a photo that no use for an id photo card....but that I can't imagine being solved programatically as I need to determine where their face dimensions are and what percentage of the actual photo is taken up by it and if it below a threshold reject it.

Bitmap FromFile space "file not found"


I am using aspose.slides to create PPTx's. Some of the process involves loading jpg's from another server and including them in the presentation. This works fine in my development environment. When I upload the site to its server, the jpg loading fails.

I am trying to access jpg's on the other server by:

   oFS = New FileStream(sFile, FileMode.Open, FileAccess.Read)

This causes an access violation error when run from the server.

I also boiled the code down to reading the file directly:

   oImg = System.Drawing.Bitmap.FromFile(sFilePath)

This causes a file not found error.

We have narrowed the problem down to the fact that the File Path has a space in it. How does one solve this problem (while still keeping the space, there is a lot of legacy data)? I have tried replacing the space with %20 or +. I have tried using Server.UrlEncode. The error message always comes back with the encoding in place (like no decoding

Json Deserialization is giving error in IronPython



Have anyone tried json deserialization. When I tried:

>>> import json

>>> json.loads('["foo", {"bar":["baz", '"Test", 1.0, 2]}]')

I got following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\json\__init__.py", line
 307, in loads
  File "C:\Program Files\IronPython 2.6 for .NET 4.0\Lib\json\scanner.py", line
42, in iterscan

Office Space: Custom Field Types for SharePoint 2007


Custom field types provide a powerful way to define a reusable SharePoint column definitions.

Ted Pattison

MSDN Magazine May 2009

Office Space: Custom Auditing In SharePoint


Learn how to enable an auditing solution for Windows SharePoint Services (WSS) 3.0 with customized control pages in Microsoft Office SharePoint Server (MOSS) 2007.

Ted Pattison

MSDN Magazine September 2008

Office Space: Automated SharePoint Site Branding


Here's a custom branding solution for SharePoint sites that integrates Master Pages and CSS files at the level of the site collection.

Ted Pattison

MSDN Magazine July 2008

Office Space: From VBA Macro to Word Add-in


See how to use Word to capture a VBA macro and use Visual Studio Tools for Office to wrap it up into a deployable Word add-in.

Robert Bogue

MSDN Magazine May 2008

Office Space: Simplify SharePoint Development with STSDEV


Ted Pattison shows how to use a new STSDEV utility to set up and deploy SharePoint development projects in Visual Studio in an easy and repeatable manner.

Ted Pattison

MSDN Magazine March 2008

Office Space: Security Programming in SharePoint 2007


This month Ted Pattison presents an overview of programming security and permissions for Windows SharePoint Services 3.0.

Ted Pattison

MSDN Magazine February 2008

Office Space: Events in SharePoint 2007


Windows SharePoint Services (WSS) 3.0 provides a new and improved infrastructure for handling server-side events. In this installment of Office Space, we look at techniques for hooking up Before Events and After Events using both Features and code.

Ted Pattison

MSDN Magazine November 2007

Office Space: Solution Deployment with SharePoint 2007


WSS 3.0 introduces a new deployment mechanism that lets you move your development efforts into a staging or production environment.

Ted Pattison

MSDN Magazine August 2007

Office Space: Building Office Open XML Files


This new column explores how you can extend and customize Microsoft Office System applications and file formats.

Ted Pattison

MSDN Magazine February 2007

Netting C++: The Design Space of the Common Type System


Stanley Lippman moves Text Query Language to the Microsoft .NET Framework using the C++/CLI language extensions in Visual C++ 2005.

Stanley B. Lippman

MSDN Magazine December 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend