At 02:12 PM 11/13/01 -0800, you wrote:
>Well... Hmm... But..??
>
>Ok - In the previous supplied link
>(http://www.aoindustries.com/docs/cocoon-1.8.2/faqs.html#faq-xspinsertxml)
>it seemed (to me anyway) that I could give C2 a DOM/SAX source directly, and
>C2 then could work on this. Can I, and how?


It doesn't seem to me that this link indicates you can "give C2 a DOM/SAX source 
directly".

It outlines your options as:

1) use <util:include-expr> (which I suggested to you the other day and which you said 
worked - not sure why you're not still using it).  Drawback is that this invokes a 
parser to create a DOM object, and so you pay a performance penalty.

2) Pass in a DOM object you've already created some other way.  This way you don't 
need to invoke the parser.  One suggestion they give for doing this is to create a 
XMLFragment, which can be converted to both DOM and SAX easily.


I don't see any other implication in there (like you can pass in a SAX object).


>Ok - If not, what to do then? How do I do the things you talk about (the
>offical writer that can write to the xsp page, or even better, the parent
>SAXHandler for the xsp page)? The XML I return is actually a XML fragment,
>and is only part of a bigger XML document C2 should process.
>
>Basicly I don't know what to do, so please aid me :)
>
>Mvh/Best regards
>S�ren


OK.  Let's take a step back.

The reason why this is so hard is that what you're doing is pretty unorthodox.

Why are you using XSP to feed in a large amount of XML that's coming from elsewhere?  
That's not really what XSP is intended for.  It's intended to run logic on your XML 
data.

Instead, why don't you create a Generator to generate that XML.  Your generator would 
get XML from your Controller and feed it into the pipeline.  Then have a stylesheet or 
XSP process it.  Seems to me to make a lot more conceptual sense.  And generators deal 
with all the SAX stuff much easier than XSP.


HTH.

DR


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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

Reply via email to