AW: [jdom-interest] issue on processing instructions !?

Benjamin Broll benjamin.broll at massp.com
Thu Dec 28 10:29:01 PST 2000


Hi,

Use getMixedContent of the Document and then insert the PI before the root
element. This should solve the issue.

.bbr


> -----Ursprüngliche Nachricht-----
> Von: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]Im Auftrag von Dominik Hasek
> Gesendet: Donnerstag, 28. Dezember 2000 18:14
> An: jdom-interest at jdom.org
> Betreff: [jdom-interest] issue on processing instructions !?
>
>
> 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/
>
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/yourad
dr at yourhost.com





More information about the jdom-interest mailing list