Thank you so much, its working perfectly now. It must have been the 
startDocument() that caused the transformation to stop.
I just closed the bug, sorry if anyone wasted time on my error.
thanks once more
martin

Carsten Ziegeler wrote:

>Hi,
>
>1. did you try to read and transform your file using the standard
>   file generator? (in sitemap: <map:generate src="file.xml"/>)
>2. If you include an xml source inside your generator into your
>   stream, your first approach (using toSAX()) is the way to go,
>   but when using toSAX() (or any other method), all sax events
>   for parsing this document are send, including the startDocument()
>   and endDocument() event.
>   So if you include this, you have to ignore those two sax events.
>   For exactly this purpose exists the
>org.apache.cocoon.xml.IncludeXMLConsumer
>   class.
>
>If 1. does not work, it may be that your stylesheet is the source
>of error.
>If you still have problems, include your xml and xsl file if possible.
>
>Carsten
>
>>-----Ursprungliche Nachricht-----
>>Von: Martin Kavalar [mailto:[EMAIL PROTECTED]]
>>Gesendet: Freitag, 7. September 2001 13:51
>>An: [EMAIL PROTECTED]
>>Betreff: Problem with own Generator and XSLT
>>
>>
>>Hello,
>>For a project we are working on, we are implementing our own generator,
>>which is supposed to combine multiple input sources (XML-FS, OODB, RDB,
>>...) and output one XML. We started out with the generator having all
>>XML hardcoded in our generator, so it would look like this:
>>
>>public void generate() throws IOException, SAXException,
>>ProcessingException {
>>....
>>// xmlConsumerAdapter calls xmlConsumer
>>this.xmlConsumerAdapter.startNSElement("info", "title");
>>this.xmlConsumerAdapter.characters("MuX [" +
>>this.parameters.getParameter("OutputType", "NULL") + "]");
>>this.xmlConsumerAdapter.endNSElement("info", "title");
>>
>>...and so on
>>
>>We then copied a part of our xml output (The part containing the
>>navigation) and moved it to a xml file on the filesystem.
>>No matter what way we tried to include this file however and send it to
>>the xml consumer, no xsl transformation of any elements below the
>>included navigation occurred.
>>We then implemented a way of turning compents in the xml output of, so
>>cocoon/myproject?nav=0 would simply not include the nav file, then all
>>other elements would be transformed.
>>Is this a bug in cocoon? (We reported it as #3057) What would be the
>>correct to send xml code from the filesystem to xmlConsumer?
>>Here is what we tried:
>>
>>1.
>>//nav File is a String to the existing nav file
>>Source is = resolver.resolve(navFile);
>>is.toSAX(this.xmlConsumer);
>>
>>2.
>>XMLReader xr = XMLReaderFactory.createXMLReader();
>>xr.setContentHandler(super.xmlConsumer);
>>xr.parse(new InputSource(new FileReader(navFile)));
>>
>>Thanks a lot for your help!
>>martin
>>
>>
>>---------------------------------------------------------------------
>>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]>
>>
>
>
>---------------------------------------------------------------------
>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]>
>
>



---------------------------------------------------------------------
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