Transforming Spaces into HTML file via XSL file

Hi,

I'm not certain this is the best place to post this, but here it goes.

I'm trying to get spaces to work correctly when using the WebBrowser 
control. Basically, I've got a valid XML document and valid XSL file that I 
transform into an HTML file using .NET's XmlTransform object. This is all 
fine except for 1 thing. The XSL has a string of " " codes inside that 
looks something like:

<u><span>&#160;&#160;"&#160;"&#160;"&#160;</span></u>

The XSL file was apparently generated using Stylus Studio.

When the transform into the HTML file is performed, this string of 
"&#160;"'s (as I understand it, this is supposed represent an &nbsp;) is 
lost and it becomes empty spaces. When the WebBrowser control renders it, it 
looks like an underlined capitalized "A" char w/ an accent over it. If I 
manually put the &#160; string back into the HTML, it appears and prints 
perfectly.

What do I need to do to get it to render (or transform) these char's as 
underlines (& also therefore to print correctly). This needs to be done this 
way because when printed the underlined part is supposed to be a place where 
the user can physically enter information on the printed page such as a 
name, date or their title.

TIA,

-- 
John Bowman
Verona, WI
jmb61982@charter.net 


0
jmbowman (1)
1/10/2005 11:48:23 PM
dotnet.xml 7266 articles. 0 followers. Follow

4 Replies
868 Views

Similar Articles

[PageSpeed] 13

Go to Barnes & Noble at West Town and determine if they have Microsoft Press
"Programming Microsoft .NET" on the shelves or order it for review as there
is a good chapter on XML/XSLT that covers enough of these issues to enable
you to learn the big picture in a single sitting, take 'keyword' notes and
then do search to get documentation and articles from the web. There are
some 3-5 different issues you need to learn about with white space -- at
least -- and best to get that big picture out of a book.

For now try this manual replacement
<u><span><[CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]</span></u>


-- 
<%= Clinton Gallagher
         METROmilwaukee "Regional Information Services"
         NET csgallagher AT metromilwaukee.com
         URL http://clintongallagher.metromilwaukee.com/



"John Bowman" <jmbowman@charter.net> wrote in message
news:eFxcg729EHA.3700@tk2msftngp13.phx.gbl...
> Hi,
>
> I'm not certain this is the best place to post this, but here it goes.
>
> I'm trying to get spaces to work correctly when using the WebBrowser
> control. Basically, I've got a valid XML document and valid XSL file that
I
> transform into an HTML file using .NET's XmlTransform object. This is all
> fine except for 1 thing. The XSL has a string of "&#160;" codes inside
that
> looks something like:
>
> <u><span>&#160;&#160;"&#160;"&#160;"&#160;</span></u>
>
> The XSL file was apparently generated using Stylus Studio.
>
> When the transform into the HTML file is performed, this string of
> "&#160;"'s (as I understand it, this is supposed represent an &nbsp;) is
> lost and it becomes empty spaces. When the WebBrowser control renders it,
it
> looks like an underlined capitalized "A" char w/ an accent over it. If I
> manually put the &#160; string back into the HTML, it appears and prints
> perfectly.
>
> What do I need to do to get it to render (or transform) these char's as
> underlines (& also therefore to print correctly). This needs to be done
this
> way because when printed the underlined part is supposed to be a place
where
> the user can physically enter information on the printed page such as a
> name, date or their title.
>
> TIA,
>
> -- 
> John Bowman
> Verona, WI
> jmb61982@charter.net
>
>


0
1/11/2005 12:58:12 AM
Clinton,

Thanks for the info. It's nice to hear from a local <g>...

John


"clintonG" <csgallagher@REMOVETHISTEXTmetromilwaukee.com> wrote in message 
news:eyP1ji39EHA.1264@TK2MSFTNGP12.phx.gbl...
> Go to Barnes & Noble at West Town and determine if they have Microsoft 
> Press
> "Programming Microsoft .NET" on the shelves or order it for review as 
> there
> is a good chapter on XML/XSLT that covers enough of these issues to enable
> you to learn the big picture in a single sitting, take 'keyword' notes and
> then do search to get documentation and articles from the web. There are
> some 3-5 different issues you need to learn about with white space -- at
> least -- and best to get that big picture out of a book.
>
> For now try this manual replacement
> <u><span><[CDATA[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]]</span></u>
>
>
> -- 
> <%= Clinton Gallagher
>         METROmilwaukee "Regional Information Services"
>         NET csgallagher AT metromilwaukee.com
>         URL http://clintongallagher.metromilwaukee.com/
>
>
>
> "John Bowman" <jmbowman@charter.net> wrote in message
> news:eFxcg729EHA.3700@tk2msftngp13.phx.gbl...
>> Hi,
>>
>> I'm not certain this is the best place to post this, but here it goes.
>>
>> I'm trying to get spaces to work correctly when using the WebBrowser
>> control. Basically, I've got a valid XML document and valid XSL file that
> I
>> transform into an HTML file using .NET's XmlTransform object. This is all
>> fine except for 1 thing. The XSL has a string of "&#160;" codes inside
> that
>> looks something like:
>>
>> <u><span>&#160;&#160;"&#160;"&#160;"&#160;</span></u>
>>
>> The XSL file was apparently generated using Stylus Studio.
>>
>> When the transform into the HTML file is performed, this string of
>> "&#160;"'s (as I understand it, this is supposed represent an &nbsp;) is
>> lost and it becomes empty spaces. When the WebBrowser control renders it,
> it
>> looks like an underlined capitalized "A" char w/ an accent over it. If I
>> manually put the &#160; string back into the HTML, it appears and prints
>> perfectly.
>>
>> What do I need to do to get it to render (or transform) these char's as
>> underlines (& also therefore to print correctly). This needs to be done
> this
>> way because when printed the underlined part is supposed to be a place
> where
>> the user can physically enter information on the printed page such as a
>> name, date or their title.
>>
>> TIA,
>>
>> -- 
>> John Bowman
>> Verona, WI
>> jmb61982@charter.net
>>
>>
>
> 


0
1/11/2005 1:07:46 AM
John Bowman wrote:
> <u><span>&#160;&#160;"&#160;"&#160;"&#160;</span></u>
> 
> The XSL file was apparently generated using Stylus Studio.
> 
> When the transform into the HTML file is performed, this string of 
> "&#160;"'s (as I understand it, this is supposed represent an &nbsp;) is 
> lost and it becomes empty spaces.

&#160; *is* a space character. Nonbreakable space actually. So after 
transformation it becomes a single nonbreakable space character with 
Unicode codepoint 160.

  When the WebBrowser control renders it, it
> looks like an underlined capitalized "A" char w/ an accent over it. If I 
> manually put the &#160; string back into the HTML, it appears and prints 
> perfectly.

Looks like you've got encoding issue. Seems like the output is UTF-16, 
while you are treating it as UTF-8 or ASCII. How do you run XSLT 
transformation?

-- 
Oleg Tkachenko [XML MVP, MCP]
http://blog.tkachenko.com
0
Oleg
1/11/2005 9:23:38 AM
Oleg,

Thanks for the repsonse I'm using the .NET XmlTransform object to perform 
the transformation to generate the HTML file. I can't remember the UTF-8 or 
16, ASCII it's trying to use. I'll have to look it up when I get back to the 
office tomorrow.

John

"Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message 
news:OAh93%2379EHA.2196@TK2MSFTNGP11.phx.gbl...
> John Bowman wrote:
>> <u><span>&#160;&#160;"&#160;"&#160;"&#160;</span></u>
>>
>> The XSL file was apparently generated using Stylus Studio.
>>
>> When the transform into the HTML file is performed, this string of 
>> "&#160;"'s (as I understand it, this is supposed represent an &nbsp;) is 
>> lost and it becomes empty spaces.
>
> &#160; *is* a space character. Nonbreakable space actually. So after 
> transformation it becomes a single nonbreakable space character with 
> Unicode codepoint 160.
>
>  When the WebBrowser control renders it, it
>> looks like an underlined capitalized "A" char w/ an accent over it. If I 
>> manually put the &#160; string back into the HTML, it appears and prints 
>> perfectly.
>
> Looks like you've got encoding issue. Seems like the output is UTF-16, 
> while you are treating it as UTF-8 or ASCII. How do you run XSLT 
> transformation?
>
> -- 
> Oleg Tkachenko [XML MVP, MCP]
> http://blog.tkachenko.com 


0
1/12/2005 12:13:15 AM
Reply:

Similar Artilces:

Storing HTML in an XML file and rendering it in the browser...
So I am quite upset that after working for a few hours on getting an XML file format and XSL file that formats the XML data appropriatly, only to find that if you store HTML code in your XML file (even in a CDATA block), after the XML file is rendered, the HTML that was stored in the XML file is not rendered, essentially put into the page as if it had <pre> tags around it. I know that someone is going to yell at me and say that the XML file should only contain the content of the page, and that the formatting should be done by the XSL, but I have a particluar use case for this. Essential...

Elimiating extra White space around chart ?
I am a novice with Excel so I hope my terminology is correct for what I am asking. I have a chart that I am working with and I have formatted it to how I want it to look. My question is I have this white space on the X axis on both sides that I am trying to elimate so I can scale my chart without all this extra space on the vertical side on both edges of my chart. Can anyone out there assist with how I can do this? THANKS SO MUCH IN ADVANCE! Hi, slowly hover your mouse over various parts of the chart until you see the tip that says Plot Area. Click. Then use the sizing handles....

PDF file creation
Can anyone recommend a third party product that would allow Great Plains Users to print documents in pdf format? Users find pdf files easiest to attach to e-mails, store on network, etc. In a perfect world, user would create PO - choose PDF format and use GP 'send' button to e-mail. Any suggestions would be appreciated. Thanks in advance. Only Adobe Acrobat is supported for use with the Send button within GP. Otherwise, there are a bunch of cheap PDF creator tools (CutePDF, PDF995, and others) that will create printers in Windows. The user has to remember to select that pri...

How to import .pst files into outlook 07
I need help to import my 2003 outlook data files into 2007 outlook. thanks From: "drbunk" <drbunk@discussions.microsoft.com> | I need help to import my 2003 outlook data files into 2007 outlook. thanks file --> open --> outlook data file -- Dave http://www.claymania.com/removal-trojan-adware.html Multi-AV - http://www.pctipp.ch/downloads/dl/35905.asp You don't import PST files unless you want to lose some of the data they contain. You open them. Here are the instructions: File > Open > Outlook Data File... -- Russ Valentine "d...

How do I use the thumbnail view to re-order pages in a doc file?
PDF file pages in most readers can be re-ordered using the thumbnail layout by simple dragging up or down. I cannot figure out how this might be done in MSWord's thumbnail view equivalent with doc files, nor does there seem to be any information available in Help. Can this be done at all - and if so, how? Word doesn't really have "pages." One thing you could do is start each page with a heading set to "page break before," then go to Outline View, collapse the headings to that level, and drag the visible headings up or down. On Jun 5, 5:47=A0pm, sgodl...

File is locked for editing message
I have excell 2007 and when I try to open a non shared file I created in my network share I get a message that the file is locked for editing. I have ownership of that share and I see no reason why this would come up. Is this an excel issue that can be fixed? Thanks Carl -- When you open a workbook in Excel a temporary copy is created. When you close the workbook the temporary file should be deleted. At times your OS does not do its job and the temp file is left open. This will give you the "locked for editing" message. It is usually necessary to re-boot to clear it o...

Outlook 2003
I have a third party html broadcast editor. I am able to send an html email out to hotmail, yahoo, etc. and the html is shown correctly and display in the body of the email. However, when I send it to myself at work (Outlook 2003), it doesn't show up in the body of the email, it shows up as an attachment (untitled attachment), which i then have to double-click to open and then in that email body, the html is displayed properly... yahoo and hotmail display everything fine but not our internal network... running exch 5.5 btw. any ideas or suggestions? ...

File .mkv with WMP 12 in Windows 7
Hi, I can't open files in HD mkv (720p) with Windows Media Player 12 in Windows 7. I installed the latest codec pack (K-Lite Full 5.5.3) it worked in Vista just a week ago and now the same files can't be opened in Windows 7. Strange thing is that it perfectly open .TS file in 1080p.. i can't understand.. Can Someone Help me? Thanks On Wed, 23 Dec 2009 21:21:02 -0800, Francesco <Francesco@discussions.microsoft.com> wrote: > I can't open files in HD mkv (720p) with Windows Media Player 12 in = Windows 7. > I installed the latest codec pack (K-Lite Ful...

Splitting a workbook's sheets into seperate files
I have a workbook with several spreadsheets in it, how do I quickl seperate these sheets into seperate files -- Turnipbo ----------------------------------------------------------------------- Turnipboy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2452 View this thread: http://www.excelforum.com/showthread.php?threadid=47779 I think the only way, is programing it with vba. I suggest using "For Each" statement to scroll through all sheets in a given workbook, and within the "For" creating a new workbook (using "Add" statement),...

How to alter data on HTML webpage into Excell cells as numbers?
A saved HTML webpage is opened with Excel 2003. The HTML webpage has columns of numerical data which go into Excel cells. If we operate on the Excell cells, the contents of the cells do not behave like numbers. This is so also after formatting the cells as numbers. However on the same spreadsheet the other blank cells are properly reformatted as numbers. Simple... When a cell is formated as text and has numaric data in it, changing the format to number or currency will not work. Even thought the format in the Format cell pop up box appears to be in number or currency format. There are ma...

USB mass storage device asynchronous file change notification
Hello, A challenge: I have a (RAM) disk, which is exposed as a USB mass storage device. Therefore, the desktop computer accesses my disk as a SCSI block device. Also, I mounted the same disk using the FATFS and I can see files under WinCE, which have been just copied over USB from the desktop. So far, so good. Now: if I create a file under WinCE, the desktop computer does not notice and I can wait forever. When I unplug and plug-in the USB again, I can see the file created before under WinCE. Is there a sort of SCSI asynchronous file change notification? If so, is there any exam...

IE 7 Won't Export a .csv File...
I access a website that gives me the option to export a report to a csv file. Clicking on the link brings up a dialog box asking me to confirm my choice of using excel - I click OK and, the box goes away and the request just dies - excel does not launch. I have disabled pop up blocking so that should not be an issue. This always worked in FireFox 2 and never in in IE7. It does not work in Firefox 3. Any ideas? Thanks, Lou ...

publisher file print problem
I have WindowsXP Pro on a hp laptop. I print to a hp psc1315 all in one printer. When I try to print from Office 2003, mostly publisher, I cannot print, and it hangs my computer. I have tried going to HP and installing the latest driver, and it still happens I have upgraded my Ram memory to 1 GB and it still happens. The files are large, is there something I'm missing? I've been through HP assisted support, and Microsoft assisted support, and still have the problem? HP does have a support document that explains how to free up resources. HP All-in-One Product Family - How to Increa...

linking picture files to excel
I want to link from excel back to a collection of jpeg pictures. If I create a link to a file and then click on the picture, the picture opens in a picture viewer, which acieves what I want. However if I want to save the file (& picture collection) to CD to forward to another user or view on alternative computer I lose the link and picture cannot be found. How can I save the link? Just a guess. What if you put both fileds into my breifcase & then transfer Cheers peterm "machutch" wrote: > I want to link from excel back to a collection of jpeg pictures. If I creat...

Excel updating from XML file
I'm having a littl edifficulty getting Excel to dynamically update from an XML file. The XML file is generated from a program and I would like the Excel file to dynamically update. Problem is that the location of the XML and Excel file can change, that is they can be anywhere on a hard drive but both are in the same directory. The mapping of the XML file in Excel appears to be a complete file path C:/data/report/.... but the location could change. They could be in C:/data/report/run1 or run2, I don't want to have to re-map each time a report is generated. Ideally I would like t...

save file
Hi, I've got a problem in my code I've written below. The loop works for the first, third and fourth graphic: that is, it saves them. But it doesn't save the second graph. I've put a "pause" at the start and at the end of the loop, but I haven't solved the problem.. Any suggestion very appreciated! '----------------------------------------------------- Private Sub CommandButton1_Click() Dim i As Integer Dim a As Range Dim b As Integer Set a = Range("C10:C13") Dim PauseTime, Start, Finish, TotalTime b = a.Rows.Count For i = 1 To b PauseTi...

How to create a help file
Could someone please tell me the best way to create a help file that can be used in a VBA procedure within a msgbox or inputBox? I don't know how to begin this process at all so full instructions would be great. Thank you, Rob If you're not interested in becoming an HTML/CHM author, you may want to look at John Walkenbach's technique. http://j-walk.com/ss/excel/tips/tip51.htm (Remember that the only person who actually reads the help is the author <vbg>.) rob nobel wrote: > > Could someone please tell me the best way to create a help file that can be > used in...

File paths (UNC, mapped drives, etc.) in a client-server environment, how to?
Hi, I have an app that needs to run in a client-server environment. That is, the app (MFC native) is installed on multiple workstations and accesses a database on a 'server'. The app stores media file paths (video, audio, images, etc.) in the database. These files need to be played on any workstation running the app as well as on the server. In addition, I also have a Web app (asp.net 3.5) that needs to access the media files and display them in a Web page. The app was initially designed to work on a single computer. I need to make some changes so it could functi...

Windows Help Files
Is there a program I can use to create Windows (XP) type help files, so that the entire document consists of a single file. Hagar wrote: > Is there a program I can use to create Windows (XP) type > help files, so that the entire document consists of a single file. Looked into what it is you are trying to create (seemingly)? http://msdn.microsoft.com/en-us/library/ms670169(VS.85).aspx -- Shenan Stanley MS-MVP -- How To Ask Questions The Smart Way http://www.catb.org/~esr/faqs/smart-questions.html Hagar wrote: > Is there a program I can use to create ...

log memory usage of an exe into a file
Hello NG, do you know a programme that can log the memory usage by an executable into a file? Background: We have a programme that reloads an Access database every 5 minutes. The memory usage increases. It seems as if the old data is not correctly freed. Restarting the programme makes the memory usage normal. But after two or three days the memory of Windows XP is full. Now I want to log the memory usage automatically to inform the manufacturer. Thanks for hints, Guido "Guido Franzke" <guidof73@yahoo.de> wrote in message news:OfYCpE03HHA.4476@TK2MSFTNGP06.phx.gbl... >...

Can'f find file GWXL97.xla
I have Excel 97 installed in Windows 95. I recently uninstalled many programs to clean up my drive. I suspect that the above file was deleted in the process. It is not in my Trash Bin because I cleaned out that bin. I lost my installation CD in the process of moving across the country. I don't know how to get that file, particulary since Microsoft no longer supports and programs in Office 97 If you have a suggestion, please respond Thanks This is the add-in for Novel Groupwise. It sounds like it was removed from your computer without first removing it from the list of installed add...

Customize .qrp files and Purchase Order Screen
Hi, I was recently assigned as the technical advisor for a small business using Microsoft RMS. I have no background with this software, nor anything similar to it. I am a mechanical engineer doing a favor for an old boss and want to set him in the right direction. Essentially, here is what I want to do: 1) I would like to modify the Item Movement History report to include cost data. From my understanding, I need to modify the qrp file to get this data. However, I do not know SQL nor really have the time to. I tried comparing the Item Movement Report with the Item Movement History...

Converting HTML to PUB
Can an .html file be converted to .pub and then used in a mail merge? I'm using Publisher 2007 and, although it appears as though you can open an ..html file, I can't see the contents of that file in Publisher. Would someone please tell me the steps to open and, more importantly, see the contents of my .html file. Also, assuming I'll be able to save it as .pub, will the formatting be OK, or does Publisher modify the formatting in any way? Thanks in advance! Gregg. What kind of data are you collecting as an .html? -- JoAnn Paules MVP Microsoft [Publisher] Tech Edito...

Line break in Visio 2003 / HTML export
Hello everybody, I have a big problem trying to get a line break into Visio 2003 shape properties. First of all, I cannot enter one "the normal way" because it is only ONE line to enter text, so Alt+Enter or something like that won't work. Secondly, when I try to enter e.g. '<BR>' or '\n' it will display them unchanged and not interpret them correctly in the HTML export. I know that this is due to JavaScript functions that parse all content in the data.xml file but the big question is - HOW can I insert a line break that'll actually display in th...

read file from excel
hi, i am triyng to read from excel file when i run the program i get error: "user defined type not defined" Private Sub import_data_Click() Dim xlApp As Excel.Application Dim xlSht As Excel.Worksheet Dim xlRng As Excel.Range thanks. hi, SIN wrore: > i am triyng to read from excel file when i run the program i get error: > "user defined type not defined" > Dim xlApp As Excel.Application You need to set a reference to the Excel Library as you are using early binding, so that the compiler can work type safe with these objects. In the release version you should ...