Hi Stephen,

Castor does not handle processing instructions by itself.

What you should do is to create your own Serializer and pass it to
Castor.
This question has been answered many times on the mailing-list:

http://www.mail-archive.com/castor-dev%40exolab.org/msg04289.html

Thanks,

Arnaud


> -----Original Message-----
> From: Stephen Tsun [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 08, 2002 5:04 PM
> To: [EMAIL PROTECTED]
> Subject: [castor-dev] XSLT qu: how can Castor generate an
xml-stylesheet
> PI in the begi nning of marshalling an object?
> 
> hi:
> 
> Say I have a java object I would like to marshal.  I marshal it fine,
> and the xml file contains
> 
> <?xml version="1.0"?>
> the rest of the serialized object...
> 
> I problem I have is that I would like to submit this xml file to a
browser
> with
> an xsl file with this processing instruction (PI):
> 
> <?xml-stylesheet href="my.xsl" type="text/xsl" ?>
> 
> I tried the following 2 approaches:
> a) marshal object, add PI, then none of the xml gets transformed at
all
> b) add PI, marshal object, then IE handles it OK, but Netscape 6
>     does not because it insists that the first line must be <?xml>
> 
> This is no good, so I have to do an XSLT on the server side.
> 
> What I really want is a client side XSLT IF I can get Castor to
produce
> 
> <?xml version="1.0"?>
> <?xml-stylesheet href="my.xsl" type="text/xsl" ?>
> the rest of the serialized object...
> 
> Can someone tell me how to do this?
> 
> thanks
> Stephen Tsun
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to