473,399 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

>> Simple question about escaping content in XSL

Hey everyone,

There is probably a really simple solution. I have an XSL document that
reads into content from my XML document and creates an HTML document
(with a .php extension). There is some PHP code I would like to include
on the XSL document, however I don't want to XML/XSL engine to try and
interpret it. I would simply like the PHP code to pass through from the
XSL document and be included on the HTML document unchanged. From there
it will simply be evaluated at run-time like a typical HTML document
(with a .php extension) would. So basically, how do I simply pass it
the PHP code through? Do I need to escape it somehow? I thank you in
advance.

Gene

Jul 20 '05 #1
1 1282
ge********@gmail.com wrote:
Hey everyone,

There is probably a really simple solution. I have an XSL document that
reads into content from my XML document and creates an HTML document
(with a .php extension). There is some PHP code I would like to include
on the XSL document, however I don't want to XML/XSL engine to try and
interpret it. I would simply like the PHP code to pass through from the
XSL document and be included on the HTML document unchanged. From there
it will simply be evaluated at run-time like a typical HTML document
(with a .php extension) would. So basically, how do I simply pass it
the PHP code through? Do I need to escape it somehow? I thank you in
advance.


As far asa I can see, <?php blah....?> is a processing instruction. You
should just have a template like <xsl:template
match=processing-instruction()><xsl:copy-of select="."/><(xsl:template>
somewhere; it should copy the php. You might get some challenges keeping
the php-infes... uh, enriched HTML as valid xml, I mean <, ? and >
inside the processing instructions. I suppose it's XHTML?

Soren

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Mikko Ohtamaa | last post by:
From XML specification: The representation of an empty element is either a start-tag immediately followed by an end-tag, or an empty-element tag. (This means that <foo></foo> is equal to...
0
by: Gene Ellis | last post by:
Very simple question. If I have the XML file below: <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="newspage.xsl"?> <newspage> <content>Click here for blah...
2
by: Eshrath | last post by:
Hi, What I am trying to do: ======================= I need to form a table in html using the xsl but the table that is formed is quite long and cannot be viewed in our application. So we are...
2
by: Donald Firesmith | last post by:
I am having trouble having Google Adsense code stored in XSL converted properly into HTML. The <> unfortunately become &lt; and &gt; and then no longer work. XSL code is: <script...
129
by: Torbjørn Pettersen | last post by:
I've started cleaning up my HTML and implementing CSS. So far I've used FrontPage, but am switching over to DreamWeaver. Reading a bit on W3Schools.com and W3.org I see there are a lot of HTML...
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
2
by: bissatch | last post by:
Hi, I am currently writing a simple PHP program that uses an XML file to output rows for a 'Whats New' page. Once written, I will only require updating the XML file and any pages that use the...
5
by: bram.labarque | last post by:
Hello all, The parsing should happen at the browser. I have three files: 1) Initial file: xml with some data and a pointer to an xsl. <?xml version="1.0" encoding="ISO-8859-1"?>...
4
by: mark4asp | last post by:
I have an element, report which contains tags which have been transformed. E.g. <pis &lt;p&gt <myXml> <report>This text has html tags in it.&lt;p&gt which but <has been changed to &lt;&gt</report>...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.