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

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