Thank you pavani for looking into my problem.

I have a servlet which has an OutDocument. That out document has an Element
out.

In my class, i have a reference for the out element and i add further
elements to this out element to form a xml document.

After doing all this(forming a well structured xml document), i'm trying to
attach a stylesheet to that document. (u helped me in this).

I have the code like this,

ProcessingInstruction pi =
cvcontext.OutDocument.createProcessingInstruction("xml-stylesheet",
"href=\"http://wsd-007:8080/instruction.xsl\"; type=\"text/xsl\"");
// Tried all the 3 options
out.getOwnerDocument().insertBefore(pi,
out.getOwnerDocument().getFirstChild()); (getting the document reference
from the out element)
cvcontext.OutDocument.insertBefore(pi,
cvcontext.OutDocument.getFirstChild()); (using the document reference
directly frm the servlet)
cvcontext.OutDocument.appendChild(pi); (using the append child method)

In all the above, i get the following result xml document in which there is
no reference to the xsl.

<?xml version="1.0" encoding="UTF-8"?>
<cv><status><type>Success</type><statusbar><code>CVM-00871</code><text>Actio
n Co
mpleted</text></statusbar></status></cv>

In fact after this i was trying to transform the xml and xsl into html.
During that time i get the

"getAssociatedStylesheet failed" error.


Is this is helpful for fixing the problem?





Ragu
CircuitVision



-----Original Message-----
From: Pavani Mukthipudi [mailto:[EMAIL PROTECTED]
Sent: Monday, April 22, 2002 11:39 AM
To: [EMAIL PROTECTED]
Subject: Re: Help in fixing this error while attaching stylesheet



Ragunath Marudhachalam wrote :
>
> I'm trying to attach a stylesheet to my xml document programtically.. but
> while doing that, i'm getting this error..
>
> tr 1.1.0 msg getAssociatedStylesheets failed.
>
> But i'm using only one stylesheet and it is not referencing any other
> stylesheets.
>
> Could u anyone suggest why it is and how to come out of that? I'm using
> Xerces 1.4.0.
>

I tried reproducing the problem with both xerces 1.4.0 and 1.4.4 but
couldn't.
Please check your classpath. Or provide further information.

-Pavani

--

Pavani Mukthipudi
Sun Microsystems, Inc.

Phone: 080 - 2298989   Extn: 87390


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to