This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Making valid XML of ASP/PHP source code, w/o affecting script execution?


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]