Yea I know it does not do the conversion.  The only advantage small
as it is to the code I posted of the PRE is that it is more friendly to
disabled users (screen readers) and is a way of using style sheet to control
your display in place of tags.  I am surprised that with all the push the
W3C has been doing for html tag not to control display properties but to
have styles control them that they have not deprecated PRE in XHTML 2.0
draft.  

        If you are not worried about meeting HTML standards you can also use
the <XMP></XMP> tags that do cause more browser to render everything as your
write it.  Displaying tags ect...  The XMP tag has be deprecated but IE and
Netscape still recognize it.  

        Daniel D. 

-----Original Message-----
From: Charlie Arehart [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2003 1:52 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Off Topic, but


Thanks for looking into that. But it's not clear to me what that really by
you at all over just using the pre tag itself?

You're not thinking that it converts the < and > tags to &lt; and gt;, are
you? Because it doesn't.  And when I passed in the output of that tool (that
does convert it), even when I leave off the <pre> tags it can generate, the
output of your code really looks the same as just doing a pre. (In fact, for
browsers that don't recognize CSS, you'd risk them not seeing it rendered
correctly at all.)

Just wondering if I missed something about your suggestion.

/charlie

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Daniel Daugherty
> Sent: Friday, March 21, 2003 12:47 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [CFCDev] Off Topic, but
>
>
> After reading this thread I went and looked at topstyle to see if
> there was
> a way to take care of the formating with styles.  And the answer as I
> suspected is yes.  The code below works in IE6 and Netscape 6+ not sure
> about IE 5.  One thing to note is that the style only work in IE6
> when it is
> rendering in Standards compliant mode.  Don't remember the rules
> for how it
> picks but I know XHTML Strict works.  I used the code tag because what is
> being displayed is code so use the tag to denote it as code.
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
>
> <html>
> <head>
>       <title>Untitled</title>
>       <style type="text/css">
>               code    {white-space : pre;
>               }
>       </style>
> </head>
>
> <body>
> <code >this is a test
>       there should be some tabs and return
>       s in this doc.
>
> </code>
> </body>
> </html>
>
>
> Daniel D.
>
> -----Original Message-----
> From: Charlie Arehart [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 21, 2003 11:05 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] Off Topic, but
>
>
> Just a follow-up, the guy who ran that site responded to my suggestion and
> added a new "retain formatting" checkbox. While all it does is
> add a pair of
> <pre> tags around the result, it's a nifty solution if one wouldn't have
> thought of it themselves.
>
> The only drawback is that it keeps the code from breaking the lines, which
> might be a benefit for some code fragments (where the language wouldn't
> support if the line was broken), though with HTML and CF code,
> that's not as
> important. It can mean that a code display may force the browser window to
> be as wide as the longest line of code in the code fragment,
> which can cause
> unexpected ugliness if you're used to seeing the code with "wrap" on in an
> editor. Just beware.
>
> I will grant that the pre tag approach is better than my idea of
> converting
> tabs to non-breaking spaces in one respect: it keeps any tabs in
> the code so
> that they continue to be represented as such on the browser, and then also
> if that code is copied out of the page (like your blog) and pasted into an
> editor.
>
> BTW, someone may point out that another way to show code (and one
> used by MM
> now) is to show it in a <textarea> tag. That's cool, too. The only problem
> is that if you use blogger for your blog, it always puts <br>
> tags on every
> line--even inside textarea tags. This is a real annoyance. And
> while there's
> an option to turn that off, it would then turn it off for all
> entries you've
> ever and will ever create, so the next time you publish, all your entries
> would become one big paragraph each. Not pretty!  So it appears we have to
> solve it ourselves, so this web site tool has been useful.
>
> I've not found a feature in Studio or DWMX to do this for us. I tried the
> Codesweeper in Studio/HomeSite+ as well as it's Options>Set Document as
> XHTML (which may be only a Studio 5/HS+ feature). That didn't do it.
>
> I just noticed after writing this and before sending it that Ray
> offered in
> the next note to show a Studio solution. Yes, Ray, please do
> share it (with
> me off-list if not on-list). Thanks
>
> /charlie
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Behalf Of Charlie Arehart
> > Sent: Friday, March 21, 2003 1:42 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: [CFCDev] Off Topic, but
> >
> >
> > Here's an even cooler solution if you ever have to convert a
> bunch of code
> > into those character entities:
> >
> > http://www.stanford.edu/~bsuter/js/convert.html
> >
> > Paste your code in the left window, click the button below it, then
> > copy/paste the code from the right window.  The only thing is that it
> > doesn't currently turn tabs or spaces for indenting into the
> > needed &nbsp;s
> > it would take to keep the code properly indented when rendered in
> > HTML. But
> > that's relatively to add yourself. I've requested that the tool
> > author do it
> > for us.
> >
> > /charlie
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Behalf Of Nathan Dintenfass
> > > Sent: Thursday, March 20, 2003 11:14 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: [CFCDev] Off Topic, but
> > >
> > >
> > > If the blogging software you are using doesn't escape HTML, do it
> > > yourself.
> > > Use the &lt; and &gt; "special" characters -- which render as the tag
> > > brackets you know and love.
> > >
> > >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] Behalf Of
> > > David Mineer
> > > Sent: Thursday, March 20, 2003 8:01 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: [CFCDev] Off Topic, but
> > >
> > >
> > > Can someone tell me how I post HTML and other CODE snippets in
> > blogger.  I
> > > want to see the code literally and not have it rendered.  Know
> > > what I mean.
> > > Can't figure this out.  Hope you don't mind, but I got the idea to try
> > > blogging from this news group and looking at spike's blog, I
> > notice he has
> > > now problem posting code snippets.
> > >
> > > TIA
> > >
> > > David M
> > >
> > > ----------------------------------------------------------
> > > You are subscribed to cfcdev. To unsubscribe, send an email
> > > to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> > > in the message of the email.
> > >
> > > CFCDev is run by CFCZone (www.cfczone.org) and supported
> > > by Mindtool, Corporation (www.mindtool.com).
> >
> > ----------------------------------------------------------
> > You are subscribed to cfcdev. To unsubscribe, send an email
> > to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> > in the message of the email.
> >
> > CFCDev is run by CFCZone (www.cfczone.org) and supported
> > by Mindtool, Corporation (www.mindtool.com).
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
> in the message of the email.
>
> CFCDev is run by CFCZone (www.cfczone.org) and supported
> by Mindtool, Corporation (www.mindtool.com).

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to