[jdom-interest] issue on processing instructions !?

Dominik Hasek DHasek1 at excite.com
Thu Dec 28 09:14:28 PST 2000


Hi,

Thank you for any help to this issue.....

when i want to add a processing instruction like

<?xml-stylesheet href="toto.xsl" type="text/xsl"?> just beneath

<?xml version="1.0"?> at the beginning of my xml file i can't.

despite I use :

Document doc = new Document(my_rootTag);
doc.addContent(new ProcessingInstruction("xml-stylesheet", myPairs)); 

my pairs is a Map with correct values for this tag
href->toto.xsl
type->text/xsl.

and bad surprise the <?xml-stylesheet href="toto.xsl" type="text/xsl">

is inserted at the end of my xml file by the outputter.
and ie5 don't understand......

Unfortunely ie5 when it reads this file just ignore this tag and my xml file
is not diplayed in html. but in xml !!!!

and i must do a cut paste to put this tag at the beginning of my file to be
usable by ie5 and to have my xml file processed in html.

How can i put with JDOM my stylesheet tag just under the first line
<?xml version="1.0"?> ?

is it possible to do so with JDom ?

ps: using setProcessingInstructions instead addContent or
addProcessingInstruction does the same thing !

Thanks

DH, a Dominik Hasek Fan







_______________________________________________________
Send a cool gift with your E-Card
http://www.bluemountain.com/giftcenter/





More information about the jdom-interest mailing list