473,289 Members | 1,947 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,289 software developers and data experts.

need help to add a comment before <!DOCTYPE ... in xsl

Hi all,

Need some help here. I'm using these in a xsl:
~~~~~~~~~~~~~~~
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" indent="yes"/
>
<html>
<head>

After transform, the html output is:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
~~~~~~~~~
I will need to add a comment before the <!DOCTYPE ... and would like
the HTML output as:
<!-- something as a comment must be added here -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Can anyone please help? What can I do to create this comment? Can
this be done on the client side (xslt, scripting...) or should it be
done on the server side when Java code does the transform?

Any help is really appreciated!

Thanks in advance, Jane

Dec 20 '07 #1
2 3734
Hi Martin,

Thanks for the help. It did work after I comment out the xsl:output.
It works great!

A good day,
Jane
Dec 20 '07 #2
On Dec 20, 12:14 pm, Martin Honnen <mahotr...@yahoo.dewrote:
That way it will occur before the root element. Whether it will occur
before the DOCTYPE might be implementation dependent
I believe it _is_ implementation dependent, at least in XSLT 1.0 where
the doctype is not an explicit part of the XPath 1.0 data model.
Dec 21 '07 #3

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

Similar topics

1
by: RSG | last post by:
Hi, Stupid question: how do I get an XSLT stylesheet to emit a comment into the HTML output file? Obviously this won't work; it's interpreted as a comment in the stylesheet: <template ...>...
35
by: Boobie | last post by:
I need to escape HTML chracters so <test> --> &lt;test&gt; Looks like there is no built-in JS function...anyone got one handy ? thanks
2
by: Ron James | last post by:
I've included the following in a C# class: /// <summary> /// The method <c>Junk</c> doesn't do anything. /// </summary> public void Junk(){} After running Tools->Build Comment Web pages,...
11
by: news.microsoft.net | last post by:
When I wrote <summary> comment for a function. I wrote: /// <summary> /// Line one. /// Line two. /// </summary> I want the intelligence mechanism display: Line one. Line Two. but it display:...
4
by: dsimmons | last post by:
On my website http://seasidequilters.blogspot.com/ I'm having a problem that someone thinks might be associated with Firefox browsers. I'm hoping to find someone in this forum that might be...
5
by: Learner | last post by:
Hello, Here is the code snippet I got strucked at. I am unable to convert the below line of code to its equavalent vb.net code. could some one please help me with this? static public...
2
by: Jacob Lyles | last post by:
Hello All, I'm making a comment form for my website that will store the comments in a flat file with some sort of delimiting character. However, I'm wondering what will happen if someone uses...
1
by: capb | last post by:
Hello, This is my first post, and any help would be greatly appreciated. I create online memorials which contain guestbooks which have been the subject of computer generated spam. I have been able...
6
by: patrick j | last post by:
Hi I've been testing out the "Conditional Comment" for IE. This is because for my web-site I want to have two style sheets, one for IE 6 and one for other browsers. Thus I hope to have my...
0
by: xenia200 | last post by:
I HAVE THIS FOR EXAMPLE <misc> <cntextdef /> <vntextdef /> <xreflist> <xrefdef id="1" name="`Heading &amp; Page'"> “<ut value="&lt;$paratext&gt;" />” on page<ut...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.