Yes that was the answer. Now it works like a charm. Thanks for the help / Erik
> -----Original Message----- > From: Berin Lautenbach [mailto:[EMAIL PROTECTED] > Sent: den 23 oktober 2003 12:50 > To: [EMAIL PROTECTED] > Subject: Re: Xerces DOMDocument as XMLInputSource? > > Erik, > > You should be able to use an XSLTInputSource as the stylesheet. This > can take a XalanNode as the actual source (via the appropriate ctor). > So you should be able to wrap the Xerces document in a > XercesDocumentWrapper which will give you a XalanDocument and then use > that when you construct the XSLTInputSource. > > Cheers, > Berin > > > Erik Rydgren wrote: > > Thanks but that part I have already figured out. The problem is that I > > want to use the DOMDocument as stylesheet. > > > > transformer->transform(someInputXML, myStylesheetDOMDocument, *target); > > > > I haven't found anything in the documentation regarding this. Is it even > > possible to do? > > > > / Erik > > > > > >>-----Original Message----- > >>From: Peter Guyatt [mailto:[EMAIL PROTECTED] > >>Sent: den 23 oktober 2003 11:37 > >>To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > >>Subject: RE: Xerces DOMDocument as XMLInputSource? > >> > >>Hi there, > >> > >> > >> You use the XercesPatsrtLiason class. It is documented in the > > > > Xalan > > > >>examples. > >> > >> > >>It looks a little like this (Please note that this is just a lot of > > > > ripped > > > >>code from my application) > >> > >> //used to help convert a Xerces DOM tree into a Xalan DOM tree > >> XercesDOMSupport supporter; > >> XercesParserLiaison liaison; > >> //let the wrapper know the it does not have a id > >> XalanDOMString uri(""); > >> XercesDOMParser *parser; > >> parser->parse(src); > >> /get the document > >> doc = parser->getDocument(); > >> //create a new wrapper used to 'wrap' the Xerces DOM into a > > > > Xalan > > > >>DOM > >> XercesDOMWrapperParsedSource wrapper(doc, liaison, supporter, > > > > uri); > > > >> //transform file > >> transformer->transform(wrapper,stylesheetName,*target); > >> > >>Hope this helps > >> > >>thanks > >> > >>Pete > >> > >>-----Original Message----- > >>From: Erik Rydgren [mailto:[EMAIL PROTECTED] > >>Sent: 23 October 2003 10:31 > >>To: [EMAIL PROTECTED] > >>Subject: Xerces DOMDocument as XMLInputSource? > >> > >> > >>Hi all! > >> > >>Is there some way to use a DOMDocument as an XMLInputSource? The > >>situation is like this. I have a transform that transforms an XML > >>document into a new transform. I would then like to use the resulting > >>transform to transform an additional XML document. I have made it work > >>with a temporary storage inside a std::strstream but that solution > > > > makes > > > >>it necessary to parse the document again to compile the transform. I > > > > was > > > >>wondering if there is a better way of doing the DOMDocument -> > >>compiledStylesheet conversion. > >> > >>Best regards > >>Erik Rydgren > >> > > > > > > > >
