PDA

View Full Version : dynamic url's in xhtml pages?


tom
07-10-03, 06:22 PM
hey,
i'm trying to get my webpage to validate as xhtml 1.0 transitional, but the url's generated by my php pages do not validate.

<a href="index.php?a=1&b=2">SomeText</a>
the errors that the w3c validator returns are something like
cannot generate system identifier for general entity "a"
and
general entity "a" not defined and no default entity .

any thoughts?
i know that the error resulting from use of ampersands can be solved using "& a m p;", but i'm still stuck with these entities and stuff. :/

thanks in advance,
-tom

darkcarnival
07-10-03, 06:44 PM
well its because ur using php so it isnt 100% xhtml.if you want it to appove it remove the php codes or ignore it.

Ryan
07-11-03, 12:47 AM
Originally posted by darkcarnival
well its because ur using php so it isnt 100% xhtml.if you want it to appove it remove the php codes or ignore it. That's not true. I use PHP code within XHTML pages and it validates just fine.

Tom, could you post either the link in which you're trying to validate or the link directly to the W3C validation page? That would enable us to provide better help. Thanks! :)

XMLMania.com
09-26-03, 03:38 PM
Man! PHP is my favorite language for working with XML... (XSL support is a bit crap however :().

To do what you want to do... there is 2 major options, use mod_rewrite to make more acceptable links or:

replace the symbol & with the entity: &amp;

E.G.
<a href="index.php?a=1&amp;b=2">SomeText</a>

This should work perfect!

Heres how well PHP and XHTML 1.1 STRICT! can work: http://www.xmlmania.com

tom
09-26-03, 06:11 PM
thanks for the help - i ended up using the &amp; method and it works like a breeze (although i did end up using html 4.1, but fully valid).

other projects have been in full xhtml though, and its working great!
the satisfaction from seeing that the page validates, ahh!