|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Transforming Spaces into HTML file via XSL fileI'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>  " " " </span></u> The XSL file was apparently generated using Stylus Studio. When the transform into the HTML file is performed, this string of " "'s (as I understand it, this is supposed represent an ) 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   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 jmb61***@charter.net 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[ ]]</span></u> -- Show quoteHide quote<%= Clinton Gallagher METROmilwaukee "Regional Information Services" NET csgallagher AT metromilwaukee.com URL http://clintongallagher.metromilwaukee.com/ "John Bowman" <jmbow***@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 " " codes inside that > looks something like: > > <u><span>  " " " </span></u> > > The XSL file was apparently generated using Stylus Studio. > > When the transform into the HTML file is performed, this string of > " "'s (as I understand it, this is supposed represent an ) 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   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 > jmb61***@charter.net > > Clinton,
Thanks for the info. It's nice to hear from a local <g>... John Show quoteHide quote "clintonG" <csgallag***@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[ ]]</span></u> > > > -- > <%= Clinton Gallagher > METROmilwaukee "Regional Information Services" > NET csgallagher AT metromilwaukee.com > URL http://clintongallagher.metromilwaukee.com/ > > > > "John Bowman" <jmbow***@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 " " codes inside > that >> looks something like: >> >> <u><span>  " " " </span></u> >> >> The XSL file was apparently generated using Stylus Studio. >> >> When the transform into the HTML file is performed, this string of >> " "'s (as I understand it, this is supposed represent an ) 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   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 >> jmb61***@charter.net >> >> > > John Bowman wrote:
> <u><span>  " " " </span></u>   *is* a space character. Nonbreakable space actually. So after > > The XSL file was apparently generated using Stylus Studio. > > When the transform into the HTML file is performed, this string of > " "'s (as I understand it, this is supposed represent an ) is > lost and it becomes empty spaces. 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 Looks like you've got encoding issue. Seems like the output is UTF-16, > manually put the   string back into the HTML, it appears and prints > perfectly. while you are treating it as UTF-8 or ASCII. How do you run XSLT transformation? 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 Show quoteHide quote "Oleg Tkachenko [MVP]" <oleg@NO!SPAM!PLEASEtkachenko.com> wrote in message news:OAh93%2379EHA.2196@TK2MSFTNGP11.phx.gbl... > John Bowman wrote: >> <u><span>  " " " </span></u> >> >> The XSL file was apparently generated using Stylus Studio. >> >> When the transform into the HTML file is performed, this string of >> " "'s (as I understand it, this is supposed represent an ) is >> lost and it becomes empty spaces. > >   *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   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
Need some basic help
cannot load schema for the namespace XmlResolver -- Any improvements in the works? Document Validation Reading child nodes with XmlTextReader? XML vs. SQL Database xmlserialization and filenotfound exception too XML Schema, how to create one for this xml file? for Dino Dataset merge general questions.. please help |
|||||||||||||||||||||||