XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
RE: [xml-dev] 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
lexing.

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.


Pete

-----Original Message-----
From: Brett Zamir [mailto:brettz9@yahoo.com] 
Sent: 15 August 2007 10:04
To: xml-dev@lists.xml.org
Subject: Re: [xml-dev] 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
exchange...)

Brett



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]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS