[wp-hackers] XHTML Strict Mode

Jamie Talbot wphackers at jamietalbot.com
Wed Aug 18 09:49:36 UTC 2004


Hi,

Thanks for the info.

My concern about the qoutes or lack of was that as browsers accept them, users
tend to get lazy.  Therefore a parser will have to be able to accept all of
those listed possibilities, plus a couple more.  I think the only thing you can
be certain of is the equals sign and the word before it being an attribute
name.  It will require some smart parsing to handle all the alternatives.  Ah
well, least I've got something to keep me busy!

As for writing the functions in a class;  I wanted to do this, but I got a parse
error on the '&' when trying to use aliases inside it.  For example, it doesn't
like: $a = &$p; inside a class.

In one of the user notes in the PHP Manual it says PHP does clever memory
sharing for variables that are identical.  ie $p = 4; $f = $p; still only
allocates one section of memory until one changes.

I couldn't find mention of it in the manual proper though.  Can anyone confirm
it?  Looking for any way possible to keep the memory requirements low (I know
we're only talking a few bytes here, but still...)

Cheers,

Jamie.

--
http://www.jamietalbot.com/


Quoting Brian Meidell <brian at mindflow.dk>:

>
> I know that is true for the XML spec, but I didn't want to claim that
> carried over without having seen it in the XHTML spec.
> Since inconsistent use of double and single quotes in a XHTML document
> seems to pass right through the w3 validator, I figured the XML and
> XHTML spec might differ in other points as well.
>
> /Brian
>
> David Carrington wrote:
> > The quotes you can use for attributes are defined in the XML specification:
> >
> > AttValue	   ::=   	'"' ([^<&"] | Reference)* '"'
> > 			|  "'" ([^<&'] | Reference)* "'"
> >
> > http://www.w3.org/TR/REC-xml/#NT-AttValue
> >
> > In other words, you can only use double quotes or single quotes.
> >
> > David Carrington
> >
> >
> >
> > On Mon, 16 Aug 2004 23:13:49 +0200, Brian Meidell <brian at mindflow.dk>
> wrote:
> >
> >>The spec actually doesn't seem to mention single quotes, but they pass
> >>the w3 validator though.
> >
> >
> > _______________________________________________
> > hackers mailing list
> > hackers at wordpress.org
> > http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> >
> >
>
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
>




More information about the hackers mailing list