|
 |
aspx_beginners thread: Object reference not set to an instance of an object in XSLT
Message #1 by "Charles M. Carroll" <darthcarroll@l...> on Fri, 10 Jan 2003 16:54:56 -0500
|
|
Simple Transform is blowing up. Why?
Object reference not set to an instance of an object in XSLT
at the line
=> XSL1.Transform(strFileXML1,"/experiments/data/learn.v2.xml") <
Dim strFileXML1 as string
Dim strFileXSLT1 as string
strFileXML1 = server.mappath("/experiments/data/learn.xml")
strFileXSLT1 = server.mappath("/experiments/data/learnatt2elements.xslt")
' XSLT stuff
Dim XSL1 as XSLtransform = new XSLtransform
XSL1.load(strFileXSLT1)
' ERROR: Object reference not set to an instance of an object.
' at System.Xml.Xsl.XslTransform.Transform(String inputfile,
String outputfile):
XSL1.Transform(strFileXML1,"/experiments/data/learn.v2.xml")
---
[This E-mail scanned for viruses by Declude Virus]
Message #2 by "Charles M. Carroll" <darthcarroll@l...> on Fri, 10 Jan 2003 18:08:48 -0500
|
|
FIXED
XSL1.Transform(strFileXML1,"experiments/data/learn.v2.xml")
changed to:
XSL1.Transform(strFileXML1,request.PhysicalApplicationPath &
"experiments/data/learn.v2.xml")
was the answer. I wanted to server.mappath it instictively but knew i could
not because the file did not exist yet.
The
request.PhysicalApplicationPath
fixed it. Thanks anyway.
At 04:54 PM 1/10/2003 -0500, you wrote:
>Simple Transform is blowing up. Why?
> Object reference not set to an instance of an object in XSLT
> at the line
> => XSL1.Transform(strFileXML1,"/experiments/data/learn.v2.xml") <
>
>
> Dim strFileXML1 as string
> Dim strFileXSLT1 as string
>
> strFileXML1 = server.mappath("/experiments/data/learn.xml")
> strFileXSLT1 =
> server.mappath("/experiments/data/learnatt2elements.xslt")
>
>
> ' XSLT stuff
> Dim XSL1 as XSLtransform = new XSLtransform
> XSL1.load(strFileXSLT1)
>
> ' ERROR: Object reference not set to an instance of an object.
> ' at System.Xml.Xsl.XslTransform.Transform(String
> inputfile, String outputfile):
>
> XSL1.Transform(strFileXML1,"/experiments/data/learn.v2.xml")
>
>
>---
>[This E-mail scanned for viruses by Declude Virus]
>
>
>---
>Change your mail options at http://p2p.wrox.com/manager.asp or to
>unsubscribe send a blank email to
>---
>[This E-mail scanned for viruses by Declude Virus]
>
---
[This E-mail scanned for viruses by Declude Virus]
|
|
 |