Title: Message
BTW I couldn't parse your XSLT document with the encoding of UTF-16 so switched it to UTF-8.
 
The problem is that you are not outputting a valid XML document. You're stylesheet doesn't output a single root element. An XSLT document can output anything it likes so you need to be a bit careful your XSLT can output valid XML.
 
If you modify the source to this...
 
----- Original Message -----
Sent: Friday, November 30, 2001 5:34 PM
Subject: RE: [dom4j-user] Another error

Ok, here's the code...
 
    public Document process(Document document) throws Exception
    {
        System.out.println("Processiong TrasnformProcessor = ");
 
        TransformerFactory factory = TransformerFactory.newInstance();
        Transformer transformer = factory.newTransformer(new DocumentSource(oplet));
 
        // now lets create the TrAX source and result objects and do the transformation
        DocumentSource source = new DocumentSource(document);
        //DocumentResult result = new DocumentResult();
            StreamResult result = new StreamResult( System.out ):
 
        transformer.transform( source, result );
        System.out.println("Trasnformation successful");
        return null;
    }
 
Then you should see what the XSLT document outputs.
 
Here's what I got...
 
<?xml version="1.0" encoding="UTF-8"?>
<payloadID>[EMAIL PROTECTED]</payloadID>
<timestamp>1999-03-12T18:39:09-08:00</timestamp>
 

      <domain>AribaNetworkUserId</domain>
 
Which has no single root element.
 
You can fix this in your stylesheet by adding this template rule in there...
 
<xsl:template match="/">
    <dummyRoot>
        <xsl:apply-templates/>
    </dummyRoot>
</xsl:template>
 
 
which will wrap all the output with a <dummyRoot> element. You can call this whatever you like.
 
James
 
 

Reply via email to