jdom and xml and xsl

View: New views
5 Messages — Rating Filter:   Alert me  

jdom and xml and xsl

by meriem bessais :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have little question for JDOM.

I want to add stylesheet (<?xml-stylesheet type="text/xsl"
href="style.xsl"?>) in to my Document of JDOM.

Currently my program can generate whole XML document but the issue is
that I have to present it on web browser using XSL Sytleseet and have
to add above code in to my JDOM document.

Please write the code of adding xsl stylesheet in to jdom document.

I hope that you understand my question..

Very urgently needed.
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Re: jdom and xml and xsl

by polx :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Meriem, that thing is a processing instruction with target "xml-
stylesheet" and some arbitrary string content.
I think it should help you add the appropriate content to the root  
element...

paul

Le 20-déc.-08 à 17:37, meriem bessais a écrit :

> I have little question for JDOM.
>
> I want to add stylesheet (<?xml-stylesheet type="text/xsl"
> href="style.xsl"?>) in to my Document of JDOM.
> Currently my program can generate whole XML document but the issue is
> that I have to present it on web browser using XSL Sytleseet and have
> to add above code in to my JDOM document.
> Please write the code of adding xsl stylesheet in to jdom document.
> I hope that you understand my question..



_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

smime.p7s (2K) Download Attachment

Re : jdom and xml and xsl

by meriem bessais :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi
the problem is that i didn't find the intruction to insert  this
header in xml file thate i generate with a java bean.

2008/12/20, Paul Libbrecht <paul@...>:

> Meriem, that thing is a processing instruction with target "xml-
> stylesheet" and some arbitrary string content.
> I think it should help you add the appropriate content to the root
> element...
>
> paul
>
> Le 20-déc.-08 à 17:37, meriem bessais a écrit :
>
>> I have little question for JDOM.
>>
>> I want to add stylesheet (<?xml-stylesheet type="text/xsl"
>> href="style.xsl"?>) in to my Document of JDOM.
>> Currently my program can generate whole XML document but the issue is
>> that I have to present it on web browser using XSL Sytleseet and have
>> to add above code in to my JDOM document.
>> Please write the code of adding xsl stylesheet in to jdom document.
>> I hope that you understand my question..
>
>

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

RE: jdom and xml and xsl

by Michael Kay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Create a ProcessingInstruction object and add it to the document node using
addContent().

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: jdom-interest-bounces@...
> [mailto:jdom-interest-bounces@...] On Behalf Of meriem bessais
> Sent: 21 December 2008 06:44
> To: Paul Libbrecht
> Cc: jdom-interest@...
> Subject: Re : [jdom-interest] jdom and xml and xsl
>
> hi
> the problem is that i didn't find the intruction to insert  
> this header in xml file thate i generate with a java bean.
>
> 2008/12/20, Paul Libbrecht <paul@...>:
> > Meriem, that thing is a processing instruction with target "xml-
> > stylesheet" and some arbitrary string content.
> > I think it should help you add the appropriate content to the root
> > element...
> >
> > paul
> >
> > Le 20-déc.-08 à 17:37, meriem bessais a écrit :
> >
> >> I have little question for JDOM.
> >>
> >> I want to add stylesheet (<?xml-stylesheet type="text/xsl"
> >> href="style.xsl"?>) in to my Document of JDOM.
> >> Currently my program can generate whole XML document but
> the issue is
> >> that I have to present it on web browser using XSL
> Sytleseet and have
> >> to add above code in to my JDOM document.
> >> Please write the code of adding xsl stylesheet in to jdom document.
> >> I hope that you understand my question..
> >
> >
>
> _______________________________________________
> To control your jdom-interest membership:
> http://www.jdom.org/mailman/options/jdom-interest/youraddr@you
> rhost.com


_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...

Re: Re : jdom and xml and xsl

by Tatu Saloranta :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

--- On Sat, 12/20/08, meriem bessais <meriem.bessais@...> wrote:

...
> hi the problem is that i didn't find the intruction to
> insert  this header in xml file thate i generate with a java bean.

With a bean? Usually this implies use of a data binding package like JAXB?
If so, these generally do not support processing instruction (or comment etc) output by default, although do allow custom converters.

But then again, it usually doesn't make sense to combine JDOM(/DOM/XOM) with data binding as two serve different purpose.

-+ Tatu +-



     
_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/youraddr@...