![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is it possible to pull an XSLT document from BDBXML to have it transform another XML document located in BDBXML? I am having the hardest time trying to get this to work and I am wondering if BDBXML does something to the file to prevent it from being used in a Transformer. Here is some sample code: ***** BEGIN CODE ***** xmlDocument = VyasaPlugin.getXmlManager().openContainer(containe rName).getDocument(xmlDocumentName); xslDocument = VyasaPlugin.getXmlManager().openContainer(containe rName).getDocument(xslDocumentName); TransformerFactory transformerFactory = TransformerFactory.newInstance(); StreamSource documentStreamSource = new StreamSource(new InputStreamReader(xmlDocument.getContentAsInputStr eam())); StreamSource stylesheetStreamSource = new StreamSource(new InputStreamReader(xslDocument.getContentAsInputStr eam())); Transformer transformer = transformerFactory.newTransformer(stylesheetStream Source); StreamResult streamResult = new StreamResult(); transformer.transform(documentStreamSource, streamResult); BrowserView.setText(streamResult.getOutputStream() .toString()); ***** END CODE ***** While running, once the code gets to the point where it creates the transformer the following error occurs: (Location of error unknown)java.io.IOException: Underlying input stream returned zero bytes When I debug, all of the documents and their contents load properly. My question is does BDBXML have a limitation in this regard, or am I doing something wrong in the code. Thanks in advance for any help. |
![]() |
| Thread Tools | |
| Display Modes | |
| |