W3C home > Mailing lists > Public > www-html@w3.org > June 2005

Re: XML tags are just a cheap rip-off of PHP tags

From: Devin Bayer <devin.bayer@rochester.edu>
Date: Fri, 24 Jun 2005 12:29:24 -0400
To: Jasper Bryant-Greene <jasper@bryant-greene.name>
Cc: Laurens Holst <lholst@students.cs.uu.nl>, www-html@w3.org
Message-id: <2AB3BB1B-FD04-41EE-9CC9-CB5039598C4C@rochester.edu>

On Jun 24, 2005, at 6:50, Jasper Bryant-Greene wrote:

> This is because it simply uses <?php ?> as delimiters, it's  
> effectively
> "dumb" to the idea of an XML PI, even though it uses a similar syntax
> for convenience.

That isn't true.  PHP uses PI's syntax because they are PI's so that  
the source documents are valid XML.  In fact, PHP disallows '?>'  
within them for this reason.

To quote from http://us4.php.net/xml:

PHP programmers should be familiar with processing instructions (PIs)  
already. <?php ?> is a processing instruction, where php is called  
the "PI target". The handling of these are application-specific,  
except that all PI targets starting with "XML" are reserved.

and if you look further you'll see more evidence that they use this  
syntax just because it is the standard.  PI's are not just for web  
browsers, and PHP's use is exactly the idea of an XML PI.  Things can  
happen in the backend like XSLT transformations, editing by XML  
compliant editors, etc. etc.

Devin Bayer
Received on Friday, 24 June 2005 17:22:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:11 UTC