473,659 Members | 2,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Inserting external HTML into xsl output

Hi

I need to insert some html content generated by certain business logic
into an xsl output. I have been able to insert custom Java extensions
and generate the HTML to be outputted. My problem is that xsl
transformation is not resulting in rendering the content as HTML. I've
tried xsl:copy-of and xsl:text. I think it is probably generating a
text node with the given content and writes entire html code as it is
rather than rendering it. Can somebody provide the solution?/

Thanks
Eva

Sep 29 '06 #1
5 1931
I think it is probably generating a
text node with the given content and writes entire html code as it is
rather than rendering it
Probably.

You didn't say which processor you're using. With Xalan, one solution
would be for the extension to return the generated content as a DOM
subtree rather than as text. That would give Xalan the information it
needs to recognize handle the content as nodes rather than as text.

With other processors, all I can suggest is that you check their
documentation for their own extension features. This is not
well-standardized, unfortunately.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Sep 29 '06 #2


ev*********@gma il.com wrote:

I need to insert some html content generated by certain business logic
into an xsl output. I have been able to insert custom Java extensions
and generate the HTML to be outputted. My problem is that xsl
transformation is not resulting in rendering the content as HTML. I've
tried xsl:copy-of and xsl:text. I think it is probably generating a
text node with the given content and writes entire html code as it is
rather than rendering it.
You can try whether the XSLT processor supports disable-output-escaping
<http://www.w3.org/TR/xslt#disable-output-escaping>
e.g
<xsl:text disable-output-escaping="yes"> &lt;</xsl:text>
You should however take note that disable-output escaping is an optional
feature that is usually only support if the XSLT result is serialized to
a string or stream. And it might not even be supported at all by an XSLT
processor.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 29 '06 #3
Thanks Joe!
I am using Xalan processor. Could you give me an example
Joe Kesselman wrote:
I think it is probably generating a
text node with the given content and writes entire html code as it is
rather than rendering it

Probably.

You didn't say which processor you're using. With Xalan, one solution
would be for the extension to return the generated content as a DOM
subtree rather than as text. That would give Xalan the information it
needs to recognize handle the content as nodes rather than as text.

With other processors, all I can suggest is that you check their
documentation for their own extension features. This is not
well-standardized, unfortunately.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Sep 29 '06 #4
Martin Honnen wrote:
You can try whether the XSLT processor supports disable-output-escaping
Good thought, worth a try if you really want to insert the fragments as
text. Xalan does support that feature, for what it's worth.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Sep 29 '06 #5
For information about writing a Xalan extension -- what the function can
return and how Xalan will interpret it -- see
http://xml.apache.org/xalan-j/extensions.html

I don't think there's an example in the Xalan samples/extensions
directory that returns a value that becomes a Node-Set or Result Tree
Fragment, but that's what you would want if you want to yield something
that Xalan will consider an XML tree. As that website documents, a
returned DOM Node or NodeIterator will be treated by Xalan as an XSLT
node-set, with the exception of a DocumentFragmen t node which will be
treated as an XSLT Result Tree Fragment. (The distinction between RTFs
and nodesets will be going away in XSLT 2.0, for what that's worth.)
Sep 29 '06 #6

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

Similar topics

2
1659
by: PWR | last post by:
Platform: Windows Python: 2.3 Python Skill: Reading, Learning, but still newbie. Mission: My mission is writing a script that is triggered from my mail server. The script will execute and download a file. The email that triggered the message has a file size which is compared to the downloaded file to make sure the bytes match. Once that is accomplished there is a small program (.exe) that I can run against the file. The ..exe has...
1
2449
by: Ben | last post by:
Hi all, I'm trying to write inside a table cell from external javascript but am not successful. When I insert inside a form within <td...>, it works but does not work for normal table cell. My codes are as follows; please read comments on the code: index.html ---------- <html>
11
2074
by: Mellow Crow | last post by:
I had a problem in IE 6 when trying to insert a table using W3C DOM techniques. I found a solution and share it. :) Initially I had...... ********************** <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
5
3624
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As New System.Diagnostics.Process 'p.Start(MDEPDirStr & "macrun.exe", sPPTOut) p.Start("C:\WINDOWS\SYSTEM32\CALC.EXE") 'p.Start("C:\WINDOWS\SYSTEM32\macrun.exe", sPPTOut)
4
2471
by: Brian Quigley | last post by:
Hi, i am trying to write a script to parse an external xml file, but am having problems... the problem i think has to do with me trying to do Response.Write(xmlDoc.transformNode(xslDoc)) before the xml is fully loaded. The link to the xml file is valid. my code is as follows... xmlf = "http://www.tcc-net.com/associates/xml/coursesopen.php?fieldSet=schedule&order=code" stylef = "page1.xsl" set xmlDoc =...
13
8481
by: Vivek | last post by:
Hi, Is it possible to insert a '\0' value or for that matter any control character into a DB2 CHAR/VARCHAR field ? So if i do a 'select hex(column) from table' i should see a 0 in the output. How can i do it from the command prompt ? Thanks, Vivek
1
1939
by: ouistyty | last post by:
Hi We have a simple asp page that query LDAP attribrute. Everithing is working fine using a native domain account. but when using an external account we have an error 70, acces denie. Here's some basic info on our structure. - Domain/Forest A with Exchange - Domain/Forest B with external accounts. - Forest A Trus Forest B and "Vice Versa" - asp page on a Exchange FrontEnd server on default web site (same as
3
3822
by: ups_genius | last post by:
Hi everyone! I created an error parser using the existing CDT stuff by basically copying some of the GNU / make / ... error parsers' code. I also added the extension point for the new error parser, and by debugging I see, that when activated, the new error parser is actually used to parse the regular build output. The reason for writing this error parser though was to parse the output produced by a batch file, run as "external tool"....
0
8850
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8746
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8626
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7355
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.