472,342 Members | 1,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Outputting "<?" with XSLT

Hi,

I'm applying a XSL transformation to a XML document. I would like to
know if it's possible to include <?..?> in the output header.

Example:

=====
a.xml:
=====

<root>
<elem1/>
</root>

======
a.xslt:
======

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" media-type="application/xml"/>

<xsl:template match="/">
<TEST>
</xsl:template>
</xsl:stylesheet>

======
Result:
======

<?xml version = '1.0'?>
<TEST>

====================
I would like to have:
====================

<?xml version = '1.0'?>
<?xml-stylesheet type="text/xsl" href="......"?>
<TEST>
How can I manage this?
Hope I made myself clear enough.

Thanks in advance,
Sérgio Nunes
Jul 20 '05 #1
2 1442
S??rgio Nunes wrote:
Hi,

I'm applying a XSL transformation to a XML document. I would like to
know if it's possible to include <?..?> in the output header.


The element is xsl:processing-instruction.
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2


S??rgio Nunes wrote:

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="xml" media-type="application/xml"/>

<xsl:template match="/"> <xsl:processing-instruction name="xml-stylesheet">type="text/xsl"
href="..."</xsl:processing-instruction> <TEST>
</xsl:template>
</xsl:stylesheet>

<?xml version = '1.0'?>
<?xml-stylesheet type="text/xsl" href="......"?>
<TEST>


See
http://www.w3.org/TR/xslt#section-Cr...g-Instructions

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #3

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

Similar topics

5
by: Eric A. Forgy | last post by:
Hello, I am just learning Java and am trying to write a method that does something like //=========================================== public...
3
by: Ray Tayek | last post by:
hi, trying to use an xslt to make an xslt. trying something like: <?xml version="1.0" encoding="UTF-8"?> <?xmlspysamplexml...
1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document...
7
by: Diandian Zhang | last post by:
Does anyone have an idea, how to do it? Thanks in advance!
4
by: | last post by:
Hello NG! Within a xsl-stylesheet I have an element <xsl:text><!]></xsl:text> If I use that stylesheet to transform some xml-data (to html)...
2
by: andrew007 | last post by:
I do xml / xslt transformation using asp.net but I found any value (w/xml format) in xml node html-encoded to &lt and &gt format if it's > or <...
10
by: Jon Noring | last post by:
Out of curiosity, may a CDATA section appear within an attribute value with datatype CDATA? And if so, how about other attribute value datatypes...
3
by: Steven.Xu | last post by:
hi everybody, i am useing some classes which in System.Xml to deal with xml document. what can i do if the document include "<" or ">"? Thanks.
8
n8kindt
by: n8kindt | last post by:
how do i suppress the outputting and printing dialog boxes that pop up while running vba code such as: DoCmd.OpenReport "Report1" or ...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.