[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Standard means to convert text to XML?

  • From: <Peter.Kirkham@g...>
  • To: <brettz9@y...>,<xml-dev@l...>
  • Date: Wed, 15 Aug 2007 10:22:08 +0100

RE:  Standard means to convert text to XML?
I doubt very much that PHP is a regular language, so regex (even with
the non-regular extras found in Perl and the like) won't suffice to
create the abstract syntax tree you would require for cross language
translations, syntax aware editing, or anything that requires more than

On the other hand, if want to do is pretty print some source code on a
web page, the conversation at
http://weblogs.mozillazine.org/weirdal/archives/015930.html and
http://weblogs.mozillazine.org/weirdal/archives/015932.html leads to
http://dean.edwards.name/my/examples/star-light/ which is regex based.


-----Original Message-----
From: Brett Zamir [mailto:brettz9@y...] 
Sent: 15 August 2007 10:04
To: xml-dev@l...
Subject: Re:  Standard means to convert text to XML?

Hello, thanks for all your responses...

It is not so much specific tools that I'm interested in, but rather a
W3C standard which might be implemented in browsers like Firefox, etc.  
It sounds like XSLT 2.0 might be the closest thing.

To give an example usage, I imagine if PHP wanted to provide some kind
of regular expressions stylesheet to express the syntax of PHP, they
could just post it at their own site (assuming an open means was offered
to them or they developed it themselves). Then, one could take some
sample PHP code (saved as a regular text file that is) and attach to it
a stylesheet which had the simpler task of say producing syntax-colored
HTML output of the PHP code. I've even wondered whether one could
perform crude PHP <-> Java, etc. translations in this way (I know, I
know, computer languages such as these are vastly different, but I think
it could be a lot easier to attempt if XML were used as the medium of


This email and any files attached are intended for the addressee and may contain information of a confidential nature. If you are not the intended recipient, be aware that this email was sent to you in error and you should not disclose, distribute, print, copy or make other use of this email or its attachments. Such actions, in fact, may be unlawful. In compliance with the various Regulations and Acts, General Dynamics United Kingdom Limited reserves the right to monitor (and examine for viruses) all emails and email attachments, both inbound and outbound. Email communications and their attachments may not be secure or error- or virus-free and the company does not accept liability or responsibility for such matters or the consequences thereof.  General Dynamics United Kingdom Limited, Registered Office: 100 New Bridge Street, London EC4V 6JA. Registered in England and Wales No: 1911653.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.