all groups > dotnet xml > june 2005 >
You're in the

dotnet xml

group:

'' is an invalid QName


'' is an invalid QName Glenn
6/23/2005 12:00:00 AM
dotnet xml: Help

I'm trying to perform a transform and I keep on getting '' is invalid QName.
The weird thing is, I can take the same code, stylesheet and XML, put into a
Console app and it works okay. I've tested the stylesheet in Stylus Studio
and tried using nxslt and both work fine.

Any ideas?

Glenn

Re: '' is an invalid QName Oleg Tkachenko
6/24/2005 10:53:08 AM
[quoted text, click to view]

Then it probably has something to do with the way you run the
transformation. Show us your code.

--
Oleg Tkachenko [XML MVP, MCAD]
Re: '' is an invalid QName Glenn
6/25/2005 11:09:07 AM

[quoted text, click to view]

Oleg

Here it is

private void TransformResponse( string transformPath, XmlDocument document,
string outputPath )
{
if ( !File.Exists( transformPath ) )
{
throw new FileNotFoundException( "XSLT file could not be found",
transformPath );
}

XslTransform transform = new XslTransform();
XmlReader transformReader = new XmlTextReader( transformPath );
transform.Load( transformReader, null, null );
using ( FileStream stream = File.Open( outputPath, FileMode.Create,
FileAccess.Write, FileShare.Write ) )
{
transform.Transform( document, null, stream, null );
}
}

Cheers

Glenn

Re: '' is an invalid QName Oleg Tkachenko [MVP]
6/26/2005 11:45:55 AM
[quoted text, click to view]

Looks ok, but beware those nulls disable resolving any external
resources, be it xsl:import/xsl:include or document() function call.
Anyway, show us some minimal XSLT stylesheet to reproduce the problem.

--
Oleg Tkachenko [XML MVP, MCAD]
Re: '' is an invalid QName Glenn
6/27/2005 12:00:00 AM
Oleg

It was nothing more than my forgetfulness. Forgot to change the app.config
to point to the correct stylesheet.

Thanks for the help though

Glenn (embarrassed)

[quoted text, click to view]

AddThis Social Bookmark Button