[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Error at element constructor...

Subject: Re: Error at element constructor...
From: SEXpeare <sexpeare@xxxxxxxxx>
Date: Mon, 12 Mar 2007 10:42:01 +0100
Re:  Error at element constructor...
Thx Michael, but this is a Web Service, and the XML comes in a
DataHandler wich I pass to the getISFromDH to obtain the InputStream,
wich systemId should I use for that???

2007/3/12, Michael Kay <mike@xxxxxxxxxxxx>:
I would guess from the name that super.getISFromDH(adjuntoXml) is returning
an InputStream. If that's the case then you haven't supplied a systemId on
the StreamSource object passed as the first argument to transform().
Probably somewhere in your code there is a call on document() with a
relative URI, which can't be resolved if the base URI isn't known. Call
setSystemId() on the Source for the XML source document just as you did for
the stylesheet.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: SEXpeare [mailto:sexpeare@xxxxxxxxx]
> Sent: 12 March 2007 09:09
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Error at element constructor...
>
> Good morning to all you ppl, i'm trying to transform an XML
> into another with Java, the code is this:
>
>
> System.setProperty("javax.xml.transform.TransformerFactory",
> "net.sf.saxon.TransformerFactoryImpl");
>
>                 TransformerFactory tfactory =
> TransformerFactory.newInstance();
>
>                 File plantilla = new File("c:/prueba.xsl");
>
>                 StreamSource xslSrc = new
> StreamSource(plantilla.toURL().openStream());
>                 xslSrc.setSystemId("c:/prueba.xsl");
>
>                Transformer transformer =
> tfactory.newTransformer(xslSrc);
>
>                 transformer.transform(new
> StreamSource(super.getISFromDH(adjuntoXml)),
>                                       new
> StreamResult(xmlEstructurado));
>
> When I execute de code I have this error:
>
> Error at element constructor <info> on line 5 of
> file:///c:/prueba.xsl:
> java.io.FileNotFoundException: C:\Archivos de programa\Apache
> Group\Tomcat 4.1 (Access Denied)
>
> I know it's taking the path where Tomcat is installed, but
> don't know why, any idea?
>
> TIA
>
> Alvaro Gonzalez Martmnez
> Software AG, Spain

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.