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

Making valid XML of ASP/PHP source code, w/o affecting scrip

Subject: Making valid XML of ASP/PHP source code, w/o affecting script execution?
From: "Jeff Kowalczyk" <jtk@xxxxxxxxxxxx>
Date: Fri, 24 Mar 2000 10:07:06 -0500
php valid xml
What is the best way to handle the typical embedded server scripting tags,
such as <% .. %> in ASP and PHP source code?

I'm converting ASP code to XML output, and would like to have even the
sourcecode files parsable as valid XML, to try some early rendering, source
viewing, and DOM manipulation techniques. It would be an added bonus if the
<%%> tag pairs could be selectable elements in XSL matches, etc..

So, given the ASP source code:
<para>
Today's date is <%= FormatDateTime(Now,vbLongDate)%>.
<image src="<% Response.Write ("imagedujour.asp") %>"/>
<emphasis>Have a nice day.</emphasis>
</para>

...Which would only become valid XML *after* execution, should
I CDATA-enclose every <%...%> pair? Is that helping any, I want the <% to
act somewhat like a tag.

<para>
Today's date is <![CDATA[<%= FormatDateTime(Now,vbLongDate)%>]>.
<image src="<![CDATA[<% Response.Write ("imagedujour.asp") %>]>"/>
<emphasis>Have a nice day.</emphasis>
</para>

But then I've got a mess on the output, the unneeded CDATAS get in the
way...

And ideas?



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
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.