Forcing inclusion of / character in FP2002?

  • Thread starter Thread starter laughlin
  • Start date Start date
L

laughlin

Is there anyway to get FP2002 to include the / character prior to the
end bracket ( > ), e.g.,

Instead of generating the following:

<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" >

generate:

<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252" />

(only difference being the / prior to >.

The latter snippet is what gets generated if you apply XML formatting
rules to the html in the HTML view. I'd rather not have to do that
everytime I edit a page though.

Many thanks!
 
No, but you can with FrontPage 2003. All you have to do is wait for it to be
released! ;-)

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Neither a follower nor a lender be.
 
chris leeds said:
I'm not being a facetious:
why do you want to do this?

For proper XHTML formatting. I'll let the W3 tell you about it:
http://www.w3.org/TR/xhtml1/

+++
4.6. Empty Elements
Empty elements must either have an end tag or the start tag must end with
/>. For instance, <br/> or <hr></hr>. See HTML Compatibility Guidelines for
information on ways to ensure this is backward compatible with HTML 4 user
agents.

CORRECT: terminated empty elements

<br/><hr/>

INCORRECT: unterminated empty elements

<br><hr>
+++
 
chris leeds said:
I'm not being a facetious:
why do you want to do this?

I'm doing application development and I'd like to use Microsoft's XML
DOM to parse HTML code. DOM parsing fails, though, unless the HTML is
actually XHTML (XML compliant) rather than HTML4 (which is what fp2002
generates). That's what the simple "/" does for me.

Without that, I have to write my own HTML parsing code.
If FP2003 will write XHTML, I'll be very happy. I could use it TODAY.

Thank you to all who responded.
 
Here's something else I ran into. As I mentioned, I'm using MS's XML
DOM component to parse what I thought was XML (having invoked the "XML
format" option within FP2002).

For some reason, the parser doesn't like the following reference that
includes a couple of parameters following the "?" and seperated by the
"&". Specifically, the error generated by the DOM parser says a ";"
is expected following "stills" in the snippet below ("stills" and
"selection" are both reference parameter names):

<a href="../../../../Media/Drills/feint1.avi?selection=8.65,10.33&stills=10.07">

Any ideas?

Many thanks.
 
Ampersands (&) are supposed to be encoded as "&amp;". My guess is that the
parser saw "&stills" and thought it was supposed to be "&stills;" because
anytime you have an & right next to text, it thinks you are using an
encoding.

The correct way to fix this is to replace the "&" with "&amp;" like this:
"?selection=8.65,10.33&amp;stills=10.07"
 
Thanks. So FP2002 uses "&" to separate parameters but the XML parser
doesn't like that, looking for &amp; instead. Do you happen to know
if FP2003 "fixes" this so that one wouldn't have to go in and fix
things up by hand?

Thanks.
 
Back
Top